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

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

Issue 68723002: Implement Math.random() purely in JavaScript. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments only 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 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 LOperand* right = exponent_type.IsDouble() ? 1717 LOperand* right = exponent_type.IsDouble() ?
1718 UseFixedDouble(instr->right(), d2) : 1718 UseFixedDouble(instr->right(), d2) :
1719 UseFixed(instr->right(), r2); 1719 UseFixed(instr->right(), r2);
1720 LPower* result = new(zone()) LPower(left, right); 1720 LPower* result = new(zone()) LPower(left, right);
1721 return MarkAsCall(DefineFixedDouble(result, d3), 1721 return MarkAsCall(DefineFixedDouble(result, d3),
1722 instr, 1722 instr,
1723 CAN_DEOPTIMIZE_EAGERLY); 1723 CAN_DEOPTIMIZE_EAGERLY);
1724 } 1724 }
1725 1725
1726 1726
1727 LInstruction* LChunkBuilder::DoRandom(HRandom* instr) {
1728 ASSERT(instr->representation().IsDouble());
1729 ASSERT(instr->global_object()->representation().IsTagged());
1730 LOperand* global_object = UseTempRegister(instr->global_object());
1731 LOperand* scratch = TempRegister();
1732 LOperand* scratch2 = TempRegister();
1733 LOperand* scratch3 = TempRegister();
1734 LRandom* result = new(zone()) LRandom(
1735 global_object, scratch, scratch2, scratch3);
1736 return DefineFixedDouble(result, d7);
1737 }
1738
1739
1740 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) { 1727 LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
1741 ASSERT(instr->left()->representation().IsTagged()); 1728 ASSERT(instr->left()->representation().IsTagged());
1742 ASSERT(instr->right()->representation().IsTagged()); 1729 ASSERT(instr->right()->representation().IsTagged());
1743 LOperand* context = UseFixed(instr->context(), cp); 1730 LOperand* context = UseFixed(instr->context(), cp);
1744 LOperand* left = UseFixed(instr->left(), r1); 1731 LOperand* left = UseFixed(instr->left(), r1);
1745 LOperand* right = UseFixed(instr->right(), r0); 1732 LOperand* right = UseFixed(instr->right(), r0);
1746 LCmpT* result = new(zone()) LCmpT(context, left, right); 1733 LCmpT* result = new(zone()) LCmpT(context, left, right);
1747 return MarkAsCall(DefineFixed(result, r0), instr); 1734 return MarkAsCall(DefineFixed(result, r0), instr);
1748 } 1735 }
1749 1736
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
2684 2671
2685 2672
2686 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2673 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2687 LOperand* object = UseRegister(instr->object()); 2674 LOperand* object = UseRegister(instr->object());
2688 LOperand* index = UseRegister(instr->index()); 2675 LOperand* index = UseRegister(instr->index());
2689 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2676 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2690 } 2677 }
2691 2678
2692 2679
2693 } } // namespace v8::internal 2680 } } // 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