Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index d3493833ef4d6eca6c3b3b5e1f8d05b19ff07b2f..42b19670deb6dd33f0e63e7506b3743e1a690776 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -221,6 +221,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
// Smis. If it's not a heap number, then return equal. |
Register right_type = scratch; |
if ((cond == lt) || (cond == gt)) { |
+ Label not_simd; |
// Call runtime on identical JSObjects. Otherwise return equal. |
__ JumpIfObjectType(right, right_type, right_type, FIRST_SPEC_OBJECT_TYPE, |
slow, ge); |
@@ -228,8 +229,11 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
__ Cmp(right_type, SYMBOL_TYPE); |
__ B(eq, slow); |
// Call runtime on identical SIMD values since we must throw a TypeError. |
- __ Cmp(right_type, FLOAT32X4_TYPE); |
- __ B(eq, slow); |
+ __ Cmp(right_type, FIRST_SIMD_VALUE_TYPE); |
+ __ B(lt, ¬_simd); |
+ __ Cmp(right_type, LAST_SIMD_VALUE_TYPE); |
+ __ B(le, slow); |
+ __ Bind(¬_simd); |
if (is_strong(strength)) { |
// Call the runtime on anything that is converted in the semantics, since |
// we need to throw a TypeError. Smis have already been ruled out. |
@@ -241,6 +245,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
} else if (cond == eq) { |
__ JumpIfHeapNumber(right, &heap_number); |
} else { |
+ Label not_simd; |
__ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE, |
&heap_number); |
// Comparing JS objects with <=, >= is complicated. |
@@ -250,8 +255,11 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
__ Cmp(right_type, SYMBOL_TYPE); |
__ B(eq, slow); |
// Call runtime on identical SIMD values since we must throw a TypeError. |
- __ Cmp(right_type, FLOAT32X4_TYPE); |
- __ B(eq, slow); |
+ __ Cmp(right_type, FIRST_SIMD_VALUE_TYPE); |
+ __ B(lt, ¬_simd); |
+ __ Cmp(right_type, LAST_SIMD_VALUE_TYPE); |
+ __ B(le, slow); |
+ __ Bind(¬_simd); |
if (is_strong(strength)) { |
// Call the runtime on anything that is converted in the semantics, |
// since we need to throw a TypeError. Smis and heap numbers have |
@@ -5498,6 +5506,7 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) { |
Register context = cp; |
Register result = x0; |
Register slot = x2; |
+ Register name = x3; |
Label slow_case; |
// Go up the context chain to the script context. |
@@ -5518,8 +5527,8 @@ void LoadGlobalViaContextStub::Generate(MacroAssembler* masm) { |
// Fallback to runtime. |
__ Bind(&slow_case); |
__ SmiTag(slot); |
- __ Push(slot); |
- __ TailCallRuntime(Runtime::kLoadGlobalViaContext, 1, 1); |
+ __ Push(slot, name); |
+ __ TailCallRuntime(Runtime::kLoadGlobalViaContext, 2, 1); |
} |
@@ -5527,6 +5536,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
Register context = cp; |
Register value = x0; |
Register slot = x2; |
+ Register name = x3; |
Register context_temp = x10; |
Register cell = x10; |
Register cell_details = x11; |
@@ -5538,6 +5548,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
if (FLAG_debug_code) { |
__ CompareRoot(value, Heap::kTheHoleValueRootIndex); |
__ Check(ne, kUnexpectedValue); |
+ __ AssertName(name); |
} |
// Go up the context chain to the script context. |
@@ -5555,8 +5566,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
UntagSmiFieldMemOperand(cell, PropertyCell::kDetailsOffset)); |
__ And(cell_details, cell_details, |
PropertyDetails::PropertyCellTypeField::kMask | |
- PropertyDetails::KindField::kMask | |
- PropertyDetails::kAttributesReadOnlyMask); |
+ PropertyDetails::KindField::kMask); |
// Check if PropertyCell holds mutable data. |
Label not_mutable_data; |
@@ -5583,10 +5593,6 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
__ Cmp(cell_value, value); |
__ B(ne, ¬_same_value); |
- // Make sure the PropertyCell is not marked READ_ONLY. |
- __ Tst(cell_details, PropertyDetails::kAttributesReadOnlyMask); |
- __ B(ne, &slow_case); |
- |
if (FLAG_debug_code) { |
Label done; |
// This can only be true for Constant, ConstantType and Undefined cells, |
@@ -5608,8 +5614,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
__ Ret(); |
__ Bind(¬_same_value); |
- // Check if PropertyCell contains data with constant type (and is not |
- // READ_ONLY). |
+ // Check if PropertyCell contains data with constant type. |
__ Cmp(cell_details, PropertyDetails::PropertyCellTypeField::encode( |
PropertyCellType::kConstantType) | |
PropertyDetails::KindField::encode(kData)); |
@@ -5636,11 +5641,11 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
// Fall back to the runtime. |
__ Bind(&slow_case); |
__ SmiTag(slot); |
- __ Push(slot, value); |
+ __ Push(slot, name, value); |
__ TailCallRuntime(is_strict(language_mode()) |
? Runtime::kStoreGlobalViaContext_Strict |
: Runtime::kStoreGlobalViaContext_Sloppy, |
- 2, 1); |
+ 3, 1); |
} |