| Index: src/arm/lithium-codegen-arm.cc
|
| ===================================================================
|
| --- src/arm/lithium-codegen-arm.cc (revision 11662)
|
| +++ src/arm/lithium-codegen-arm.cc (working copy)
|
| @@ -571,6 +571,9 @@
|
| LInstruction* instr,
|
| SafepointMode safepoint_mode) {
|
| ASSERT(instr != NULL);
|
| + // Block literal pool emission to ensure nop indicating no inlined smi code
|
| + // is in the correct position.
|
| + Assembler::BlockConstPoolScope block_const_pool(masm());
|
| LPointerMap* pointers = instr->pointer_map();
|
| RecordPosition(pointers->position());
|
| __ Call(code, mode);
|
| @@ -1684,6 +1687,9 @@
|
| ASSERT(ToRegister(instr->result()).is(r0));
|
|
|
| BinaryOpStub stub(instr->op(), NO_OVERWRITE);
|
| + // Block literal pool emission to ensure nop indicating no inlined smi code
|
| + // is in the correct position.
|
| + Assembler::BlockConstPoolScope block_const_pool(masm());
|
| CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
|
| __ nop(); // Signals no inlined code.
|
| }
|
| @@ -2315,20 +2321,25 @@
|
| Label cache_miss;
|
| Register map = temp;
|
| __ ldr(map, FieldMemOperand(object, HeapObject::kMapOffset));
|
| - __ bind(deferred->map_check()); // Label for calculating code patching.
|
| - // We use Factory::the_hole_value() on purpose instead of loading from the
|
| - // root array to force relocation to be able to later patch with
|
| - // the cached map.
|
| - Handle<JSGlobalPropertyCell> cell =
|
| - factory()->NewJSGlobalPropertyCell(factory()->the_hole_value());
|
| - __ mov(ip, Operand(Handle<Object>(cell)));
|
| - __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
|
| - __ cmp(map, Operand(ip));
|
| - __ b(ne, &cache_miss);
|
| - // We use Factory::the_hole_value() on purpose instead of loading from the
|
| - // root array to force relocation to be able to later patch
|
| - // with true or false.
|
| - __ mov(result, Operand(factory()->the_hole_value()));
|
| + {
|
| + // Block constant pool emission to ensure the positions of instructions are
|
| + // as expected by the patcher. See InstanceofStub::Generate().
|
| + Assembler::BlockConstPoolScope block_const_pool(masm());
|
| + __ bind(deferred->map_check()); // Label for calculating code patching.
|
| + // We use Factory::the_hole_value() on purpose instead of loading from the
|
| + // root array to force relocation to be able to later patch with
|
| + // the cached map.
|
| + Handle<JSGlobalPropertyCell> cell =
|
| + factory()->NewJSGlobalPropertyCell(factory()->the_hole_value());
|
| + __ mov(ip, Operand(Handle<Object>(cell)));
|
| + __ ldr(ip, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
|
| + __ cmp(map, Operand(ip));
|
| + __ b(ne, &cache_miss);
|
| + // We use Factory::the_hole_value() on purpose instead of loading from the
|
| + // root array to force relocation to be able to later patch
|
| + // with true or false.
|
| + __ mov(result, Operand(factory()->the_hole_value()));
|
| + }
|
| __ b(&done);
|
|
|
| // The inlined call site cache did not match. Check null and string before
|
| @@ -5139,6 +5150,8 @@
|
| int current_pc = masm()->pc_offset();
|
| int patch_size = Deoptimizer::patch_size();
|
| if (current_pc < last_lazy_deopt_pc_ + patch_size) {
|
| + // Block literal pool emission for duration of padding.
|
| + Assembler::BlockConstPoolScope block_const_pool(masm());
|
| int padding_size = last_lazy_deopt_pc_ + patch_size - current_pc;
|
| ASSERT_EQ(0, padding_size % Assembler::kInstrSize);
|
| while (padding_size > 0) {
|
|
|