| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 Register receiver = LoadDescriptor::ReceiverRegister(); | 1097 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 1098 Register key = LoadDescriptor::NameRegister(); | 1098 Register key = LoadDescriptor::NameRegister(); |
| 1099 Register slot = LoadDescriptor::SlotRegister(); | 1099 Register slot = LoadDescriptor::SlotRegister(); |
| 1100 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 1100 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
| 1101 __ mov(key, Operand(ebp, indexOffset)); | 1101 __ mov(key, Operand(ebp, indexOffset)); |
| 1102 __ jmp(&entry); | 1102 __ jmp(&entry); |
| 1103 __ bind(&loop); | 1103 __ bind(&loop); |
| 1104 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments | 1104 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments |
| 1105 | 1105 |
| 1106 // Use inline caching to speed up access to arguments. | 1106 // Use inline caching to speed up access to arguments. |
| 1107 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); | 1107 Code::Kind kinds[] = {Code::KEYED_LOAD_IC}; |
| 1108 FeedbackVectorSpec spec(0, 1, kinds); |
| 1108 Handle<TypeFeedbackVector> feedback_vector = | 1109 Handle<TypeFeedbackVector> feedback_vector = |
| 1109 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); | 1110 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); |
| 1110 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); | 1111 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 1111 __ mov(slot, Immediate(Smi::FromInt(index))); | 1112 __ mov(slot, Immediate(Smi::FromInt(index))); |
| 1112 __ mov(vector, Immediate(feedback_vector)); | 1113 __ mov(vector, Immediate(feedback_vector)); |
| 1113 Handle<Code> ic = | 1114 Handle<Code> ic = |
| 1114 KeyedLoadICStub(masm->isolate(), LoadICState(kNoExtraICState)).GetCode(); | 1115 KeyedLoadICStub(masm->isolate(), LoadICState(kNoExtraICState)).GetCode(); |
| 1115 __ call(ic, RelocInfo::CODE_TARGET); | 1116 __ call(ic, RelocInfo::CODE_TARGET); |
| 1116 // It is important that we do not have a test instruction after the | 1117 // It is important that we do not have a test instruction after the |
| 1117 // call. A test instruction after the call is used to indicate that | 1118 // call. A test instruction after the call is used to indicate that |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 | 1760 |
| 1760 __ bind(&ok); | 1761 __ bind(&ok); |
| 1761 __ ret(0); | 1762 __ ret(0); |
| 1762 } | 1763 } |
| 1763 | 1764 |
| 1764 #undef __ | 1765 #undef __ |
| 1765 } // namespace internal | 1766 } // namespace internal |
| 1766 } // namespace v8 | 1767 } // namespace v8 |
| 1767 | 1768 |
| 1768 #endif // V8_TARGET_ARCH_IA32 | 1769 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |