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

Unified Diff: runtime/vm/code_generator.cc

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments 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
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 652cdc25a7e6126c09cc072d077260351e0000fa..5b0636b039032d799a4674727b8f5de165093c36 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -677,6 +677,7 @@ static void CheckResultError(const Object& result) {
}
+#if !defined(TARGET_ARCH_DBC)
// Gets called from debug stub when code reaches a breakpoint
// set on a runtime stub call.
DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
@@ -696,6 +697,20 @@ DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
}
arguments.SetReturn(orig_stub);
}
+#else
+// Gets called from the simulator when the breakpoint is reached.
+DEFINE_RUNTIME_ENTRY(BreakpointRuntimeHandler, 0) {
+ if (!FLAG_support_debugger) {
+ UNREACHABLE();
+ return;
+ }
+ const Error& error = Error::Handle(isolate->debugger()->SignalBpReached());
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ UNREACHABLE();
+ }
+}
+#endif // !defined(TARGET_ARCH_DBC)
DEFINE_RUNTIME_ENTRY(SingleStepHandler, 0) {
@@ -978,6 +993,8 @@ DEFINE_RUNTIME_ENTRY(StaticCallMissHandlerTwoArgs, 3) {
// Arg2: Arguments descriptor array.
// Returns: target function to call.
DEFINE_RUNTIME_ENTRY(MegamorphicCacheMissHandler, 3) {
+// DBC does not use megamorphic calls right now.
+#if !defined(TARGET_ARCH_DBC)
const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
const Object& ic_data_or_cache = Object::Handle(zone, arguments.ArgAt(1));
const Array& descriptor = Array::CheckedHandle(zone, arguments.ArgAt(2));
@@ -1035,6 +1052,9 @@ DEFINE_RUNTIME_ENTRY(MegamorphicCacheMissHandler, 3) {
cache.Insert(class_id, target_function);
}
arguments.SetReturn(target_function);
+#else
+ UNREACHABLE();
+#endif // !defined(TARGET_ARCH_DBC)
}
@@ -1277,7 +1297,7 @@ static bool CanOptimizeFunction(const Function& function, Thread* thread) {
DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
#if defined(USING_SIMULATOR)
- uword stack_pos = Simulator::Current()->get_register(SPREG);
+ uword stack_pos = Simulator::Current()->get_sp();
#else
uword stack_pos = Isolate::GetCurrentStackPointer();
#endif
@@ -1289,7 +1309,7 @@ DEFINE_RUNTIME_ENTRY(StackOverflow, 0) {
// If an interrupt happens at the same time as a stack overflow, we
// process the stack overflow now and leave the interrupt for next
// time.
- if (stack_pos < isolate->saved_stack_limit()) {
+ if (IsCalleeFrameOf(isolate->saved_stack_limit(), stack_pos)) {
// Use the preallocated stack overflow exception to avoid calling
// into dart code.
const Instance& exception =

Powered by Google App Engine
This is Rietveld 408576698