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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 226543007: Implement new stacktrace and deoptimization stress testing flags: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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/intermediate_language_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 34255e95c088f3181156ea36743523036acfc384..9f003cf8431ae0da44cd860e64feb4538f604312 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -2573,6 +2573,15 @@ class CheckStackOverflowSlowPath : public SlowPathCode {
: instruction_(instruction) { }
virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
+ if (FLAG_use_osr) {
+ uword flags_address = Isolate::Current()->stack_overflow_flags_address();
+ Register value = instruction_->locs()->temp(0).reg();
+ __ Comment("CheckStackOverflowSlowPathOsr");
+ __ Bind(osr_entry_label());
+ __ LoadImmediate(IP, flags_address);
+ __ LoadImmediate(value, Isolate::kOsrRequest);
+ __ str(value, Address(IP));
+ }
__ Comment("CheckStackOverflowSlowPath");
__ Bind(entry_label());
compiler->SaveLiveRegisters(instruction_->locs());
@@ -2598,8 +2607,14 @@ class CheckStackOverflowSlowPath : public SlowPathCode {
__ b(exit_label());
}
+ Label* osr_entry_label() {
+ ASSERT(FLAG_use_osr);
+ return &osr_entry_label_;
+ }
+
private:
CheckStackOverflowInstr* instruction_;
+ Label osr_entry_label_;
};
@@ -2621,7 +2636,7 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
FLAG_optimization_counter_threshold * (loop_depth() + 1);
__ ldr(temp, FieldAddress(temp, Function::usage_counter_offset()));
__ CompareImmediate(temp, threshold);
- __ b(slow_path->entry_label(), GE);
+ __ b(slow_path->osr_entry_label(), GE);
}
__ Bind(slow_path->exit_label());
}

Powered by Google App Engine
This is Rietveld 408576698