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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 1332923005: Remove remaining uses of null's absolute address from non-IA32. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 5382e88b801b87f7f2a78d02f393a8365b818f84..19fc8b3fcf4bb8883bde34513525de0706d05776 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -22,6 +22,7 @@
namespace dart {
+DECLARE_FLAG(bool, allow_absolute_addresses);
DECLARE_FLAG(bool, emit_edge_counters);
DECLARE_FLAG(int, optimization_counter_threshold);
DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
@@ -2600,6 +2601,7 @@ class CheckStackOverflowSlowPath : public SlowPathCode {
Register temp = instruction_->locs()->temp(0).reg();
__ Comment("CheckStackOverflowSlowPathOsr");
__ Bind(osr_entry_label());
+ ASSERT(FLAG_allow_absolute_addresses);
__ LoadImmediate(temp, Immediate(flags_address));
__ movq(Address(temp, 0), Immediate(Isolate::kOsrRequest));
}
@@ -2646,7 +2648,7 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Register temp = locs()->temp(0).reg();
// Generate stack overflow check.
- if (compiler->is_optimizing()) {
+ if (compiler->is_optimizing() && FLAG_allow_absolute_addresses) {
__ LoadImmediate(
temp, Immediate(Isolate::Current()->stack_limit_address()));
__ cmpq(RSP, Address(temp, 0));
@@ -3405,9 +3407,7 @@ void UnboxInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if ((value()->Type()->ToNullableCid() == box_cid) &&
value()->Type()->is_nullable()) {
- const Immediate& raw_null =
- Immediate(reinterpret_cast<intptr_t>(Object::null()));
- __ cmpq(box, raw_null);
+ __ CompareObject(box, Object::null_object());
__ j(EQUAL, deopt);
} else {
__ testq(box, Immediate(kSmiTagMask));
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/intrinsifier_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698