Commit 437f8b0c authored by rossberg@chromium.org's avatar rossberg@chromium.org

Unrevert "Remove BinaryOp::result_type""

Reenables https://code.google.com/p/v8/source/detail?r=15265

R=jkummerow@chromium.org
BUG=

Review URL: https://codereview.chromium.org/18309005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15505 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 929e193f
......@@ -1884,9 +1884,6 @@ class BinaryOperation: public Expression {
BailoutId RightId() const { return right_id_; }
TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); }
// TODO(rossberg): result_type should be subsumed by lower_type.
Handle<Type> result_type() const { return result_type_; }
void set_result_type(Handle<Type> type) { result_type_ = type; }
Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; }
......@@ -1913,7 +1910,6 @@ class BinaryOperation: public Expression {
Expression* right_;
int pos_;
Handle<Type> result_type_;
// TODO(rossberg): the fixed arg should probably be represented as a Constant
// type for the RHS.
Maybe<int> fixed_right_arg_;
......
......@@ -8675,7 +8675,7 @@ HInstruction* HOptimizedGraphBuilder::BuildBinaryOperation(
HValue* context = environment()->LookupContext();
Handle<Type> left_type = expr->left()->lower_type();
Handle<Type> right_type = expr->right()->lower_type();
Handle<Type> result_type = expr->result_type();
Handle<Type> result_type = expr->lower_type();
Maybe<int> fixed_right_arg = expr->fixed_right_arg();
Representation left_rep = ToRepresentation(left_type);
Representation right_rep = ToRepresentation(right_type);
......
......@@ -303,9 +303,9 @@ class TypeFeedbackOracle: public ZoneObject {
Maybe<int>* fixed_right_arg);
void CompareType(TypeFeedbackId id,
Handle<Type>* left_type,
Handle<Type>* right_type,
Handle<Type>* combined_type);
Handle<Type>* left,
Handle<Type>* right,
Handle<Type>* combined);
Handle<Type> ClauseType(TypeFeedbackId id);
......
......@@ -432,13 +432,13 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
CHECK_ALIVE(Visit(expr->right()));
// Collect type feedback.
Handle<Type> left_type, right_type, result_type;
Handle<Type> type, left_type, right_type;
Maybe<int> fixed_right_arg;
oracle()->BinaryType(expr->BinaryOperationFeedbackId(),
&left_type, &right_type, &result_type, &fixed_right_arg);
&left_type, &right_type, &type, &fixed_right_arg);
MergeLowerType(expr, type);
MergeLowerType(expr->left(), left_type);
MergeLowerType(expr->right(), right_type);
expr->set_result_type(result_type);
expr->set_fixed_right_arg(fixed_right_arg);
if (expr->op() == Token::OR || expr->op() == Token::AND) {
expr->left()->RecordToBooleanTypeFeedback(oracle());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment