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

Unified Diff: src/hydrogen-instructions.h

Issue 5898003: HHasInstanceType uses GVN but does not provide a comparison function... (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 | « no previous file | test/mjsunit/regress/regress-995.js » ('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 6051)
+++ src/hydrogen-instructions.h (working copy)
@@ -1430,6 +1430,12 @@
DECLARE_CONCRETE_INSTRUCTION(UnaryMathOperation, "unary_math_operation")
+ protected:
+ virtual bool DataEquals(HValue* other) const {
+ HUnaryMathOperation* b = HUnaryMathOperation::cast(other);
+ return op_ == b->op();
+ }
+
private:
BuiltinFunctionId op_;
};
@@ -2097,6 +2103,12 @@
DECLARE_CONCRETE_INSTRUCTION(IsNull, "is_null")
+ protected:
+ virtual bool DataEquals(HValue* other) const {
+ HIsNull* b = HIsNull::cast(other);
+ return is_strict_ == b->is_strict();
+ }
+
private:
bool is_strict_;
};
@@ -2134,6 +2146,12 @@
DECLARE_CONCRETE_INSTRUCTION(HasInstanceType, "has_instance_type")
+ protected:
+ virtual bool DataEquals(HValue* other) const {
+ HHasInstanceType* b = HHasInstanceType::cast(other);
+ return (from_ == b->from()) && (to_ == b->to());
+ }
+
private:
InstanceType from_;
InstanceType to_; // Inclusive range, not all combinations work.
@@ -2159,6 +2177,12 @@
Handle<String> class_name() const { return class_name_; }
+ protected:
+ virtual bool DataEquals(HValue* other) const {
+ HClassOfTest* b = HClassOfTest::cast(other);
+ return class_name_.is_identical_to(b->class_name_);
+ }
+
private:
Handle<String> class_name_;
};
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-995.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698