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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2479 Scope* scope() const { return scope_; } | 2479 Scope* scope() const { return scope_; } |
2480 ZoneList<Statement*>* body() const { return body_; } | 2480 ZoneList<Statement*>* body() const { return body_; } |
2481 void set_function_token_position(int pos) { function_token_position_ = pos; } | 2481 void set_function_token_position(int pos) { function_token_position_ = pos; } |
2482 int function_token_position() const { return function_token_position_; } | 2482 int function_token_position() const { return function_token_position_; } |
2483 int start_position() const; | 2483 int start_position() const; |
2484 int end_position() const; | 2484 int end_position() const; |
2485 int SourceSize() const { return end_position() - start_position(); } | 2485 int SourceSize() const { return end_position() - start_position(); } |
2486 bool is_expression() const { return IsExpression::decode(bitfield_); } | 2486 bool is_expression() const { return IsExpression::decode(bitfield_); } |
2487 bool is_anonymous() const { return IsAnonymous::decode(bitfield_); } | 2487 bool is_anonymous() const { return IsAnonymous::decode(bitfield_); } |
2488 StrictMode strict_mode() const; | 2488 StrictMode strict_mode() const; |
2489 bool uses_super() const; | 2489 bool uses_super_property() const; |
| 2490 bool uses_super_constructor_call() const; |
2490 | 2491 |
2491 static bool NeedsHomeObject(Expression* literal) { | 2492 static bool NeedsHomeObject(Expression* literal) { |
2492 return literal != NULL && literal->IsFunctionLiteral() && | 2493 return literal != NULL && literal->IsFunctionLiteral() && |
2493 literal->AsFunctionLiteral()->uses_super(); | 2494 literal->AsFunctionLiteral()->uses_super_property(); |
2494 } | 2495 } |
2495 | 2496 |
2496 int materialized_literal_count() { return materialized_literal_count_; } | 2497 int materialized_literal_count() { return materialized_literal_count_; } |
2497 int expected_property_count() { return expected_property_count_; } | 2498 int expected_property_count() { return expected_property_count_; } |
2498 int handler_count() { return handler_count_; } | 2499 int handler_count() { return handler_count_; } |
2499 int parameter_count() { return parameter_count_; } | 2500 int parameter_count() { return parameter_count_; } |
2500 | 2501 |
2501 bool AllowsLazyCompilation(); | 2502 bool AllowsLazyCompilation(); |
2502 bool AllowsLazyCompilationWithoutContext(); | 2503 bool AllowsLazyCompilationWithoutContext(); |
2503 | 2504 |
(...skipping 1046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 | 3551 |
3551 private: | 3552 private: |
3552 Zone* zone_; | 3553 Zone* zone_; |
3553 AstValueFactory* ast_value_factory_; | 3554 AstValueFactory* ast_value_factory_; |
3554 }; | 3555 }; |
3555 | 3556 |
3556 | 3557 |
3557 } } // namespace v8::internal | 3558 } } // namespace v8::internal |
3558 | 3559 |
3559 #endif // V8_AST_H_ | 3560 #endif // V8_AST_H_ |
OLD | NEW |