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 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2506 Scope* scope() const { return scope_; } | 2506 Scope* scope() const { return scope_; } |
2507 ZoneList<Statement*>* body() const { return body_; } | 2507 ZoneList<Statement*>* body() const { return body_; } |
2508 void set_function_token_position(int pos) { function_token_position_ = pos; } | 2508 void set_function_token_position(int pos) { function_token_position_ = pos; } |
2509 int function_token_position() const { return function_token_position_; } | 2509 int function_token_position() const { return function_token_position_; } |
2510 int start_position() const; | 2510 int start_position() const; |
2511 int end_position() const; | 2511 int end_position() const; |
2512 int SourceSize() const { return end_position() - start_position(); } | 2512 int SourceSize() const { return end_position() - start_position(); } |
2513 bool is_expression() const { return IsExpression::decode(bitfield_); } | 2513 bool is_expression() const { return IsExpression::decode(bitfield_); } |
2514 bool is_anonymous() const { return IsAnonymous::decode(bitfield_); } | 2514 bool is_anonymous() const { return IsAnonymous::decode(bitfield_); } |
2515 StrictMode strict_mode() const; | 2515 StrictMode strict_mode() const; |
2516 bool uses_super() const; | 2516 bool uses_super_property() const; |
| 2517 bool uses_super_constructor_call() const; |
2517 | 2518 |
2518 static bool NeedsHomeObject(Expression* literal) { | 2519 static bool NeedsHomeObject(Expression* literal) { |
2519 return literal != NULL && literal->IsFunctionLiteral() && | 2520 return literal != NULL && literal->IsFunctionLiteral() && |
2520 literal->AsFunctionLiteral()->uses_super(); | 2521 literal->AsFunctionLiteral()->uses_super_property(); |
2521 } | 2522 } |
2522 | 2523 |
2523 int materialized_literal_count() { return materialized_literal_count_; } | 2524 int materialized_literal_count() { return materialized_literal_count_; } |
2524 int expected_property_count() { return expected_property_count_; } | 2525 int expected_property_count() { return expected_property_count_; } |
2525 int handler_count() { return handler_count_; } | 2526 int handler_count() { return handler_count_; } |
2526 int parameter_count() { return parameter_count_; } | 2527 int parameter_count() { return parameter_count_; } |
2527 | 2528 |
2528 bool AllowsLazyCompilation(); | 2529 bool AllowsLazyCompilation(); |
2529 bool AllowsLazyCompilationWithoutContext(); | 2530 bool AllowsLazyCompilationWithoutContext(); |
2530 | 2531 |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3579 | 3580 |
3580 private: | 3581 private: |
3581 Zone* zone_; | 3582 Zone* zone_; |
3582 AstValueFactory* ast_value_factory_; | 3583 AstValueFactory* ast_value_factory_; |
3583 }; | 3584 }; |
3584 | 3585 |
3585 | 3586 |
3586 } } // namespace v8::internal | 3587 } } // namespace v8::internal |
3587 | 3588 |
3588 #endif // V8_AST_H_ | 3589 #endif // V8_AST_H_ |
OLD | NEW |