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

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

Issue 9167011: Support inlining and crankshaft optimization of Math.random. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
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 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 LOperand* right = exponent_type.IsDouble() ? 1420 LOperand* right = exponent_type.IsDouble() ?
1421 UseFixedDouble(instr->right(), d2) : 1421 UseFixedDouble(instr->right(), d2) :
1422 UseFixed(instr->right(), r2); 1422 UseFixed(instr->right(), r2);
1423 LPower* result = new LPower(left, right); 1423 LPower* result = new LPower(left, right);
1424 return MarkAsCall(DefineFixedDouble(result, d3), 1424 return MarkAsCall(DefineFixedDouble(result, d3),
1425 instr, 1425 instr,
1426 CAN_DEOPTIMIZE_EAGERLY); 1426 CAN_DEOPTIMIZE_EAGERLY);
1427 } 1427 }
1428 1428
1429 1429
1430 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1431 ASSERT(instr->representation().IsDouble());
1432 ASSERT(instr->global_object()->representation().IsTagged());
1433 LOperand* global_object = UseFixed(instr->global_object(), r0);
1434 LRandom* result = new LRandom(global_object);
1435 return MarkAsCall(DefineFixedDouble(result, d7),
1436 instr,
1437 CAN_DEOPTIMIZE_EAGERLY);
1438 }
1439
1440
1430 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1441 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1431 ASSERT(instr->left()->representation().IsTagged()); 1442 ASSERT(instr->left()->representation().IsTagged());
1432 ASSERT(instr->right()->representation().IsTagged()); 1443 ASSERT(instr->right()->representation().IsTagged());
1433 LOperand* left = UseFixed(instr->left(), r1); 1444 LOperand* left = UseFixed(instr->left(), r1);
1434 LOperand* right = UseFixed(instr->right(), r0); 1445 LOperand* right = UseFixed(instr->right(), r0);
1435 LCmpT* result = new LCmpT(left, right); 1446 LCmpT* result = new LCmpT(left, right);
1436 return MarkAsCall(DefineFixed(result, r0), instr); 1447 return MarkAsCall(DefineFixed(result, r0), instr);
1437 } 1448 }
1438 1449
1439 1450
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 2264
2254 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2265 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2255 LOperand* key = UseRegisterAtStart(instr->key()); 2266 LOperand* key = UseRegisterAtStart(instr->key());
2256 LOperand* object = UseRegisterAtStart(instr->object()); 2267 LOperand* object = UseRegisterAtStart(instr->object());
2257 LIn* result = new LIn(key, object); 2268 LIn* result = new LIn(key, object);
2258 return MarkAsCall(DefineFixed(result, r0), instr); 2269 return MarkAsCall(DefineFixed(result, r0), instr);
2259 } 2270 }
2260 2271
2261 2272
2262 } } // namespace v8::internal 2273 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698