Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/x64/virtual-frame-x64.cc

Issue 6474026: Strict mode assignment to undefined reference. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix presubmit. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 Result key = Pop(); 1112 Result key = Pop();
1113 Result receiver = Pop(); 1113 Result receiver = Pop();
1114 PrepareForCall(0, 0); 1114 PrepareForCall(0, 0);
1115 MoveResultsToRegisters(&key, &receiver, rax, rdx); 1115 MoveResultsToRegisters(&key, &receiver, rax, rdx);
1116 1116
1117 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); 1117 Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize));
1118 return RawCallCodeObject(ic, mode); 1118 return RawCallCodeObject(ic, mode);
1119 } 1119 }
1120 1120
1121 1121
1122 Result VirtualFrame::CallStoreIC(Handle<String> name, bool is_contextual) { 1122 Result VirtualFrame::CallStoreIC(Handle<String> name,
1123 bool is_contextual,
1124 StrictModeFlag strict_mode) {
1123 // Value and (if not contextual) receiver are on top of the frame. 1125 // Value and (if not contextual) receiver are on top of the frame.
1124 // The IC expects name in rcx, value in rax, and receiver in rdx. 1126 // The IC expects name in rcx, value in rax, and receiver in rdx.
1125 Handle<Code> ic(Builtins::builtin(Builtins::StoreIC_Initialize)); 1127 Handle<Code> ic(Builtins::builtin(strict_mode == kStrictMode
1128 ? Builtins::StoreIC_Initialize_Strict
1129 : Builtins::StoreIC_Initialize));
1126 Result value = Pop(); 1130 Result value = Pop();
1131 RelocInfo::Mode mode;
1127 if (is_contextual) { 1132 if (is_contextual) {
1128 PrepareForCall(0, 0); 1133 PrepareForCall(0, 0);
1129 value.ToRegister(rax); 1134 value.ToRegister(rax);
1130 __ movq(rdx, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX))); 1135 __ movq(rdx, Operand(rsi, Context::SlotOffset(Context::GLOBAL_INDEX)));
1131 value.Unuse(); 1136 value.Unuse();
1137 mode = RelocInfo::CODE_TARGET_CONTEXT;
1132 } else { 1138 } else {
1133 Result receiver = Pop(); 1139 Result receiver = Pop();
1134 PrepareForCall(0, 0); 1140 PrepareForCall(0, 0);
1135 MoveResultsToRegisters(&value, &receiver, rax, rdx); 1141 MoveResultsToRegisters(&value, &receiver, rax, rdx);
1142 mode = RelocInfo::CODE_TARGET;
1136 } 1143 }
1137 __ Move(rcx, name); 1144 __ Move(rcx, name);
1138 return RawCallCodeObject(ic, RelocInfo::CODE_TARGET); 1145 return RawCallCodeObject(ic, mode);
1139 } 1146 }
1140 1147
1141 1148
1142 Result VirtualFrame::CallKeyedStoreIC() { 1149 Result VirtualFrame::CallKeyedStoreIC() {
1143 // Value, key, and receiver are on the top of the frame. The IC 1150 // Value, key, and receiver are on the top of the frame. The IC
1144 // expects value in rax, key in rcx, and receiver in rdx. 1151 // expects value in rax, key in rcx, and receiver in rdx.
1145 Result value = Pop(); 1152 Result value = Pop();
1146 Result key = Pop(); 1153 Result key = Pop();
1147 Result receiver = Pop(); 1154 Result receiver = Pop();
1148 PrepareForCall(0, 0); 1155 PrepareForCall(0, 0);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 Adjust(kHandlerSize - 1); 1263 Adjust(kHandlerSize - 1);
1257 __ PushTryHandler(IN_JAVASCRIPT, type); 1264 __ PushTryHandler(IN_JAVASCRIPT, type);
1258 } 1265 }
1259 1266
1260 1267
1261 #undef __ 1268 #undef __
1262 1269
1263 } } // namespace v8::internal 1270 } } // namespace v8::internal
1264 1271
1265 #endif // V8_TARGET_ARCH_X64 1272 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/stub-cache.h ('K') | « src/x64/virtual-frame-x64.h ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698