| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 } | 2988 } |
| 2989 } | 2989 } |
| 2990 | 2990 |
| 2991 | 2991 |
| 2992 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2992 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2993 ASSERT(ToRegister(instr->context()).is(cp)); | 2993 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2994 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 2994 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); |
| 2995 ASSERT(ToRegister(instr->result()).is(r0)); | 2995 ASSERT(ToRegister(instr->result()).is(r0)); |
| 2996 | 2996 |
| 2997 __ mov(LoadIC::NameRegister(), Operand(instr->name())); | 2997 __ mov(LoadIC::NameRegister(), Operand(instr->name())); |
| 2998 if (FLAG_vector_ics) { |
| 2999 Register vector = ToRegister(instr->temp_vector()); |
| 3000 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3001 __ Move(vector, instr->hydrogen()->feedback_vector()); |
| 3002 // No need to allocate this register. |
| 3003 ASSERT(LoadIC::SlotRegister().is(r0)); |
| 3004 __ mov(LoadIC::SlotRegister(), |
| 3005 Operand(Smi::FromInt(instr->hydrogen()->slot()))); |
| 3006 } |
| 2998 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3007 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 2999 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 3008 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
| 3000 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3009 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3001 } | 3010 } |
| 3002 | 3011 |
| 3003 | 3012 |
| 3004 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 3013 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 3005 Register value = ToRegister(instr->value()); | 3014 Register value = ToRegister(instr->value()); |
| 3006 Register cell = scratch0(); | 3015 Register cell = scratch0(); |
| 3007 | 3016 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3108 } | 3117 } |
| 3109 | 3118 |
| 3110 | 3119 |
| 3111 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3120 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 3112 ASSERT(ToRegister(instr->context()).is(cp)); | 3121 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3113 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3122 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
| 3114 ASSERT(ToRegister(instr->result()).is(r0)); | 3123 ASSERT(ToRegister(instr->result()).is(r0)); |
| 3115 | 3124 |
| 3116 // Name is always in r2. | 3125 // Name is always in r2. |
| 3117 __ mov(LoadIC::NameRegister(), Operand(instr->name())); | 3126 __ mov(LoadIC::NameRegister(), Operand(instr->name())); |
| 3127 if (FLAG_vector_ics) { |
| 3128 Register vector = ToRegister(instr->temp_vector()); |
| 3129 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3130 __ Move(vector, instr->hydrogen()->feedback_vector()); |
| 3131 // No need to allocate this register. |
| 3132 ASSERT(LoadIC::SlotRegister().is(r0)); |
| 3133 __ mov(LoadIC::SlotRegister(), |
| 3134 Operand(Smi::FromInt(instr->hydrogen()->slot()))); |
| 3135 } |
| 3118 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 3136 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
| 3119 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3137 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3120 } | 3138 } |
| 3121 | 3139 |
| 3122 | 3140 |
| 3123 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3141 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 3124 Register scratch = scratch0(); | 3142 Register scratch = scratch0(); |
| 3125 Register function = ToRegister(instr->function()); | 3143 Register function = ToRegister(instr->function()); |
| 3126 Register result = ToRegister(instr->result()); | 3144 Register result = ToRegister(instr->result()); |
| 3127 | 3145 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3412 return MemOperand(scratch0(), base_offset); | 3430 return MemOperand(scratch0(), base_offset); |
| 3413 } | 3431 } |
| 3414 } | 3432 } |
| 3415 | 3433 |
| 3416 | 3434 |
| 3417 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3435 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| 3418 ASSERT(ToRegister(instr->context()).is(cp)); | 3436 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3419 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3437 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
| 3420 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); | 3438 ASSERT(ToRegister(instr->key()).is(LoadIC::NameRegister())); |
| 3421 | 3439 |
| 3440 if (FLAG_vector_ics) { |
| 3441 Register vector = ToRegister(instr->temp_vector()); |
| 3442 ASSERT(vector.is(LoadIC::VectorRegister())); |
| 3443 __ Move(vector, instr->hydrogen()->feedback_vector()); |
| 3444 // No need to allocate this register. |
| 3445 ASSERT(LoadIC::SlotRegister().is(r0)); |
| 3446 __ mov(LoadIC::SlotRegister(), |
| 3447 Operand(Smi::FromInt(instr->hydrogen()->slot()))); |
| 3448 } |
| 3449 |
| 3422 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3450 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
| 3423 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3451 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3424 } | 3452 } |
| 3425 | 3453 |
| 3426 | 3454 |
| 3427 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3455 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3428 Register scratch = scratch0(); | 3456 Register scratch = scratch0(); |
| 3429 Register result = ToRegister(instr->result()); | 3457 Register result = ToRegister(instr->result()); |
| 3430 | 3458 |
| 3431 if (instr->hydrogen()->from_inlined()) { | 3459 if (instr->hydrogen()->from_inlined()) { |
| (...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5862 __ Push(scope_info); | 5890 __ Push(scope_info); |
| 5863 __ push(ToRegister(instr->function())); | 5891 __ push(ToRegister(instr->function())); |
| 5864 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5892 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5865 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5893 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5866 } | 5894 } |
| 5867 | 5895 |
| 5868 | 5896 |
| 5869 #undef __ | 5897 #undef __ |
| 5870 | 5898 |
| 5871 } } // namespace v8::internal | 5899 } } // namespace v8::internal |
| OLD | NEW |