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

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

Issue 558067: Remove StoreIC::Generate, and inline StoreIC::GenerateInitialize. (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/ic.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 1319
1320 // The offset is in the 32-bit displacement of a seven byte 1320 // The offset is in the 32-bit displacement of a seven byte
1321 // memory-to-register move instruction (REX.W 0x88 ModR/M disp32), 1321 // memory-to-register move instruction (REX.W 0x88 ModR/M disp32),
1322 // so we add 3 to get the offset of the displacement. 1322 // so we add 3 to get the offset of the displacement.
1323 Address offset_address = 1323 Address offset_address =
1324 test_instruction_address + delta + kOffsetToLoadInstruction + 3; 1324 test_instruction_address + delta + kOffsetToLoadInstruction + 3;
1325 *reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag; 1325 *reinterpret_cast<int*>(offset_address) = offset - kHeapObjectTag;
1326 return true; 1326 return true;
1327 } 1327 }
1328 1328
1329 void StoreIC::Generate(MacroAssembler* masm, ExternalReference const& f) { 1329 void StoreIC::GenerateMiss(MacroAssembler* masm) {
1330 // ----------- S t a t e ------------- 1330 // ----------- S t a t e -------------
1331 // -- rax : value 1331 // -- rax : value
1332 // -- rcx : name 1332 // -- rcx : name
1333 // -- rsp[0] : return address 1333 // -- rsp[0] : return address
1334 // -- rsp[8] : receiver 1334 // -- rsp[8] : receiver
1335 // ----------------------------------- 1335 // -----------------------------------
1336 1336
1337 __ pop(rbx); 1337 __ pop(rbx);
1338 __ push(Operand(rsp, 0)); // receiver 1338 __ push(Operand(rsp, 0)); // receiver
1339 __ push(rcx); // name 1339 __ push(rcx); // name
1340 __ push(rax); // value 1340 __ push(rax); // value
1341 __ push(rbx); // return address 1341 __ push(rbx); // return address
1342 1342
1343 // Perform tail call to the entry. 1343 // Perform tail call to the entry.
1344 __ TailCallRuntime(f, 3, 1); 1344 __ TailCallRuntime(ExternalReference(IC_Utility(kStoreIC_Miss)), 3, 1);
1345 } 1345 }
1346 1346
1347 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) { 1347 void StoreIC::GenerateExtendStorage(MacroAssembler* masm) {
1348 // ----------- S t a t e ------------- 1348 // ----------- S t a t e -------------
1349 // -- rax : value 1349 // -- rax : value
1350 // -- rcx : Map (target of map transition) 1350 // -- rcx : Map (target of map transition)
1351 // -- rsp[0] : return address 1351 // -- rsp[0] : return address
1352 // -- rsp[8] : receiver 1352 // -- rsp[8] : receiver
1353 // ----------------------------------- 1353 // -----------------------------------
1354 1354
(...skipping 17 matching lines...) Expand all
1372 // ----------------------------------- 1372 // -----------------------------------
1373 1373
1374 // Get the receiver from the stack and probe the stub cache. 1374 // Get the receiver from the stack and probe the stub cache.
1375 __ movq(rdx, Operand(rsp, kPointerSize)); 1375 __ movq(rdx, Operand(rsp, kPointerSize));
1376 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC, 1376 Code::Flags flags = Code::ComputeFlags(Code::STORE_IC,
1377 NOT_IN_LOOP, 1377 NOT_IN_LOOP,
1378 MONOMORPHIC); 1378 MONOMORPHIC);
1379 StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg); 1379 StubCache::GenerateProbe(masm, flags, rdx, rcx, rbx, no_reg);
1380 1380
1381 // Cache miss: Jump to runtime. 1381 // Cache miss: Jump to runtime.
1382 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 1382 GenerateMiss(masm);
1383 } 1383 }
1384 1384
1385 1385
1386 #undef __ 1386 #undef __
1387 1387
1388 1388
1389 } } // namespace v8::internal 1389 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698