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

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: 3rd times a charm 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
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..49e53a48bf99b4287b910d2f29be4ec3f3cfd7dc 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,10 @@ 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);
+ }
+ if (compiler->ForceSlowPathForStackOverflow()) {
+ __ b(slow_path->entry_label());
}
__ Bind(slow_path->exit_label());
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698