Chromium Code Reviews| Index: src/ic/ia32/ic-ia32.cc |
| diff --git a/src/ic/ia32/ic-ia32.cc b/src/ic/ia32/ic-ia32.cc |
| index d59e58521ae1ad113cb311310ae51240182def19..179d2a327b3e01ba28555fae8d1f5ad758da16b7 100644 |
| --- a/src/ic/ia32/ic-ia32.cc |
| +++ b/src/ic/ia32/ic-ia32.cc |
| @@ -157,10 +157,9 @@ static void GenerateKeyedLoadReceiverCheck(MacroAssembler* masm, |
| __ test_b(FieldOperand(map, Map::kBitFieldOffset), |
| (1 << Map::kIsAccessCheckNeeded) | (1 << interceptor_bit)); |
| __ j(not_zero, slow); |
| - // Check that the object is some kind of JS object EXCEPT JS Value type. |
| - // In the case that the object is a value-wrapper object, |
| - // we enter the runtime system to make sure that indexing |
| - // into string objects works as intended. |
| + // Check that the object is some kind of JS object EXCEPT JS Value type. In |
| + // the case that the object is a value-wrapper object, we enter the runtime |
| + // system to make sure that indexing into string objects works as intended. |
| DCHECK(JS_OBJECT_TYPE > JS_VALUE_TYPE); |
| __ CmpInstanceType(map, JS_OBJECT_TYPE); |
| @@ -539,8 +538,11 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, |
| __ JumpIfNotSmi(key, &maybe_name_key); |
| __ CmpInstanceType(edi, JS_ARRAY_TYPE); |
| __ j(equal, &array); |
| - // Check that the object is some kind of JSObject. |
| - __ CmpInstanceType(edi, FIRST_JS_OBJECT_TYPE); |
| + // Check that the object is some kind of JS object EXCEPT JS Value type. In |
| + // the case that the object is a value-wrapper object, we enter the runtime |
| + // system to make sure that indexing into string objects works as intended. |
| + DCHECK(JS_VALUE_TYPE < JS_OBJECT_TYPE); |
|
Jakob Kummerow
2015/07/13 15:00:58
STATIC_ASSERT
|
| + __ CmpInstanceType(edi, JS_OBJECT_TYPE); |
| __ j(below, &slow); |
| // Object case: Check key against length in the elements array. |