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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 574843002: Fix x64 patching of asllocation stub: the pool pointer must be set-up before patching jump is execu… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/stub_code_mips.cc
===================================================================
--- runtime/vm/stub_code_mips.cc (revision 40325)
+++ runtime/vm/stub_code_mips.cc (working copy)
@@ -1192,9 +1192,11 @@
// SP + 0 : type arguments object (only if class is parameterized).
// Returns patch_code_pc offset where patching code for disabling the stub
// has been generated (similar to regularly generated Dart code).
-uword StubCode::GenerateAllocationStubForClass(Assembler* assembler,
- const Class& cls) {
+void StubCode::GenerateAllocationStubForClass(
+ Assembler* assembler, const Class& cls,
+ uword* entry_patch_offset, uword* patch_code_pc_offset) {
__ TraceSimMsg("AllocationStubForClass");
+ *entry_patch_offset = assembler->CodeSize();
// The generated code is different if the class is parameterized.
const bool is_cls_parameterized = cls.NumTypeArguments() > 0;
ASSERT(!is_cls_parameterized ||
@@ -1315,10 +1317,9 @@
// V0: new object
// Restore the frame pointer and return.
__ LeaveStubFrameAndReturn(RA);
- uword patch_code_pc_offset = assembler->CodeSize();
+ *patch_code_pc_offset = assembler->CodeSize();
StubCode* stub_code = Isolate::Current()->stub_code();
__ BranchPatchable(&stub_code->FixAllocationStubTargetLabel());
- return patch_code_pc_offset;
}

Powered by Google App Engine
This is Rietveld 408576698