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

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

Issue 82763005: Reland "Implement Math.random() purely in JavaScript" plus fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added assertion Created 7 years 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/mips/lithium-mips.h ('k') | src/objects.h » ('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 2012 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
(...skipping 1622 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 LOperand* right = exponent_type.IsDouble() ? 1633 LOperand* right = exponent_type.IsDouble() ?
1634 UseFixedDouble(instr->right(), f4) : 1634 UseFixedDouble(instr->right(), f4) :
1635 UseFixed(instr->right(), a2); 1635 UseFixed(instr->right(), a2);
1636 LPower* result = new(zone()) LPower(left, right); 1636 LPower* result = new(zone()) LPower(left, right);
1637 return MarkAsCall(DefineFixedDouble(result, f0), 1637 return MarkAsCall(DefineFixedDouble(result, f0),
1638 instr, 1638 instr,
1639 CAN_DEOPTIMIZE_EAGERLY); 1639 CAN_DEOPTIMIZE_EAGERLY);
1640 } 1640 }
1641 1641
1642 1642
1643 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1644 ASSERT(instr->representation().IsDouble());
1645 ASSERT(instr->global_object()->representation().IsTagged());
1646 LOperand* global_object = UseTempRegister(instr->global_object());
1647 LOperand* scratch = TempRegister();
1648 LOperand* scratch2 = TempRegister();
1649 LOperand* scratch3 = TempRegister();
1650 LRandom* result = new(zone()) LRandom(
1651 global_object, scratch, scratch2, scratch3);
1652 return DefineFixedDouble(result, f0);
1653 }
1654
1655
1656 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1643 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1657 ASSERT(instr->left()->representation().IsTagged()); 1644 ASSERT(instr->left()->representation().IsTagged());
1658 ASSERT(instr->right()->representation().IsTagged()); 1645 ASSERT(instr->right()->representation().IsTagged());
1659 LOperand* context = UseFixed(instr->context(), cp); 1646 LOperand* context = UseFixed(instr->context(), cp);
1660 LOperand* left = UseFixed(instr->left(), a1); 1647 LOperand* left = UseFixed(instr->left(), a1);
1661 LOperand* right = UseFixed(instr->right(), a0); 1648 LOperand* right = UseFixed(instr->right(), a0);
1662 LCmpT* result = new(zone()) LCmpT(context, left, right); 1649 LCmpT* result = new(zone()) LCmpT(context, left, right);
1663 return MarkAsCall(DefineFixed(result, v0), instr); 1650 return MarkAsCall(DefineFixed(result, v0), instr);
1664 } 1651 }
1665 1652
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 2588
2602 2589
2603 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2590 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2604 LOperand* object = UseRegister(instr->object()); 2591 LOperand* object = UseRegister(instr->object());
2605 LOperand* index = UseRegister(instr->index()); 2592 LOperand* index = UseRegister(instr->index());
2606 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2593 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2607 } 2594 }
2608 2595
2609 2596
2610 } } // namespace v8::internal 2597 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698