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

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: 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/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 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), instr);
1436 }
1437
1438
1430 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1439 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1431 ASSERT(instr->left()->representation().IsTagged()); 1440 ASSERT(instr->left()->representation().IsTagged());
1432 ASSERT(instr->right()->representation().IsTagged()); 1441 ASSERT(instr->right()->representation().IsTagged());
1433 LOperand* left = UseFixed(instr->left(), r1); 1442 LOperand* left = UseFixed(instr->left(), r1);
1434 LOperand* right = UseFixed(instr->right(), r0); 1443 LOperand* right = UseFixed(instr->right(), r0);
1435 LCmpT* result = new LCmpT(left, right); 1444 LCmpT* result = new LCmpT(left, right);
1436 return MarkAsCall(DefineFixed(result, r0), instr); 1445 return MarkAsCall(DefineFixed(result, r0), instr);
1437 } 1446 }
1438 1447
1439 1448
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2253 2262
2254 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2263 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2255 LOperand* key = UseRegisterAtStart(instr->key()); 2264 LOperand* key = UseRegisterAtStart(instr->key());
2256 LOperand* object = UseRegisterAtStart(instr->object()); 2265 LOperand* object = UseRegisterAtStart(instr->object());
2257 LIn* result = new LIn(key, object); 2266 LIn* result = new LIn(key, object);
2258 return MarkAsCall(DefineFixed(result, r0), instr); 2267 return MarkAsCall(DefineFixed(result, r0), instr);
2259 } 2268 }
2260 2269
2261 2270
2262 } } // namespace v8::internal 2271 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698