OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
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 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2864 DCHECK(ToRegister(instr->context()).is(rsi)); | 2864 DCHECK(ToRegister(instr->context()).is(rsi)); |
2865 DCHECK(ToRegister(instr->global_object()) | 2865 DCHECK(ToRegister(instr->global_object()) |
2866 .is(LoadDescriptor::ReceiverRegister())); | 2866 .is(LoadDescriptor::ReceiverRegister())); |
2867 DCHECK(ToRegister(instr->result()).is(rax)); | 2867 DCHECK(ToRegister(instr->result()).is(rax)); |
2868 | 2868 |
2869 __ Move(LoadDescriptor::NameRegister(), instr->name()); | 2869 __ Move(LoadDescriptor::NameRegister(), instr->name()); |
2870 if (FLAG_vector_ics) { | 2870 if (FLAG_vector_ics) { |
2871 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2871 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
2872 } | 2872 } |
2873 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2873 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
2874 Handle<Code> ic = CodeFactory::LoadIC(isolate(), mode).code(); | 2874 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate(), mode).code(); |
2875 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2875 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2876 } | 2876 } |
2877 | 2877 |
2878 | 2878 |
2879 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2879 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
2880 Register value = ToRegister(instr->value()); | 2880 Register value = ToRegister(instr->value()); |
2881 Handle<Cell> cell_handle = instr->hydrogen()->cell().handle(); | 2881 Handle<Cell> cell_handle = instr->hydrogen()->cell().handle(); |
2882 | 2882 |
2883 // If the cell we are storing to contains the hole it could have | 2883 // If the cell we are storing to contains the hole it could have |
2884 // been deleted from the property dictionary. In that case, we need | 2884 // been deleted from the property dictionary. In that case, we need |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 | 3006 |
3007 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3007 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3008 DCHECK(ToRegister(instr->context()).is(rsi)); | 3008 DCHECK(ToRegister(instr->context()).is(rsi)); |
3009 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3009 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3010 DCHECK(ToRegister(instr->result()).is(rax)); | 3010 DCHECK(ToRegister(instr->result()).is(rax)); |
3011 | 3011 |
3012 __ Move(LoadDescriptor::NameRegister(), instr->name()); | 3012 __ Move(LoadDescriptor::NameRegister(), instr->name()); |
3013 if (FLAG_vector_ics) { | 3013 if (FLAG_vector_ics) { |
3014 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 3014 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
3015 } | 3015 } |
3016 Handle<Code> ic = CodeFactory::LoadIC(isolate(), NOT_CONTEXTUAL).code(); | 3016 Handle<Code> ic = |
| 3017 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_CONTEXTUAL).code(); |
3017 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3018 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3018 } | 3019 } |
3019 | 3020 |
3020 | 3021 |
3021 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3022 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
3022 Register function = ToRegister(instr->function()); | 3023 Register function = ToRegister(instr->function()); |
3023 Register result = ToRegister(instr->result()); | 3024 Register result = ToRegister(instr->result()); |
3024 | 3025 |
3025 // Get the prototype or initial map from the function. | 3026 // Get the prototype or initial map from the function. |
3026 __ movp(result, | 3027 __ movp(result, |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3288 | 3289 |
3289 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3290 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3290 DCHECK(ToRegister(instr->context()).is(rsi)); | 3291 DCHECK(ToRegister(instr->context()).is(rsi)); |
3291 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 3292 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
3292 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); | 3293 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); |
3293 | 3294 |
3294 if (FLAG_vector_ics) { | 3295 if (FLAG_vector_ics) { |
3295 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); | 3296 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); |
3296 } | 3297 } |
3297 | 3298 |
3298 Handle<Code> ic = CodeFactory::KeyedLoadIC(isolate()).code(); | 3299 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); |
3299 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3300 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
3300 } | 3301 } |
3301 | 3302 |
3302 | 3303 |
3303 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3304 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3304 Register result = ToRegister(instr->result()); | 3305 Register result = ToRegister(instr->result()); |
3305 | 3306 |
3306 if (instr->hydrogen()->from_inlined()) { | 3307 if (instr->hydrogen()->from_inlined()) { |
3307 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); | 3308 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); |
3308 } else { | 3309 } else { |
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5880 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5881 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5881 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5882 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5882 } | 5883 } |
5883 | 5884 |
5884 | 5885 |
5885 #undef __ | 5886 #undef __ |
5886 | 5887 |
5887 } } // namespace v8::internal | 5888 } } // namespace v8::internal |
5888 | 5889 |
5889 #endif // V8_TARGET_ARCH_X64 | 5890 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |