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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 1248113003: VM: Fix more places with isolate embedded into unoptimized code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: minor cleanup in stub_code* Created 5 years, 5 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_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 2865b2611398e6a0fe35dc3859091dd47ff05400..dc61d61f985c0cf4147d85e4db910c69118b951c 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -2572,11 +2572,14 @@ void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
LocationSummary* CheckStackOverflowInstr::MakeLocationSummary(Zone* zone,
bool opt) const {
const intptr_t kNumInputs = 0;
- const intptr_t kNumTemps = 0;
+ const intptr_t kNumTemps = opt ? 0 : 1;
LocationSummary* summary = new(zone) LocationSummary(
zone, kNumInputs,
kNumTemps,
LocationSummary::kCallOnSlowPath);
+ if (!opt) {
+ summary->set_temp(0, Location::RequiresRegister());
+ }
return summary;
}
@@ -2634,8 +2637,13 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
compiler->AddSlowPathCode(slow_path);
- __ cmpl(ESP,
- Address::Absolute(Isolate::Current()->stack_limit_address()));
+ if (compiler->is_optimizing()) {
+ __ cmpl(ESP, Address::Absolute(Isolate::Current()->stack_limit_address()));
+ } else {
+ Register tmp = locs()->temp(0).reg();
+ __ LoadIsolate(tmp);
+ __ cmpl(ESP, Address(tmp, Isolate::stack_limit_offset()));
+ }
__ j(BELOW_EQUAL, slow_path->entry_label());
if (compiler->CanOSRFunction() && in_loop()) {
// In unoptimized code check the usage counter to trigger OSR at loop

Powered by Google App Engine
This is Rietveld 408576698