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

Side by Side Diff: src/arm/lithium-arm.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, 1 month 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 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 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 LOperand* right = exponent_type.IsDouble() ? 1713 LOperand* right = exponent_type.IsDouble() ?
1714 UseFixedDouble(instr->right(), d2) : 1714 UseFixedDouble(instr->right(), d2) :
1715 UseFixed(instr->right(), r2); 1715 UseFixed(instr->right(), r2);
1716 LPower* result = new(zone()) LPower(left, right); 1716 LPower* result = new(zone()) LPower(left, right);
1717 return MarkAsCall(DefineFixedDouble(result, d3), 1717 return MarkAsCall(DefineFixedDouble(result, d3),
1718 instr, 1718 instr,
1719 CAN_DEOPTIMIZE_EAGERLY); 1719 CAN_DEOPTIMIZE_EAGERLY);
1720 } 1720 }
1721 1721
1722 1722
1723 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1724 ASSERT(instr->representation().IsDouble());
1725 ASSERT(instr->global_object()->representation().IsTagged());
1726 LOperand* global_object = UseTempRegister(instr->global_object());
1727 LOperand* scratch = TempRegister();
1728 LOperand* scratch2 = TempRegister();
1729 LOperand* scratch3 = TempRegister();
1730 LRandom* result = new(zone()) LRandom(
1731 global_object, scratch, scratch2, scratch3);
1732 return DefineFixedDouble(result, d7);
1733 }
1734
1735
1736 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1723 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1737 ASSERT(instr->left()->representation().IsTagged()); 1724 ASSERT(instr->left()->representation().IsTagged());
1738 ASSERT(instr->right()->representation().IsTagged()); 1725 ASSERT(instr->right()->representation().IsTagged());
1739 LOperand* context = UseFixed(instr->context(), cp); 1726 LOperand* context = UseFixed(instr->context(), cp);
1740 LOperand* left = UseFixed(instr->left(), r1); 1727 LOperand* left = UseFixed(instr->left(), r1);
1741 LOperand* right = UseFixed(instr->right(), r0); 1728 LOperand* right = UseFixed(instr->right(), r0);
1742 LCmpT* result = new(zone()) LCmpT(context, left, right); 1729 LCmpT* result = new(zone()) LCmpT(context, left, right);
1743 return MarkAsCall(DefineFixed(result, r0), instr); 1730 return MarkAsCall(DefineFixed(result, r0), instr);
1744 } 1731 }
1745 1732
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 2666
2680 2667
2681 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2668 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2682 LOperand* object = UseRegister(instr->object()); 2669 LOperand* object = UseRegister(instr->object());
2683 LOperand* index = UseRegister(instr->index()); 2670 LOperand* index = UseRegister(instr->index());
2684 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2671 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2685 } 2672 }
2686 2673
2687 2674
2688 } } // namespace v8::internal 2675 } } // 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