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

Unified Diff: runtime/vm/stub_code.cc

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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.h ('k') | runtime/vm/stub_code_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code.cc
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 6738a259e013a45f22462378ff8130e586e52a2a..04ca4f492588582eaa5bd853e52825700a299264 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -85,30 +85,47 @@ void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) {
bool StubCode::HasBeenInitialized() {
+#if !defined(TARGET_ARCH_DBC)
// Use JumpToExceptionHandler and InvokeDart as canaries.
const StubEntry* entry_1 = StubCode::JumpToExceptionHandler_entry();
const StubEntry* entry_2 = StubCode::InvokeDartCode_entry();
return (entry_1 != NULL) && (entry_2 != NULL);
+#else
+ return true;
+#endif
}
bool StubCode::InInvocationStub(uword pc) {
+#if !defined(TARGET_ARCH_DBC)
ASSERT(HasBeenInitialized());
uword entry = StubCode::InvokeDartCode_entry()->EntryPoint();
uword size = StubCode::InvokeDartCodeSize();
return (pc >= entry) && (pc < (entry + size));
+#else
+ // On DBC we use a special marker PC to signify entry frame because there is
+ // no such thing as invocation stub.
+ return (pc & 2) != 0;
+#endif
}
bool StubCode::InJumpToExceptionHandlerStub(uword pc) {
+#if !defined(TARGET_ARCH_DBC)
ASSERT(HasBeenInitialized());
uword entry = StubCode::JumpToExceptionHandler_entry()->EntryPoint();
uword size = StubCode::JumpToExceptionHandlerSize();
return (pc >= entry) && (pc < (entry + size));
+#else
+ // This stub does not exist on DBC.
+ return false;
+#endif
}
RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
+ // These stubs are not used by DBC.
+#if !defined(TARGET_ARCH_DBC)
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
@@ -169,11 +186,16 @@ RawCode* StubCode::GetAllocationStubForClass(const Class& cls) {
}
}
return stub.raw();
+#endif
+ UNIMPLEMENTED();
+ return Code::null();
}
const StubEntry* StubCode::UnoptimizedStaticCallEntry(
intptr_t num_args_tested) {
+ // These stubs are not used by DBC.
+#if !defined(TARGET_ARCH_DBC)
switch (num_args_tested) {
case 0:
return ZeroArgsUnoptimizedStaticCall_entry();
@@ -185,6 +207,9 @@ const StubEntry* StubCode::UnoptimizedStaticCallEntry(
UNIMPLEMENTED();
return NULL;
}
+#else
+ return NULL;
+#endif
}
« no previous file with comments | « runtime/vm/stub_code.h ('k') | runtime/vm/stub_code_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698