| 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 __ bind(&loop); | 1049 __ bind(&loop); |
| 1050 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments | 1050 __ mov(receiver, Operand(ebp, argumentsOffset)); // load arguments |
| 1051 | 1051 |
| 1052 // Use inline caching to speed up access to arguments. | 1052 // Use inline caching to speed up access to arguments. |
| 1053 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); | 1053 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC); |
| 1054 Handle<TypeFeedbackVector> feedback_vector = | 1054 Handle<TypeFeedbackVector> feedback_vector = |
| 1055 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); | 1055 masm->isolate()->factory()->NewTypeFeedbackVector(&spec); |
| 1056 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); | 1056 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0)); |
| 1057 __ mov(slot, Immediate(Smi::FromInt(index))); | 1057 __ mov(slot, Immediate(Smi::FromInt(index))); |
| 1058 __ mov(vector, Immediate(feedback_vector)); | 1058 __ mov(vector, Immediate(feedback_vector)); |
| 1059 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode(); | 1059 Handle<Code> ic = |
| 1060 KeyedLoadICStub(masm->isolate(), LoadICState(kNoExtraICState)).GetCode(); |
| 1060 __ call(ic, RelocInfo::CODE_TARGET); | 1061 __ call(ic, RelocInfo::CODE_TARGET); |
| 1061 // It is important that we do not have a test instruction after the | 1062 // It is important that we do not have a test instruction after the |
| 1062 // call. A test instruction after the call is used to indicate that | 1063 // call. A test instruction after the call is used to indicate that |
| 1063 // we have generated an inline version of the keyed load. In this | 1064 // we have generated an inline version of the keyed load. In this |
| 1064 // case, we know that we are not generating a test instruction next. | 1065 // case, we know that we are not generating a test instruction next. |
| 1065 | 1066 |
| 1066 // Push the nth argument. | 1067 // Push the nth argument. |
| 1067 __ push(eax); | 1068 __ push(eax); |
| 1068 | 1069 |
| 1069 // Update the index on the stack and in register key. | 1070 // Update the index on the stack and in register key. |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1706 | 1707 |
| 1707 __ bind(&ok); | 1708 __ bind(&ok); |
| 1708 __ ret(0); | 1709 __ ret(0); |
| 1709 } | 1710 } |
| 1710 | 1711 |
| 1711 #undef __ | 1712 #undef __ |
| 1712 } // namespace internal | 1713 } // namespace internal |
| 1713 } // namespace v8 | 1714 } // namespace v8 |
| 1714 | 1715 |
| 1715 #endif // V8_TARGET_ARCH_IA32 | 1716 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |