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_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
996 // Copy all arguments from the array to the stack. | 996 // Copy all arguments from the array to the stack. |
997 Label entry, loop; | 997 Label entry, loop; |
998 Register receiver = LoadIC::ReceiverRegister(); | 998 Register receiver = LoadIC::ReceiverRegister(); |
999 Register key = LoadIC::NameRegister(); | 999 Register key = LoadIC::NameRegister(); |
1000 __ mov(key, Operand(ebp, kIndexOffset)); | 1000 __ mov(key, Operand(ebp, kIndexOffset)); |
1001 __ jmp(&entry); | 1001 __ jmp(&entry); |
1002 __ bind(&loop); | 1002 __ bind(&loop); |
1003 __ mov(receiver, Operand(ebp, kArgumentsOffset)); // load arguments | 1003 __ mov(receiver, Operand(ebp, kArgumentsOffset)); // load arguments |
1004 | 1004 |
1005 // Use inline caching to speed up access to arguments. | 1005 // Use inline caching to speed up access to arguments. |
| 1006 if (FLAG_vector_ics) { |
| 1007 __ mov(LoadIC::SlotRegister(), Immediate(Smi::FromInt(0))); |
| 1008 } |
1006 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Initialize(); | 1009 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Initialize(); |
1007 __ call(ic, RelocInfo::CODE_TARGET); | 1010 __ call(ic, RelocInfo::CODE_TARGET); |
1008 // It is important that we do not have a test instruction after the | 1011 // It is important that we do not have a test instruction after the |
1009 // call. A test instruction after the call is used to indicate that | 1012 // call. A test instruction after the call is used to indicate that |
1010 // we have generated an inline version of the keyed load. In this | 1013 // we have generated an inline version of the keyed load. In this |
1011 // case, we know that we are not generating a test instruction next. | 1014 // case, we know that we are not generating a test instruction next. |
1012 | 1015 |
1013 // Push the nth argument. | 1016 // Push the nth argument. |
1014 __ push(eax); | 1017 __ push(eax); |
1015 | 1018 |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 | 1448 |
1446 __ bind(&ok); | 1449 __ bind(&ok); |
1447 __ ret(0); | 1450 __ ret(0); |
1448 } | 1451 } |
1449 | 1452 |
1450 #undef __ | 1453 #undef __ |
1451 } | 1454 } |
1452 } // namespace v8::internal | 1455 } // namespace v8::internal |
1453 | 1456 |
1454 #endif // V8_TARGET_ARCH_X87 | 1457 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |