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

Unified Diff: src/hydrogen-instructions.h

Issue 5640004: Allow the optimizing code generator to call Math.pow with untagged doubles. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 5948)
+++ src/hydrogen-instructions.h (working copy)
@@ -77,6 +77,7 @@
// HLoadKeyedFastElement
// HLoadKeyedGeneric
// HLoadNamedGeneric
+// HPower
// HStoreNamed
// HStoreNamedField
// HStoreNamedGeneric
@@ -223,6 +224,7 @@
V(ObjectLiteral) \
V(OsrEntry) \
V(Parameter) \
+ V(Power) \
V(PushArgument) \
V(RegExpLiteral) \
V(Return) \
@@ -1377,6 +1379,7 @@
SetFlag(kFlexibleRepresentation);
break;
case kMathSqrt:
+ case kMathPowHalf:
default:
set_representation(Representation::Double());
}
@@ -1395,6 +1398,7 @@
case kMathRound:
case kMathCeil:
case kMathSqrt:
+ case kMathPowHalf:
return Representation::Double();
break;
case kMathAbs:
@@ -2184,6 +2188,22 @@
};
+class HPower: public HBinaryOperation {
+ public:
+ HPower(HValue* left, HValue* right)
+ : HBinaryOperation(left, right) {
+ set_representation(Representation::Double());
+ SetFlag(kUseGVN);
+ }
+
+ virtual Representation RequiredInputRepresentation(int index) const {
+ return (index == 1) ? Representation::None() : Representation::Double();
+ }
+
+ DECLARE_CONCRETE_INSTRUCTION(Power, "power")
+};
+
+
class HAdd: public HArithmeticBinaryOperation {
public:
HAdd(HValue* left, HValue* right) : HArithmeticBinaryOperation(left, right) {
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698