| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 Result key = Pop(); | 1026 Result key = Pop(); |
| 1027 Result receiver = Pop(); | 1027 Result receiver = Pop(); |
| 1028 PrepareForCall(0, 0); | 1028 PrepareForCall(0, 0); |
| 1029 MoveResultsToRegisters(&key, &receiver, eax, edx); | 1029 MoveResultsToRegisters(&key, &receiver, eax, edx); |
| 1030 | 1030 |
| 1031 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); | 1031 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); |
| 1032 return RawCallCodeObject(ic, mode); | 1032 return RawCallCodeObject(ic, mode); |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 | 1035 |
| 1036 Result VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) { | 1036 Result VirtualFrame::CallStoreIC(Handle<String> name, |
| 1037 bool is_contextual, |
| 1038 StrictModeFlag strict_mode) { |
| 1037 // Value and (if not contextual) receiver are on top of the frame. | 1039 // Value and (if not contextual) receiver are on top of the frame. |
| 1038 // The IC expects name in ecx, value in eax, and receiver in edx. | 1040 // The IC expects name in ecx, value in eax, and receiver in edx. |
| 1039 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); | 1041 Handle<Code> ic(Builtins::builtin(strict_mode == kStrictMode |
| 1042 ? Builtins::StoreIC_Initialize_Strict |
| 1043 : Builtins::StoreIC_Initialize)); |
| 1044 |
| 1040 Result value = Pop(); | 1045 Result value = Pop(); |
| 1046 RelocInfo::Mode mode; |
| 1041 if (is_contextual) { | 1047 if (is_contextual) { |
| 1042 PrepareForCall(0, 0); | 1048 PrepareForCall(0, 0); |
| 1043 value.ToRegister(eax); | 1049 value.ToRegister(eax); |
| 1044 __ mov(edx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); | 1050 __ mov(edx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); |
| 1045 value.Unuse(); | 1051 value.Unuse(); |
| 1052 mode = RelocInfo::CODE_TARGET_CONTEXT; |
| 1046 } else { | 1053 } else { |
| 1047 Result receiver = Pop(); | 1054 Result receiver = Pop(); |
| 1048 PrepareForCall(0, 0); | 1055 PrepareForCall(0, 0); |
| 1049 MoveResultsToRegisters(&value, &receiver, eax, edx); | 1056 MoveResultsToRegisters(&value, &receiver, eax, edx); |
| 1057 mode = RelocInfo::CODE_TARGET; |
| 1050 } | 1058 } |
| 1051 __ mov(ecx, name); | 1059 __ mov(ecx, name); |
| 1052 return RawCallCodeObject(ic, RelocInfo::CODE_TARGET); | 1060 return RawCallCodeObject(ic, mode); |
| 1053 } | 1061 } |
| 1054 | 1062 |
| 1055 | 1063 |
| 1056 Result VirtualFrame::CallKeyedStoreIC() { | 1064 Result VirtualFrame::CallKeyedStoreIC() { |
| 1057 // Value, key, and receiver are on the top of the frame. The IC | 1065 // Value, key, and receiver are on the top of the frame. The IC |
| 1058 // expects value in eax, key in ecx, and receiver in edx. | 1066 // expects value in eax, key in ecx, and receiver in edx. |
| 1059 Result value = Pop(); | 1067 Result value = Pop(); |
| 1060 Result key = Pop(); | 1068 Result key = Pop(); |
| 1061 Result receiver = Pop(); | 1069 Result receiver = Pop(); |
| 1062 PrepareForCall(0, 0); | 1070 PrepareForCall(0, 0); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 } | 1334 } |
| 1327 UNREACHABLE(); | 1335 UNREACHABLE(); |
| 1328 } | 1336 } |
| 1329 | 1337 |
| 1330 | 1338 |
| 1331 #undef __ | 1339 #undef __ |
| 1332 | 1340 |
| 1333 } } // namespace v8::internal | 1341 } } // namespace v8::internal |
| 1334 | 1342 |
| 1335 #endif // V8_TARGET_ARCH_IA32 | 1343 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |