Reviewers: Jakob,
Description:
Remove BinaryOp::result_type
[email protected]
BUG=
Please review this at https://codereview.chromium.org/17261023/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/ast.h
M src/hydrogen.cc
M src/type-info.h
M src/typing.cc
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index
568725d33f835c62e7e8fc6a19640f92418f0b4e..8fd63d08b30ef793c8c4518dd2e11f698cba3f52
100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1881,9 +1881,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; }
@@ -1908,7 +1905,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_;
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
6f582c76c165e85d6f45a56f445f2dfdee425918..827f7907a77bcc8a298ec05f45c531bbc57643fe
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -9412,7 +9412,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);
Index: src/type-info.h
diff --git a/src/type-info.h b/src/type-info.h
index
558d12463197f3b7eeeb58d55a5f6990a147f9e4..acd4730173987bb00c0b678575dd8fbe90401448
100644
--- a/src/type-info.h
+++ b/src/type-info.h
@@ -302,9 +302,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);
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index
6157114c9bec4413b64fa9b3f2e18e4d08781843..e890333d135e36750a546cc61eac25e78ee60005
100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -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());
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.