[vm] Don't need to preserve ICData past the dispatching stubs.
Change-Id: I0752c4d09c836d64c8ef43b4f65b2763a550aee8
Reviewed-on: https://dart-review.googlesource.com/64666
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: RĂ©gis Crelier <regis@google.com>
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index c536e9c..0c3a45e 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -824,7 +824,6 @@
// SP: address of last argument.
// FP: caller's frame pointer.
// PP: caller's pool pointer.
-// R9: ic-data.
// R4: arguments descriptor array.
void FlowGraphCompiler::CompileGraph() {
InitCompiler();
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 15e28ee..cf56eec 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -807,7 +807,6 @@
// SP: address of last argument.
// FP: caller's frame pointer.
// PP: caller's pool pointer.
-// R5: ic-data.
// R4: arguments descriptor array.
void FlowGraphCompiler::CompileGraph() {
InitCompiler();
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 8be187e..7eb81e2 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -268,7 +268,6 @@
const Register SPREG = SP; // Stack pointer register.
const Register FPREG = FP; // Frame pointer register.
const Register LRREG = LR; // Link register.
-const Register ICREG = R9; // IC data register.
const Register ARGS_DESC_REG = R4;
const Register CODE_REG = R6;
const Register THR = R10; // Caches current thread in generated code.
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 9294a1b..bde068a 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -112,7 +112,6 @@
const Register FPREG = FP; // Frame pointer register.
const Register SPREG = R15; // Stack pointer register.
const Register LRREG = LR; // Link register.
-const Register ICREG = R5; // IC data register.
const Register ARGS_DESC_REG = R4; // Arguments descriptor register.
const Register THR = R26; // Caches current thread in generated code.
const Register CALLEE_SAVED_TEMP = R19;
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 1f4e449..239d4ab 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -60,7 +60,6 @@
const Register PP = kNoRegister; // No object pool pointer.
const Register SPREG = ESP; // Stack pointer register.
const Register FPREG = EBP; // Frame pointer register.
-const Register ICREG = ECX; // IC data register.
const Register ARGS_DESC_REG = EDX; // Arguments descriptor register.
const Register THR = ESI; // Caches current thread in generated code.
const Register CALLEE_SAVED_TEMP = EBX;
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 0038c40..163821d 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -103,7 +103,6 @@
const Register PP = R15;
const Register SPREG = RSP; // Stack pointer register.
const Register FPREG = RBP; // Frame pointer register.
-const Register ICREG = RBX; // IC data register.
const Register ARGS_DESC_REG = R10; // Arguments descriptor register.
const Register CODE_REG = R12;
const Register THR = R14; // Caches current thread in generated code.
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 555fb3a..e221091 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -1762,17 +1762,13 @@
}
// Stub for compiling a function and jumping to the compiled code.
-// R9: IC-Data (for methods).
// R4: Arguments descriptor.
// R0: Function.
void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
- // Preserve arg desc. and IC data object.
__ EnterStubFrame();
- __ PushList((1 << R4) | (1 << R9));
- __ Push(R0); // Pass function.
+ __ PushList((1 << R0) | (1 << R4)); // Preserve arg desc, pass function.
__ CallRuntime(kCompileFunctionRuntimeEntry, 1);
- __ Pop(R0); // Restore argument.
- __ PopList((1 << R4) | (1 << R9)); // Restore arg desc. and IC data.
+ __ PopList((1 << R0) | (1 << R4));
__ LeaveStubFrame();
// When using the interpreter, the function's code may now point to the
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 209a3b0..dcd5ee1 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -1930,19 +1930,16 @@
}
// Stub for compiling a function and jumping to the compiled code.
-// R5: IC-Data (for methods).
// R4: Arguments descriptor.
// R0: Function.
void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
- // Preserve arg desc. and IC data object.
+ // Preserve arg desc.
__ EnterStubFrame();
- __ Push(R5); // Save IC Data.
__ Push(R4); // Save arg. desc.
__ Push(R0); // Pass function.
__ CallRuntime(kCompileFunctionRuntimeEntry, 1);
__ Pop(R0); // Restore argument.
__ Pop(R4); // Restore arg desc.
- __ Pop(R5); // Restore IC Data.
__ LeaveStubFrame();
// When using the interpreter, the function's code may now point to the
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 6b91241..1b23e2d 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -1616,17 +1616,14 @@
}
// Stub for compiling a function and jumping to the compiled code.
-// ECX: IC-Data (for methods).
// EDX: Arguments descriptor.
// EAX: Function.
void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
__ EnterStubFrame();
__ pushl(EDX); // Preserve arguments descriptor array.
- __ pushl(ECX); // Preserve IC data object.
__ pushl(EAX); // Pass function.
__ CallRuntime(kCompileFunctionRuntimeEntry, 1);
__ popl(EAX); // Restore function.
- __ popl(ECX); // Restore IC data array.
__ popl(EDX); // Restore arguments descriptor array.
__ LeaveFrame();
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 30dbbca..5685994 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -1872,17 +1872,14 @@
}
// Stub for compiling a function and jumping to the compiled code.
-// RBX: IC-Data (for methods).
// R10: Arguments descriptor.
// RAX: Function.
void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
__ EnterStubFrame();
__ pushq(R10); // Preserve arguments descriptor array.
- __ pushq(RBX); // Preserve IC data object.
__ pushq(RAX); // Pass function.
__ CallRuntime(kCompileFunctionRuntimeEntry, 1);
__ popq(RAX); // Restore function.
- __ popq(RBX); // Restore IC data array.
__ popq(R10); // Restore arguments descriptor array.
__ LeaveStubFrame();