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

Side by Side Diff: src/ia32/ic-ia32.cc

Issue 555162: StoreIC interface changed on ia32 to take receiver in edx, not on stack. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 1372
1373 // Perform tail call to the entry. 1373 // Perform tail call to the entry.
1374 __ TailCallRuntime(f, 2, 1); 1374 __ TailCallRuntime(f, 2, 1);
1375 } 1375 }
1376 1376
1377 1377
1378 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 1378 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
1379 // ----------- S t a t e ------------- 1379 // ----------- S t a t e -------------
1380 // -- eax : value 1380 // -- eax : value
1381 // -- ecx : name 1381 // -- ecx : name
1382 // -- edx : receiver
1382 // -- esp[0] : return address 1383 // -- esp[0] : return address
1383 // -- esp[4] : receiver
1384 // ----------------------------------- 1384 // -----------------------------------
1385 1385
1386 // Get the receiver from the stack and probe the stub cache.
1387 __ mov(edx, Operand(esp, 4));
1388 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, 1386 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC,
1389 NOT_IN_LOOP, 1387 NOT_IN_LOOP,
1390 MONOMORPHIC); 1388 MONOMORPHIC);
1391 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg); 1389 StubCache::GenerateProbe(masm, flags, edx, ecx, ebx, no_reg);
1392 1390
1393 // Cache miss: Jump to runtime. 1391 // Cache miss: Jump to runtime.
1394 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 1392 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss)));
1395 } 1393 }
1396 1394
1397 1395
1398 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { 1396 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) {
1399 // ----------- S t a t e ------------- 1397 // ----------- S t a t e -------------
1400 // -- eax : value 1398 // -- eax : value
1401 // -- ecx : transition map 1399 // -- ecx : transition map
1400 // -- edx : receiver
1402 // -- esp[0] : return address 1401 // -- esp[0] : return address
1403 // -- esp[4] : receiver
1404 // ----------------------------------- 1402 // -----------------------------------
1405 1403
1406 __ pop(ebx); 1404 __ pop(ebx);
1407 __ push(Operand(esp, 0)); // receiver 1405 __ push(edx); // receiver
1408 __ push(ecx); // transition map 1406 __ push(ecx); // transition map
1409 __ push(eax); // value 1407 __ push(eax); // value
1410 __ push(ebx); // return address 1408 __ push(ebx); // return address
1411 1409
1412 // Perform tail call to the entry. 1410 // Perform tail call to the entry.
1413 __ TailCallRuntime( 1411 __ TailCallRuntime(
1414 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); 1412 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1);
1415 } 1413 }
1416 1414
1417 1415
1418 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) { 1416 void StoreIC::Generate(MacroAssembler* masm, const ExternalReference& f) {
1419 // ----------- S t a t e ------------- 1417 // ----------- S t a t e -------------
1420 // -- eax : value 1418 // -- eax : value
1421 // -- ecx : name 1419 // -- ecx : name
1420 // -- edx : receiver
1422 // -- esp[0] : return address 1421 // -- esp[0] : return address
1423 // -- esp[4] : receiver
1424 // ----------------------------------- 1422 // -----------------------------------
1425 1423
1426 __ pop(ebx); 1424 __ pop(ebx);
1427 __ push(Operand(esp, 0)); 1425 __ push(edx);
1428 __ push(ecx); 1426 __ push(ecx);
1429 __ push(eax); 1427 __ push(eax);
1430 __ push(ebx); 1428 __ push(ebx);
1431 1429
1432 // Perform tail call to the entry. 1430 // Perform tail call to the entry.
1433 __ TailCallRuntime(f, 3, 1); 1431 __ TailCallRuntime(f, 3, 1);
1434 } 1432 }
1435 1433
1436 1434
1437 // Defined in ic.cc. 1435 // Defined in ic.cc.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 1471
1474 // Do tail-call to runtime routine. 1472 // Do tail-call to runtime routine.
1475 __ TailCallRuntime( 1473 __ TailCallRuntime(
1476 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1); 1474 ExternalReference(IC_Utility(kSharedStoreIC_ExtendStorage)), 3, 1);
1477 } 1475 }
1478 1476
1479 #undef __ 1477 #undef __
1480 1478
1481 1479
1482 } } // namespace v8::internal 1480 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698