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

Unified Diff: runtime/vm/stub_code.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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.cc
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 38fd62391a7aa19689137751429d770a84474b83..172024579fdf8dba8918728ca7954c54edf3219d 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -156,8 +156,7 @@ RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
DisassembleToStdout formatter;
stub.Disassemble(&formatter);
ISL_Print("}\n");
- const ObjectPool& object_pool = ObjectPool::Handle(
- Instructions::Handle(stub.instructions()).object_pool());
+ const ObjectPool& object_pool = ObjectPool::Handle(stub.object_pool());
object_pool.DebugPrint();
}
stub.set_entry_patch_pc_offset(entry_patch_offset);
@@ -182,6 +181,21 @@ uword StubCode::UnoptimizedStaticCallEntryPoint(intptr_t num_args_tested) {
}
+RawCode* StubCode::UnoptimizedStaticCallCode(intptr_t num_args_tested) {
+ switch (num_args_tested) {
+ case 0:
+ return ZeroArgsUnoptimizedStaticCallCode();
+ case 1:
+ return OneArgUnoptimizedStaticCallCode();
+ case 2:
+ return TwoArgsUnoptimizedStaticCallCode();
+ default:
+ UNIMPLEMENTED();
+ return 0;
+ }
+}
+
+
RawCode* StubCode::Generate(const char* name,
void (*GenerateStub)(Assembler* assembler)) {
Assembler assembler;
@@ -193,8 +207,7 @@ RawCode* StubCode::Generate(const char* name,
DisassembleToStdout formatter;
code.Disassemble(&formatter);
ISL_Print("}\n");
- const ObjectPool& object_pool = ObjectPool::Handle(
- Instructions::Handle(code.instructions()).object_pool());
+ const ObjectPool& object_pool = ObjectPool::Handle(code.object_pool());
object_pool.DebugPrint();
}
return code.raw();

Powered by Google App Engine
This is Rietveld 408576698