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

Side by Side Diff: src/hydrogen-instructions.h

Issue 14333013: Fixed HUnaryMathOperation regarding its possible operations. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « no previous file | src/hydrogen-instructions.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 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 } 2596 }
2597 2597
2598 private: 2598 private:
2599 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op) 2599 HUnaryMathOperation(HValue* context, HValue* value, BuiltinFunctionId op)
2600 : op_(op) { 2600 : op_(op) {
2601 SetOperandAt(0, context); 2601 SetOperandAt(0, context);
2602 SetOperandAt(1, value); 2602 SetOperandAt(1, value);
2603 switch (op) { 2603 switch (op) {
2604 case kMathFloor: 2604 case kMathFloor:
2605 case kMathRound: 2605 case kMathRound:
2606 case kMathCeil:
2607 set_representation(Representation::Integer32()); 2606 set_representation(Representation::Integer32());
2608 break; 2607 break;
2609 case kMathAbs: 2608 case kMathAbs:
2610 // Not setting representation here: it is None intentionally. 2609 // Not setting representation here: it is None intentionally.
2611 SetFlag(kFlexibleRepresentation); 2610 SetFlag(kFlexibleRepresentation);
2612 // TODO(svenpanne) This flag is actually only needed if representation() 2611 // TODO(svenpanne) This flag is actually only needed if representation()
2613 // is tagged, and not when it is an unboxed double or unboxed integer. 2612 // is tagged, and not when it is an unboxed double or unboxed integer.
2614 SetGVNFlag(kChangesNewSpacePromotion); 2613 SetGVNFlag(kChangesNewSpacePromotion);
2615 break; 2614 break;
2616 case kMathLog: 2615 case kMathLog:
(...skipping 3934 matching lines...) Expand 10 before | Expand all | Expand 10 after
6551 virtual bool IsDeletable() const { return true; } 6550 virtual bool IsDeletable() const { return true; }
6552 }; 6551 };
6553 6552
6554 6553
6555 #undef DECLARE_INSTRUCTION 6554 #undef DECLARE_INSTRUCTION
6556 #undef DECLARE_CONCRETE_INSTRUCTION 6555 #undef DECLARE_CONCRETE_INSTRUCTION
6557 6556
6558 } } // namespace v8::internal 6557 } } // namespace v8::internal
6559 6558
6560 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6559 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698