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

Unified Diff: src/crankshaft/hydrogen-instructions.h

Issue 2494703002: [crankshaft] Not all HAdd instructions produce a number. (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-664084.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen-instructions.h
diff --git a/src/crankshaft/hydrogen-instructions.h b/src/crankshaft/hydrogen-instructions.h
index 9c79f68431d02fd9917c27a358b5865fe4e542ef..1ae36769a992d0ff7d5a28b3f91e08ecb3b091ba 100644
--- a/src/crankshaft/hydrogen-instructions.h
+++ b/src/crankshaft/hydrogen-instructions.h
@@ -3800,8 +3800,9 @@ class HMathFloorOfDiv final : public HBinaryOperation {
class HArithmeticBinaryOperation : public HBinaryOperation {
public:
- HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right)
- : HBinaryOperation(context, left, right, HType::TaggedNumber()) {
+ HArithmeticBinaryOperation(HValue* context, HValue* left, HValue* right,
+ HType type = HType::TaggedNumber())
+ : HBinaryOperation(context, left, right, type) {
SetAllSideEffects();
SetFlag(kFlexibleRepresentation);
SetFlag(kTruncatingToNumber);
@@ -4326,7 +4327,7 @@ class HAdd final : public HArithmeticBinaryOperation {
private:
HAdd(HValue* context, HValue* left, HValue* right,
ExternalAddType external_add_type = NoExternalAdd)
- : HArithmeticBinaryOperation(context, left, right),
+ : HArithmeticBinaryOperation(context, left, right, HType::Tagged()),
external_add_type_(external_add_type) {
SetFlag(kCanOverflow);
switch (external_add_type_) {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-664084.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698