| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index 2a7c8b31340601c740b7db1d510e84bcb9b4fff5..3d4825071a926c337c90c1bb50d8dacfdec139ed 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -2169,22 +2169,18 @@ void MacroAssembler::LoadTransitionedArrayMapConditional(
|
| Register map_in_out,
|
| Register scratch,
|
| Label* no_map_match) {
|
| - // Load the global or builtins object from the current context.
|
| - mov(scratch, NativeContextOperand());
|
| + DCHECK(IsFastElementsKind(expected_kind));
|
| + DCHECK(IsFastElementsKind(transitioned_kind));
|
|
|
| // Check that the function's map is the same as the expected cached map.
|
| - mov(scratch, Operand(scratch,
|
| - Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
|
| -
|
| - size_t offset = expected_kind * kPointerSize +
|
| - FixedArrayBase::kHeaderSize;
|
| - cmp(map_in_out, FieldOperand(scratch, offset));
|
| + mov(scratch, NativeContextOperand());
|
| + cmp(map_in_out,
|
| + ContextOperand(scratch, Context::ArrayMapIndex(expected_kind)));
|
| j(not_equal, no_map_match);
|
|
|
| // Use the transitioned cached map.
|
| - offset = transitioned_kind * kPointerSize +
|
| - FixedArrayBase::kHeaderSize;
|
| - mov(map_in_out, FieldOperand(scratch, offset));
|
| + mov(map_in_out,
|
| + ContextOperand(scratch, Context::ArrayMapIndex(transitioned_kind)));
|
| }
|
|
|
|
|
|
|