Chromium Code Reviews| Index: src/arm/codegen-arm.cc |
| =================================================================== |
| --- src/arm/codegen-arm.cc (revision 4506) |
| +++ src/arm/codegen-arm.cc (working copy) |
| @@ -351,7 +351,6 @@ |
| int32_t sp_delta = (scope()->num_parameters() + 1) * kPointerSize; |
| masm_->add(sp, sp, Operand(sp_delta)); |
| masm_->Jump(lr); |
| - } |
| #ifdef DEBUG |
| // Check that the size of the code used for returning matches what is |
|
Erik Corry
2010/04/27 08:44:28
Indentation
Søren Thygesen Gjesse
2010/04/27 09:10:20
Done.
|
| @@ -362,6 +361,7 @@ |
| CHECK(return_sequence_length == Assembler::kJSReturnSequenceLength || |
| return_sequence_length == Assembler::kJSReturnSequenceLength + 1); |
| #endif |
| + } |
| } |
| // Adjust for function-level loop nesting. |
| @@ -5230,34 +5230,34 @@ |
| set_comment("[ DeferredReferenceGetNamedValue"); |
| } |
| - virtual void BeforeGenerate(); |
| virtual void Generate(); |
| - virtual void AfterGenerate(); |
| private: |
| Handle<String> name_; |
| }; |
| -void DeferredReferenceGetNamedValue::BeforeGenerate() { |
| - __ StartBlockConstPool(); |
| -} |
| - |
| - |
| void DeferredReferenceGetNamedValue::Generate() { |
| + __ DecrementCounter(&Counters::named_load_inline, 1, r1, r2); |
| __ IncrementCounter(&Counters::named_load_inline_miss, 1, r1, r2); |
| + |
| // Setup the name register and call load IC. |
| __ mov(r2, Operand(name_)); |
| - Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| - __ Call(ic, RelocInfo::CODE_TARGET); |
| - // The call must be followed by a nop(1) instruction to indicate that the |
| - // inobject has been inlined. |
| - __ nop(NAMED_PROPERTY_LOAD_INLINED); |
| -} |
| + // The rest of the instructions in the deferred code must be together. |
| + { Assembler::BlockConstPoolScope block_const_pool(masm_); |
| -void DeferredReferenceGetNamedValue::AfterGenerate() { |
| - __ EndBlockConstPool(); |
| + Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); |
| + __ Call(ic, RelocInfo::CODE_TARGET); |
| + // The call must be followed by a nop(1) instruction to indicate that the |
| + // inobject has been inlined. |
|
Erik Corry
2010/04/27 08:44:28
inobject -> in-object case
Søren Thygesen Gjesse
2010/04/27 09:10:20
Done.
|
| + __ nop(NAMED_PROPERTY_LOAD_INLINED); |
| + |
| + // Block the constant pool for one more instruction after leaving this |
| + // constant pool block scope to include the branch instruction ending the |
| + // deferred code. |
| + __ BlockConstPoolFor(1); |
| + } |
| } |
| @@ -5276,6 +5276,11 @@ |
| DeferredReferenceGetNamedValue* deferred = |
| new DeferredReferenceGetNamedValue(name); |
| + // Counter will be decremented in the deferred code. Placed here to avoid |
| + // having it in the instruction stream below where patching will occour. |
|
Erik Corry
2010/04/27 08:44:28
occour -> occur
Søren Thygesen Gjesse
2010/04/27 09:10:20
Done.
|
| + __ IncrementCounter(&Counters::named_load_inline, 1, |
| + frame_->scratch0(), frame_->scratch1()); |
| + |
| // The following instructions are the inlined load of an in-object property. |
| // Parts of this code is patched, so the exact instructions generated needs |
| // to be fixed. Therefore the instruction pool is blocked when generating |
| @@ -5303,13 +5308,12 @@ |
| // Use initially use an invalid index. The index will be patched by the |
| // inline cache code. |
| __ ldr(r0, MemOperand(r1, 0)); |
| + |
| + // Make sure that the expected number of instructions are generated. |
| + ASSERT_EQ(kInlinedNamedLoadInstructions, |
| + masm_->InstructionsGeneratedSince(&check_inlined_codesize)); |
| } |
| - // Make sure that the expected number of instructions are generated. |
| - ASSERT_EQ(kInlinedNamedLoadInstructions, |
| - masm_->InstructionsGeneratedSince(&check_inlined_codesize)); |
| - |
| - __ IncrementCounter(&Counters::named_load_inline, 1, r1, r2); |
| deferred->BindExit(); |
| } |
| } |