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

Unified Diff: src/hydrogen-instructions.h

Issue 7918012: Unify the handling of comparinsons against null and undefined. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/v8.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 9305)
+++ src/hydrogen-instructions.h (working copy)
@@ -118,7 +118,7 @@
V(InstanceOfKnownGlobal) \
V(InvokeFunction) \
V(IsConstructCallAndBranch) \
- V(IsNullAndBranch) \
+ V(IsNilAndBranch) \
V(IsObjectAndBranch) \
V(IsSmiAndBranch) \
V(IsUndetectableAndBranch) \
@@ -2641,21 +2641,23 @@
};
-class HIsNullAndBranch: public HUnaryControlInstruction {
+class HIsNilAndBranch: public HUnaryControlInstruction {
public:
- HIsNullAndBranch(HValue* value, bool is_strict)
- : HUnaryControlInstruction(value, NULL, NULL), is_strict_(is_strict) { }
+ HIsNilAndBranch(HValue* value, EqualityKind kind, NilValue nil)
+ : HUnaryControlInstruction(value, NULL, NULL), kind_(kind), nil_(nil) { }
- bool is_strict() const { return is_strict_; }
+ EqualityKind kind() const { return kind_; }
+ NilValue nil() const { return nil_; }
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::Tagged();
}
- DECLARE_CONCRETE_INSTRUCTION(IsNullAndBranch)
+ DECLARE_CONCRETE_INSTRUCTION(IsNilAndBranch)
private:
- bool is_strict_;
+ EqualityKind kind_;
+ NilValue nil_;
};
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/v8.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698