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_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
(...skipping 2361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2372 bool IsLiteralCompareUndefined(Expression** expr, Isolate* isolate); | 2372 bool IsLiteralCompareUndefined(Expression** expr, Isolate* isolate); |
2373 bool IsLiteralCompareNull(Expression** expr); | 2373 bool IsLiteralCompareNull(Expression** expr); |
2374 | 2374 |
2375 protected: | 2375 protected: |
2376 CompareOperation(Zone* zone, Token::Value op, Expression* left, | 2376 CompareOperation(Zone* zone, Token::Value op, Expression* left, |
2377 Expression* right, int pos) | 2377 Expression* right, int pos) |
2378 : Expression(zone, pos), | 2378 : Expression(zone, pos), |
2379 op_(op), | 2379 op_(op), |
2380 left_(left), | 2380 left_(left), |
2381 right_(right), | 2381 right_(right), |
2382 combined_type_(Type::None(zone)) { | 2382 combined_type_(Type::None()) { |
2383 DCHECK(Token::IsCompareOp(op)); | 2383 DCHECK(Token::IsCompareOp(op)); |
2384 } | 2384 } |
2385 static int parent_num_ids() { return Expression::num_ids(); } | 2385 static int parent_num_ids() { return Expression::num_ids(); } |
2386 | 2386 |
2387 private: | 2387 private: |
2388 int local_id(int n) const { return base_id() + parent_num_ids() + n; } | 2388 int local_id(int n) const { return base_id() + parent_num_ids() + n; } |
2389 | 2389 |
2390 Token::Value op_; | 2390 Token::Value op_; |
2391 Expression* left_; | 2391 Expression* left_; |
2392 Expression* right_; | 2392 Expression* right_; |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3561 // the parser-level zone. | 3561 // the parser-level zone. |
3562 Zone* parser_zone_; | 3562 Zone* parser_zone_; |
3563 AstValueFactory* ast_value_factory_; | 3563 AstValueFactory* ast_value_factory_; |
3564 }; | 3564 }; |
3565 | 3565 |
3566 | 3566 |
3567 } // namespace internal | 3567 } // namespace internal |
3568 } // namespace v8 | 3568 } // namespace v8 |
3569 | 3569 |
3570 #endif // V8_AST_AST_H_ | 3570 #endif // V8_AST_AST_H_ |
OLD | NEW |