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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
| 9 #include "src/code-factory.h" |
9 #include "src/codegen.h" | 10 #include "src/codegen.h" |
10 #include "src/deoptimizer.h" | 11 #include "src/deoptimizer.h" |
11 #include "src/full-codegen.h" | 12 #include "src/full-codegen.h" |
12 | 13 |
13 namespace v8 { | 14 namespace v8 { |
14 namespace internal { | 15 namespace internal { |
15 | 16 |
16 | 17 |
17 #define __ ACCESS_MASM(masm) | 18 #define __ ACCESS_MASM(masm) |
18 | 19 |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 Register key = LoadDescriptor::NameRegister(); | 1070 Register key = LoadDescriptor::NameRegister(); |
1070 __ movp(key, Operand(rbp, kIndexOffset)); | 1071 __ movp(key, Operand(rbp, kIndexOffset)); |
1071 __ jmp(&entry); | 1072 __ jmp(&entry); |
1072 __ bind(&loop); | 1073 __ bind(&loop); |
1073 __ movp(receiver, Operand(rbp, kArgumentsOffset)); // load arguments | 1074 __ movp(receiver, Operand(rbp, kArgumentsOffset)); // load arguments |
1074 | 1075 |
1075 // Use inline caching to speed up access to arguments. | 1076 // Use inline caching to speed up access to arguments. |
1076 if (FLAG_vector_ics) { | 1077 if (FLAG_vector_ics) { |
1077 __ Move(VectorLoadICDescriptor::SlotRegister(), Smi::FromInt(0)); | 1078 __ Move(VectorLoadICDescriptor::SlotRegister(), Smi::FromInt(0)); |
1078 } | 1079 } |
1079 Handle<Code> ic = | 1080 Handle<Code> ic = CodeFactory::KeyedLoadIC(masm->isolate()).code(); |
1080 masm->isolate()->builtins()->KeyedLoadIC_Initialize(); | |
1081 __ Call(ic, RelocInfo::CODE_TARGET); | 1081 __ Call(ic, RelocInfo::CODE_TARGET); |
1082 // It is important that we do not have a test instruction after the | 1082 // It is important that we do not have a test instruction after the |
1083 // call. A test instruction after the call is used to indicate that | 1083 // call. A test instruction after the call is used to indicate that |
1084 // we have generated an inline version of the keyed load. In this | 1084 // we have generated an inline version of the keyed load. In this |
1085 // case, we know that we are not generating a test instruction next. | 1085 // case, we know that we are not generating a test instruction next. |
1086 | 1086 |
1087 // Push the nth argument. | 1087 // Push the nth argument. |
1088 __ Push(rax); | 1088 __ Push(rax); |
1089 | 1089 |
1090 // Update the index on the stack and in register key. | 1090 // Update the index on the stack and in register key. |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 __ bind(&ok); | 1517 __ bind(&ok); |
1518 __ ret(0); | 1518 __ ret(0); |
1519 } | 1519 } |
1520 | 1520 |
1521 | 1521 |
1522 #undef __ | 1522 #undef __ |
1523 | 1523 |
1524 } } // namespace v8::internal | 1524 } } // namespace v8::internal |
1525 | 1525 |
1526 #endif // V8_TARGET_ARCH_X64 | 1526 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |