Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 339183010: Specialize breakpoint stubs by set of live registers of the stubs they are intercepting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
diff --git a/runtime/vm/stub_code_mips.cc b/runtime/vm/stub_code_mips.cc
index 5c04197cd8e5ddb11f6bcc82d0c70f696cdeb9ca..62d3b6787c1daca2e6dd1abbb488751d7bfab1a2 100644
--- a/runtime/vm/stub_code_mips.cc
+++ b/runtime/vm/stub_code_mips.cc
@@ -34,7 +34,7 @@ DECLARE_FLAG(bool, enable_debugger);
// SP + 4*S4 - 4 : address of first argument in argument array.
// SP + 4*S4 : address of return value.
// S5 : address of the runtime function to call.
-// S4 : number of arguments to the call as Smi.
+// S4 : number of arguments to the call.
void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) {
const intptr_t isolate_offset = NativeArguments::isolate_offset();
const intptr_t argc_tag_offset = NativeArguments::argc_tag_offset();
@@ -49,7 +49,6 @@ void StubCode::GenerateCallToRuntimeStub(Assembler* assembler) {
__ sw(RA, Address(SP, 1 * kWordSize));
__ sw(FP, Address(SP, 0 * kWordSize));
__ mov(FP, SP);
- __ SmiUntag(S4);
// Load current Isolate pointer from Context structure into A0.
__ lw(A0, FieldAddress(CTX, Context::isolate_offset()));
@@ -1726,8 +1725,30 @@ void StubCode::GenerateLazyCompileStub(Assembler* assembler) {
}
-void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) {
- __ Comment("BreakpointRuntime stub");
+// S5: Contains an ICData.
+void StubCode::GenerateICCallBreakpointStub(Assembler* assembler) {
+ __ Comment("ICCallBreakpoint stub");
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-2 * kWordSize));
+ __ sw(S5, Address(SP, 1 * kWordSize));
+ __ LoadImmediate(TMP, reinterpret_cast<intptr_t>(Object::null()));
+ __ sw(TMP, Address(SP, 0 * kWordSize));
+
+ __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
+
+ __ lw(S5, Address(SP, 1 * kWordSize));
+ __ lw(T0, Address(SP, 0 * kWordSize));
+ __ addiu(SP, SP, Immediate(2 * kWordSize));
+ __ LeaveStubFrame();
+ __ jr(T0);
+}
+
+
+// S5: Contains Smi 0 (need to preserve a GC-safe value for the lazy compile
+// stub).
+// S4: Contains an arguments descriptor.
+void StubCode::GenerateClosureCallBreakpointStub(Assembler* assembler) {
+ __ Comment("ClosureCallBreakpoint stub");
__ EnterStubFrame();
__ addiu(SP, SP, Immediate(-3 * kWordSize));
__ sw(S5, Address(SP, 2 * kWordSize));
@@ -1746,6 +1767,22 @@ void StubCode::GenerateBreakpointRuntimeStub(Assembler* assembler) {
}
+void StubCode::GenerateRuntimeCallBreakpointStub(Assembler* assembler) {
+ __ Comment("RuntimeCallBreakpoint stub");
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-1 * kWordSize));
+ __ LoadImmediate(TMP, reinterpret_cast<intptr_t>(Object::null()));
+ __ sw(TMP, Address(SP, 0 * kWordSize));
+
+ __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
+
+ __ lw(T0, Address(SP, 0 * kWordSize));
+ __ addiu(SP, SP, Immediate(3 * kWordSize));
+ __ LeaveStubFrame();
+ __ jr(T0);
+}
+
+
// Called only from unoptimized code. All relevant registers have been saved.
// RA: return address.
void StubCode::GenerateDebugStepCheckStub(Assembler* assembler) {
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698