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

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

Issue 338963003: KeyedLoadIC should have same register spec as LoadIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Last comment response. 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/ia32/lithium-ia32.cc ('k') | src/ic.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 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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 // receiver, name, scratch1, scratch2, scratch3, scratch4. 1285 // receiver, name, scratch1, scratch2, scratch3, scratch4.
1286 Register receiver = LoadIC::ReceiverRegister(); 1286 Register receiver = LoadIC::ReceiverRegister();
1287 Register name = LoadIC::NameRegister(); 1287 Register name = LoadIC::NameRegister();
1288 static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; 1288 static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
1289 return registers; 1289 return registers;
1290 } 1290 }
1291 1291
1292 1292
1293 Register* KeyedLoadStubCompiler::registers() { 1293 Register* KeyedLoadStubCompiler::registers() {
1294 // receiver, name, scratch1, scratch2, scratch3, scratch4. 1294 // receiver, name, scratch1, scratch2, scratch3, scratch4.
1295 Register receiver = KeyedLoadIC::ReceiverRegister(); 1295 Register receiver = LoadIC::ReceiverRegister();
1296 Register name = KeyedLoadIC::NameRegister(); 1296 Register name = LoadIC::NameRegister();
1297 static Register registers[] = { receiver, name, ebx, eax, edi, no_reg }; 1297 static Register registers[] = { receiver, name, ebx, eax, edi, no_reg };
1298 return registers; 1298 return registers;
1299 } 1299 }
1300 1300
1301 1301
1302 Register StoreStubCompiler::value() { 1302 Register StoreStubCompiler::value() {
1303 return eax; 1303 return eax;
1304 } 1304 }
1305 1305
1306 1306
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 #define __ ACCESS_MASM(masm) 1447 #define __ ACCESS_MASM(masm)
1448 1448
1449 1449
1450 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement( 1450 void KeyedLoadStubCompiler::GenerateLoadDictionaryElement(
1451 MacroAssembler* masm) { 1451 MacroAssembler* masm) {
1452 // ----------- S t a t e ------------- 1452 // ----------- S t a t e -------------
1453 // -- ecx : key 1453 // -- ecx : key
1454 // -- edx : receiver 1454 // -- edx : receiver
1455 // -- esp[0] : return address 1455 // -- esp[0] : return address
1456 // ----------------------------------- 1456 // -----------------------------------
1457 ASSERT(edx.is(KeyedLoadIC::ReceiverRegister())); 1457 ASSERT(edx.is(LoadIC::ReceiverRegister()));
1458 ASSERT(ecx.is(KeyedLoadIC::NameRegister())); 1458 ASSERT(ecx.is(LoadIC::NameRegister()));
1459 Label slow, miss; 1459 Label slow, miss;
1460 1460
1461 // This stub is meant to be tail-jumped to, the receiver must already 1461 // This stub is meant to be tail-jumped to, the receiver must already
1462 // have been verified by the caller to not be a smi. 1462 // have been verified by the caller to not be a smi.
1463 __ JumpIfNotSmi(ecx, &miss); 1463 __ JumpIfNotSmi(ecx, &miss);
1464 __ mov(ebx, ecx); 1464 __ mov(ebx, ecx);
1465 __ SmiUntag(ebx); 1465 __ SmiUntag(ebx);
1466 __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset)); 1466 __ mov(eax, FieldOperand(edx, JSObject::kElementsOffset));
1467 1467
1468 // Push receiver on the stack to free up a register for the dictionary 1468 // Push receiver on the stack to free up a register for the dictionary
(...skipping 22 matching lines...) Expand all
1491 // ----------------------------------- 1491 // -----------------------------------
1492 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1492 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1493 } 1493 }
1494 1494
1495 1495
1496 #undef __ 1496 #undef __
1497 1497
1498 } } // namespace v8::internal 1498 } } // namespace v8::internal
1499 1499
1500 #endif // V8_TARGET_ARCH_IA32 1500 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698