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

Side by Side Diff: src/arm64/stub-cache-arm64.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/arm64/ic-arm64.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
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 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1269 Register* StoreStubCompiler::registers() { 1269 Register* StoreStubCompiler::registers() {
1270 // receiver, value, scratch1, scratch2, scratch3. 1270 // receiver, value, scratch1, scratch2, scratch3.
1271 Register receiver = StoreIC::ReceiverRegister(); 1271 Register receiver = StoreIC::ReceiverRegister();
1272 Register name = StoreIC::NameRegister(); 1272 Register name = StoreIC::NameRegister();
1273 static Register registers[] = { receiver, name, x3, x4, x5 }; 1273 static Register registers[] = { receiver, name, x3, x4, x5 };
1274 return registers; 1274 return registers;
1275 } 1275 }
1276 1276
1277 1277
1278 Register* KeyedStoreStubCompiler::registers() { 1278 Register* KeyedStoreStubCompiler::registers() {
1279 // receiver, name, scratch1/map, scratch2, scratch3. 1279 // receiver, name, scratch1, scratch2, scratch3.
1280 Register receiver = KeyedStoreIC::ReceiverRegister(); 1280 Register receiver = KeyedStoreIC::ReceiverRegister();
1281 Register name = KeyedStoreIC::NameRegister(); 1281 Register name = KeyedStoreIC::NameRegister();
1282 Register map = KeyedStoreIC::MapRegister(); 1282 static Register registers[] = { receiver, name, x3, x4, x5 };
1283 static Register registers[] = { receiver, name, map, x4, x5 };
1284 return registers; 1283 return registers;
1285 } 1284 }
1286 1285
1287 1286
1288 #undef __ 1287 #undef __
1289 #define __ ACCESS_MASM(masm) 1288 #define __ ACCESS_MASM(masm)
1290 1289
1291 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, 1290 void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
1292 Handle<HeapType> type, 1291 Handle<HeapType> type,
1293 Register receiver, 1292 Register receiver,
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 1363
1365 if (check == PROPERTY && 1364 if (check == PROPERTY &&
1366 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { 1365 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) {
1367 __ CompareAndBranch(this->name(), Operand(name), ne, &miss); 1366 __ CompareAndBranch(this->name(), Operand(name), ne, &miss);
1368 } 1367 }
1369 1368
1370 Label number_case; 1369 Label number_case;
1371 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; 1370 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss;
1372 __ JumpIfSmi(receiver(), smi_target); 1371 __ JumpIfSmi(receiver(), smi_target);
1373 1372
1374 // Polymorphic keyed stores may use the map register
1375 Register map_reg = scratch1(); 1373 Register map_reg = scratch1();
1376 ASSERT(kind() != Code::KEYED_STORE_IC ||
1377 map_reg.is(KeyedStoreIC::MapRegister()));
1378 __ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset)); 1374 __ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
1379 int receiver_count = types->length(); 1375 int receiver_count = types->length();
1380 int number_of_handled_maps = 0; 1376 int number_of_handled_maps = 0;
1381 for (int current = 0; current < receiver_count; ++current) { 1377 for (int current = 0; current < receiver_count; ++current) {
1382 Handle<HeapType> type = types->at(current); 1378 Handle<HeapType> type = types->at(current);
1383 Handle<Map> map = IC::TypeToMap(*type, isolate()); 1379 Handle<Map> map = IC::TypeToMap(*type, isolate());
1384 if (!map->is_deprecated()) { 1380 if (!map->is_deprecated()) {
1385 number_of_handled_maps++; 1381 number_of_handled_maps++;
1386 Label try_next; 1382 Label try_next;
1387 __ Cmp(map_reg, Operand(map)); 1383 __ Cmp(map_reg, Operand(map));
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 1473
1478 // Miss case, call the runtime. 1474 // Miss case, call the runtime.
1479 __ Bind(&miss); 1475 __ Bind(&miss);
1480 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1476 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1481 } 1477 }
1482 1478
1483 1479
1484 } } // namespace v8::internal 1480 } } // namespace v8::internal
1485 1481
1486 #endif // V8_TARGET_ARCH_ARM64 1482 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/ic-arm64.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698