| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_AST_H_ | 5 #ifndef V8_AST_H_ |
| 6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
| (...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2069 static int num_ids() { return parent_num_ids() + 2; } | 2069 static int num_ids() { return parent_num_ids() + 2; } |
| 2070 BailoutId RightId() const { return BailoutId(local_id(0)); } | 2070 BailoutId RightId() const { return BailoutId(local_id(0)); } |
| 2071 | 2071 |
| 2072 TypeFeedbackId BinaryOperationFeedbackId() const { | 2072 TypeFeedbackId BinaryOperationFeedbackId() const { |
| 2073 return TypeFeedbackId(local_id(1)); | 2073 return TypeFeedbackId(local_id(1)); |
| 2074 } | 2074 } |
| 2075 Maybe<int> fixed_right_arg() const { | 2075 Maybe<int> fixed_right_arg() const { |
| 2076 return has_fixed_right_arg_ ? Just(fixed_right_arg_value_) : Nothing<int>(); | 2076 return has_fixed_right_arg_ ? Just(fixed_right_arg_value_) : Nothing<int>(); |
| 2077 } | 2077 } |
| 2078 void set_fixed_right_arg(Maybe<int> arg) { | 2078 void set_fixed_right_arg(Maybe<int> arg) { |
| 2079 has_fixed_right_arg_ = arg.has_value; | 2079 has_fixed_right_arg_ = arg.IsJust(); |
| 2080 if (arg.has_value) fixed_right_arg_value_ = arg.value; | 2080 if (arg.IsJust()) fixed_right_arg_value_ = arg.FromJust(); |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 virtual void RecordToBooleanTypeFeedback( | 2083 virtual void RecordToBooleanTypeFeedback( |
| 2084 TypeFeedbackOracle* oracle) OVERRIDE; | 2084 TypeFeedbackOracle* oracle) OVERRIDE; |
| 2085 | 2085 |
| 2086 protected: | 2086 protected: |
| 2087 BinaryOperation(Zone* zone, Token::Value op, Expression* left, | 2087 BinaryOperation(Zone* zone, Token::Value op, Expression* left, |
| 2088 Expression* right, int pos) | 2088 Expression* right, int pos) |
| 2089 : Expression(zone, pos), | 2089 : Expression(zone, pos), |
| 2090 op_(static_cast<byte>(op)), | 2090 op_(static_cast<byte>(op)), |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3509 | 3509 |
| 3510 private: | 3510 private: |
| 3511 Zone* zone_; | 3511 Zone* zone_; |
| 3512 AstValueFactory* ast_value_factory_; | 3512 AstValueFactory* ast_value_factory_; |
| 3513 }; | 3513 }; |
| 3514 | 3514 |
| 3515 | 3515 |
| 3516 } } // namespace v8::internal | 3516 } } // namespace v8::internal |
| 3517 | 3517 |
| 3518 #endif // V8_AST_H_ | 3518 #endif // V8_AST_H_ |
| OLD | NEW |