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

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
Index: runtime/vm/intermediate_language_x64.cc
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 4955df647885301df94be109fbfbbd7560f288e4..0ff18f1a29f988dd9ab54a76044088e7e1de7420 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));

Powered by Google App Engine
This is Rietveld 408576698