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

Unified Diff: src/hydrogen-instructions.h

Issue 18331004: Refactoring and cleanup of control instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase to ToT Created 7 years, 5 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/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 6e10a383dea29e94befdcde26c02f258efb990e4..4227b8ee067531a4dae5a6c7d4dc21cea5f46dac 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -96,7 +96,7 @@ class LChunkBuilder;
V(CheckPrototypeMaps) \
V(ClampToUint8) \
V(ClassOfTestAndBranch) \
- V(CompareIDAndBranch) \
+ V(CompareNumericAndBranch) \
V(CompareGeneric) \
V(CompareObjectEqAndBranch) \
V(CompareMap) \
@@ -1606,21 +1606,11 @@ class HUnaryControlInstruction: public HTemplateControlInstruction<2, 1> {
class HBranch: public HUnaryControlInstruction {
public:
HBranch(HValue* value,
- HBasicBlock* true_target,
- HBasicBlock* false_target,
- ToBooleanStub::Types expected_input_types = ToBooleanStub::Types())
+ ToBooleanStub::Types expected_input_types = ToBooleanStub::Types(),
+ HBasicBlock* true_target = NULL,
+ HBasicBlock* false_target = NULL)
: HUnaryControlInstruction(value, true_target, false_target),
expected_input_types_(expected_input_types) {
- ASSERT(true_target != NULL && false_target != NULL);
- SetFlag(kAllowUndefinedAsNaN);
- }
- explicit HBranch(HValue* value)
- : HUnaryControlInstruction(value, NULL, NULL) {
- SetFlag(kAllowUndefinedAsNaN);
- }
- HBranch(HValue* value, ToBooleanStub::Types expected_input_types)
- : HUnaryControlInstruction(value, NULL, NULL),
- expected_input_types_(expected_input_types) {
SetFlag(kAllowUndefinedAsNaN);
}
@@ -1644,12 +1634,10 @@ class HCompareMap: public HUnaryControlInstruction {
public:
HCompareMap(HValue* value,
Handle<Map> map,
- HBasicBlock* true_target,
- HBasicBlock* false_target)
+ HBasicBlock* true_target = NULL,
+ HBasicBlock* false_target = NULL)
: HUnaryControlInstruction(value, true_target, false_target),
- map_(map) {
- ASSERT(true_target != NULL);
- ASSERT(false_target != NULL);
+ map_(map) {
ASSERT(!map.is_null());
}
@@ -3960,9 +3948,9 @@ class HCompareGeneric: public HBinaryOperation {
};
-class HCompareIDAndBranch: public HTemplateControlInstruction<2, 2> {
+class HCompareNumericAndBranch: public HTemplateControlInstruction<2, 2> {
public:
- HCompareIDAndBranch(HValue* left, HValue* right, Token::Value token)
+ HCompareNumericAndBranch(HValue* left, HValue* right, Token::Value token)
: token_(token) {
SetFlag(kFlexibleRepresentation);
ASSERT(Token::IsCompareOp(token));
@@ -3992,7 +3980,7 @@ class HCompareIDAndBranch: public HTemplateControlInstruction<2, 2> {
virtual void AddInformativeDefinitions();
- DECLARE_CONCRETE_INSTRUCTION(CompareIDAndBranch)
+ DECLARE_CONCRETE_INSTRUCTION(CompareNumericAndBranch)
private:
Representation observed_input_representation_[2];
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698