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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 385073007: Revert "Use the same registers for StoreIC and KeyedStoreIC." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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
« no previous file with comments | « src/x64/ic-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 Register* StoreStubCompiler::registers() { 1246 Register* StoreStubCompiler::registers() {
1247 // receiver, name, scratch1, scratch2, scratch3. 1247 // receiver, name, scratch1, scratch2, scratch3.
1248 Register receiver = KeyedStoreIC::ReceiverRegister(); 1248 Register receiver = KeyedStoreIC::ReceiverRegister();
1249 Register name = KeyedStoreIC::NameRegister(); 1249 Register name = KeyedStoreIC::NameRegister();
1250 static Register registers[] = { receiver, name, rbx, rdi, r8 }; 1250 static Register registers[] = { receiver, name, rbx, rdi, r8 };
1251 return registers; 1251 return registers;
1252 } 1252 }
1253 1253
1254 1254
1255 Register* KeyedStoreStubCompiler::registers() { 1255 Register* KeyedStoreStubCompiler::registers() {
1256 // receiver, name, scratch1/map, scratch2, scratch3. 1256 // receiver, name, scratch1, scratch2, scratch3.
1257 Register receiver = KeyedStoreIC::ReceiverRegister(); 1257 Register receiver = KeyedStoreIC::ReceiverRegister();
1258 Register name = KeyedStoreIC::NameRegister(); 1258 Register name = KeyedStoreIC::NameRegister();
1259 Register map = KeyedStoreIC::MapRegister(); 1259 static Register registers[] = { receiver, name, rbx, rdi, r8 };
1260 static Register registers[] = { receiver, name, map, rdi, r8 };
1261 return registers; 1260 return registers;
1262 } 1261 }
1263 1262
1264 1263
1265 #undef __ 1264 #undef __
1266 #define __ ACCESS_MASM(masm) 1265 #define __ ACCESS_MASM(masm)
1267 1266
1268 1267
1269 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, 1268 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
1270 Handle<HeapType> type, 1269 Handle<HeapType> type,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 if (check == PROPERTY && 1354 if (check == PROPERTY &&
1356 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { 1355 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
1357 __ Cmp(this->name(), name); 1356 __ Cmp(this->name(), name);
1358 __ j(not_equal, &miss); 1357 __ j(not_equal, &miss);
1359 } 1358 }
1360 1359
1361 Label number_case; 1360 Label number_case;
1362 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 1361 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
1363 __ JumpIfSmi(receiver(), smi_target); 1362 __ JumpIfSmi(receiver(), smi_target);
1364 1363
1365 // Polymorphic keyed stores may use the map register
1366 Register map_reg = scratch1(); 1364 Register map_reg = scratch1();
1367 ASSERT(kind() != Code::KEYED_STORE_IC ||
1368 map_reg.is(KeyedStoreIC::MapRegister()));
1369 __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset)); 1365 __ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
1370 int receiver_count = types->length(); 1366 int receiver_count = types->length();
1371 int number_of_handled_maps = 0; 1367 int number_of_handled_maps = 0;
1372 for (int current = 0; current < receiver_count; ++current) { 1368 for (int current = 0; current < receiver_count; ++current) {
1373 Handle<HeapType> type = types->at(current); 1369 Handle<HeapType> type = types->at(current);
1374 Handle<Map> map = IC::TypeToMap(*type, isolate()); 1370 Handle<Map> map = IC::TypeToMap(*type, isolate());
1375 if (!map->is_deprecated()) { 1371 if (!map->is_deprecated()) {
1376 number_of_handled_maps++; 1372 number_of_handled_maps++;
1377 // Check map and tail call if there's a match 1373 // Check map and tail call if there's a match
1378 __ Cmp(map_reg, map); 1374 __ Cmp(map_reg, map);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 // ----------------------------------- 1437 // -----------------------------------
1442 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1438 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1443 } 1439 }
1444 1440
1445 1441
1446 #undef __ 1442 #undef __
1447 1443
1448 } } // namespace v8::internal 1444 } } // namespace v8::internal
1449 1445
1450 #endif // V8_TARGET_ARCH_X64 1446 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698