| 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/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
| (...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 | 886 |
| 887 | 887 |
| 888 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { | 888 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 889 // The return address is on the stack. | 889 // The return address is on the stack. |
| 890 Register receiver = ReceiverRegister(); | 890 Register receiver = ReceiverRegister(); |
| 891 Register name = NameRegister(); | 891 Register name = NameRegister(); |
| 892 ASSERT(receiver.is(edx)); | 892 ASSERT(receiver.is(edx)); |
| 893 ASSERT(name.is(ecx)); | 893 ASSERT(name.is(ecx)); |
| 894 | 894 |
| 895 // Probe the stub cache. | 895 // Probe the stub cache. |
| 896 Code::Flags flags = Code::ComputeHandlerFlags(Code::LOAD_IC); | 896 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 897 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
| 897 masm->isolate()->stub_cache()->GenerateProbe( | 898 masm->isolate()->stub_cache()->GenerateProbe( |
| 898 masm, flags, receiver, name, ebx, eax); | 899 masm, flags, receiver, name, ebx, eax); |
| 899 | 900 |
| 900 // Cache miss: Jump to runtime. | 901 // Cache miss: Jump to runtime. |
| 901 GenerateMiss(masm); | 902 GenerateMiss(masm); |
| 902 } | 903 } |
| 903 | 904 |
| 904 | 905 |
| 905 void LoadIC::GenerateNormal(MacroAssembler* masm) { | 906 void LoadIC::GenerateNormal(MacroAssembler* masm) { |
| 906 Register dictionary = eax; | 907 Register dictionary = eax; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 // Return address is on the stack. | 1003 // Return address is on the stack. |
| 1003 LoadIC_PushArgs(masm); | 1004 LoadIC_PushArgs(masm); |
| 1004 | 1005 |
| 1005 // Perform tail call to the entry. | 1006 // Perform tail call to the entry. |
| 1006 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 1007 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 1007 } | 1008 } |
| 1008 | 1009 |
| 1009 | 1010 |
| 1010 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 1011 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
| 1011 // Return address is on the stack. | 1012 // Return address is on the stack. |
| 1012 Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); | 1013 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 1014 Code::ComputeHandlerFlags(Code::STORE_IC)); |
| 1013 masm->isolate()->stub_cache()->GenerateProbe( | 1015 masm->isolate()->stub_cache()->GenerateProbe( |
| 1014 masm, flags, ReceiverRegister(), NameRegister(), | 1016 masm, flags, ReceiverRegister(), NameRegister(), |
| 1015 ebx, no_reg); | 1017 ebx, no_reg); |
| 1016 | 1018 |
| 1017 // Cache miss: Jump to runtime. | 1019 // Cache miss: Jump to runtime. |
| 1018 GenerateMiss(masm); | 1020 GenerateMiss(masm); |
| 1019 } | 1021 } |
| 1020 | 1022 |
| 1021 | 1023 |
| 1022 static void StoreIC_PushArgs(MacroAssembler* masm) { | 1024 static void StoreIC_PushArgs(MacroAssembler* masm) { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1204 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) | 1206 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) |
| 1205 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 1207 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
| 1206 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 1208 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
| 1207 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1209 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
| 1208 } | 1210 } |
| 1209 | 1211 |
| 1210 | 1212 |
| 1211 } } // namespace v8::internal | 1213 } } // namespace v8::internal |
| 1212 | 1214 |
| 1213 #endif // V8_TARGET_ARCH_IA32 | 1215 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |