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

Unified Diff: src/hydrogen-instructions.h

Issue 24366004: Split HCompareGeneric in a test and a branch part. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 7e5272e218e6a32eebaa847a21d6369319b74bc9..2bd71520f24b5f86a8b66872a0eb1e742fb4f5d0 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -67,6 +67,7 @@ class LChunkBuilder;
V(AccessArgumentsAt) \
V(Add) \
V(Allocate) \
+ V(AndBranch) \
V(ApplyArguments) \
V(ArgumentsElements) \
V(ArgumentsLength) \
@@ -1197,6 +1198,34 @@ class HTemplateControlInstruction : public HControlInstruction {
};
+class HConstant;
+
+
+class HAndBranch V8_FINAL : public HTemplateControlInstruction<2, 1> {
+ public:
+ DECLARE_INSTRUCTION_FACTORY_P2(HAndBranch,
+ HValue*,
+ Token::Value);
+
+ virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
+ return Representation::Smi();
+ }
+
+ HValue* value() { return OperandAt(0); }
+ Token::Value op() { return op_; }
+
+ DECLARE_CONCRETE_INSTRUCTION(AndBranch);
+
+ private:
+ HAndBranch(HValue* value, Token::Value op) : op_(op) {
+ ASSERT(value->representation().IsSmi());
+ SetOperandAt(0, value);
+ }
+
+ Token::Value op_;
+};
+
+
class HBlockEntry V8_FINAL : public HTemplateInstruction<0> {
public:
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
@@ -3943,14 +3972,12 @@ class HCompareGeneric V8_FINAL : public HBinaryOperation {
: HBinaryOperation(context, left, right, HType::Boolean()),
token_(token) {
ASSERT(Token::IsCompareOp(token));
- set_representation(Representation::Tagged());
+ set_representation(Representation::Smi());
SetAllSideEffects();
}
virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
- return index == 0
- ? Representation::Tagged()
- : representation();
+ return Representation::Tagged();
}
Token::Value token() const { return token_; }

Powered by Google App Engine
This is Rietveld 408576698