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

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

Issue 9167011: Support inlining and crankshaft optimization of Math.random. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. Created 8 years, 11 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/lithium-x64.h ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2012 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
11 // with the distribution. 11 // with the distribution.
(...skipping 1396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 UseFixed(instr->right(), rdx); 1408 UseFixed(instr->right(), rdx);
1409 #else 1409 #else
1410 UseFixed(instr->right(), rdi); 1410 UseFixed(instr->right(), rdi);
1411 #endif 1411 #endif
1412 LPower* result = new LPower(left, right); 1412 LPower* result = new LPower(left, right);
1413 return MarkAsCall(DefineFixedDouble(result, xmm3), instr, 1413 return MarkAsCall(DefineFixedDouble(result, xmm3), instr,
1414 CAN_DEOPTIMIZE_EAGERLY); 1414 CAN_DEOPTIMIZE_EAGERLY);
1415 } 1415 }
1416 1416
1417 1417
1418 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1419 ASSERT(instr->representation().IsDouble());
1420 ASSERT(instr->global_object()->representation().IsTagged());
1421 #ifdef _WIN64
1422 LOperand* global_object = UseFixed(instr->global_object(), rcx);
1423 #else
1424 LOperand* global_object = UseFixed(instr->global_object(), rdi);
1425 #endif
1426 LRandom* result = new LRandom(global_object);
1427 return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
1428 }
1429
1430
1418 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1431 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1419 ASSERT(instr->left()->representation().IsTagged()); 1432 ASSERT(instr->left()->representation().IsTagged());
1420 ASSERT(instr->right()->representation().IsTagged()); 1433 ASSERT(instr->right()->representation().IsTagged());
1421 LOperand* left = UseFixed(instr->left(), rdx); 1434 LOperand* left = UseFixed(instr->left(), rdx);
1422 LOperand* right = UseFixed(instr->right(), rax); 1435 LOperand* right = UseFixed(instr->right(), rax);
1423 LCmpT* result = new LCmpT(left, right); 1436 LCmpT* result = new LCmpT(left, right);
1424 return MarkAsCall(DefineFixed(result, rax), instr); 1437 return MarkAsCall(DefineFixed(result, rax), instr);
1425 } 1438 }
1426 1439
1427 1440
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 LOperand* key = UseOrConstantAtStart(instr->key()); 2265 LOperand* key = UseOrConstantAtStart(instr->key());
2253 LOperand* object = UseOrConstantAtStart(instr->object()); 2266 LOperand* object = UseOrConstantAtStart(instr->object());
2254 LIn* result = new LIn(key, object); 2267 LIn* result = new LIn(key, object);
2255 return MarkAsCall(DefineFixed(result, rax), instr); 2268 return MarkAsCall(DefineFixed(result, rax), instr);
2256 } 2269 }
2257 2270
2258 2271
2259 } } // namespace v8::internal 2272 } } // namespace v8::internal
2260 2273
2261 #endif // V8_TARGET_ARCH_X64 2274 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698