| 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/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3008 DCHECK(ToRegister(instr->context()).is(cp)); | 3008 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3009 DCHECK(ToRegister(instr->global_object()) | 3009 DCHECK(ToRegister(instr->global_object()) |
| 3010 .is(LoadDescriptor::ReceiverRegister())); | 3010 .is(LoadDescriptor::ReceiverRegister())); |
| 3011 DCHECK(ToRegister(instr->result()).is(r0)); | 3011 DCHECK(ToRegister(instr->result()).is(r0)); |
| 3012 | 3012 |
| 3013 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3013 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 3014 if (FLAG_vector_ics) { | 3014 if (FLAG_vector_ics) { |
| 3015 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 3015 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 3016 } | 3016 } |
| 3017 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 3017 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 3018 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code(); | 3018 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); |
| 3019 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3019 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3020 } | 3020 } |
| 3021 | 3021 |
| 3022 | 3022 |
| 3023 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 3023 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 3024 Register value = ToRegister(instr->value()); | 3024 Register value = ToRegister(instr->value()); |
| 3025 Register cell = scratch0(); | 3025 Register cell = scratch0(); |
| 3026 | 3026 |
| 3027 // Load the cell. | 3027 // Load the cell. |
| 3028 __ mov(cell, Operand(instr->hydrogen()->cell().handle())); | 3028 __ mov(cell, Operand(instr->hydrogen()->cell().handle())); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3130 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3130 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 3131 DCHECK(ToRegister(instr->context()).is(cp)); | 3131 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3132 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3132 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 3133 DCHECK(ToRegister(instr->result()).is(r0)); | 3133 DCHECK(ToRegister(instr->result()).is(r0)); |
| 3134 | 3134 |
| 3135 // Name is always in r2. | 3135 // Name is always in r2. |
| 3136 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 3136 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 3137 if (FLAG_vector_ics) { | 3137 if (FLAG_vector_ics) { |
| 3138 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3138 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 3139 } | 3139 } |
| 3140 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code(); | 3140 Handle<Code> ic = |
| 3141 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); |
| 3141 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3142 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3142 } | 3143 } |
| 3143 | 3144 |
| 3144 | 3145 |
| 3145 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3146 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 3146 Register scratch = scratch0(); | 3147 Register scratch = scratch0(); |
| 3147 Register function = ToRegister(instr->function()); | 3148 Register function = ToRegister(instr->function()); |
| 3148 Register result = ToRegister(instr->result()); | 3149 Register result = ToRegister(instr->result()); |
| 3149 | 3150 |
| 3150 // Get the prototype or initial map from the function. | 3151 // Get the prototype or initial map from the function. |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3421 | 3422 |
| 3422 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3423 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| 3423 DCHECK(ToRegister(instr->context()).is(cp)); | 3424 DCHECK(ToRegister(instr->context()).is(cp)); |
| 3424 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3425 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 3425 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3426 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
| 3426 | 3427 |
| 3427 if (FLAG_vector_ics) { | 3428 if (FLAG_vector_ics) { |
| 3428 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3429 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
| 3429 } | 3430 } |
| 3430 | 3431 |
| 3431 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); | 3432 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); |
| 3432 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3433 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3433 } | 3434 } |
| 3434 | 3435 |
| 3435 | 3436 |
| 3436 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3437 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3437 Register scratch = scratch0(); | 3438 Register scratch = scratch0(); |
| 3438 Register result = ToRegister(instr->result()); | 3439 Register result = ToRegister(instr->result()); |
| 3439 | 3440 |
| 3440 if (instr->hydrogen()->from_inlined()) { | 3441 if (instr->hydrogen()->from_inlined()) { |
| 3441 __ sub(result, sp, Operand(2 * kPointerSize)); | 3442 __ sub(result, sp, Operand(2 * kPointerSize)); |
| (...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5903 __ Push(scope_info); | 5904 __ Push(scope_info); |
| 5904 __ push(ToRegister(instr->function())); | 5905 __ push(ToRegister(instr->function())); |
| 5905 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5906 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5906 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5907 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5907 } | 5908 } |
| 5908 | 5909 |
| 5909 | 5910 |
| 5910 #undef __ | 5911 #undef __ |
| 5911 | 5912 |
| 5912 } } // namespace v8::internal | 5913 } } // namespace v8::internal |
| OLD | NEW |