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 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2469 const AstRawString* raw_name() const { return raw_name_; } | 2469 const AstRawString* raw_name() const { return raw_name_; } |
2470 Scope* scope() const { return scope_; } | 2470 Scope* scope() const { return scope_; } |
2471 ZoneList<Statement*>* body() const { return body_; } | 2471 ZoneList<Statement*>* body() const { return body_; } |
2472 void set_function_token_position(int pos) { function_token_position_ = pos; } | 2472 void set_function_token_position(int pos) { function_token_position_ = pos; } |
2473 int function_token_position() const { return function_token_position_; } | 2473 int function_token_position() const { return function_token_position_; } |
2474 int start_position() const; | 2474 int start_position() const; |
2475 int end_position() const; | 2475 int end_position() const; |
2476 int SourceSize() const { return end_position() - start_position(); } | 2476 int SourceSize() const { return end_position() - start_position(); } |
2477 bool is_expression() const { return IsExpression::decode(bitfield_); } | 2477 bool is_expression() const { return IsExpression::decode(bitfield_); } |
2478 bool is_anonymous() const { return IsAnonymous::decode(bitfield_); } | 2478 bool is_anonymous() const { return IsAnonymous::decode(bitfield_); } |
2479 StrictMode strict_mode() const; | 2479 LanguageMode language_mode() const; |
2480 bool uses_super_property() const; | 2480 bool uses_super_property() const; |
2481 bool uses_super_constructor_call() const; | 2481 bool uses_super_constructor_call() const; |
2482 | 2482 |
2483 static bool NeedsHomeObject(Expression* literal) { | 2483 static bool NeedsHomeObject(Expression* literal) { |
2484 return literal != NULL && literal->IsFunctionLiteral() && | 2484 return literal != NULL && literal->IsFunctionLiteral() && |
2485 literal->AsFunctionLiteral()->uses_super_property(); | 2485 literal->AsFunctionLiteral()->uses_super_property(); |
2486 } | 2486 } |
2487 | 2487 |
2488 int materialized_literal_count() { return materialized_literal_count_; } | 2488 int materialized_literal_count() { return materialized_literal_count_; } |
2489 int expected_property_count() { return expected_property_count_; } | 2489 int expected_property_count() { return expected_property_count_; } |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3558 | 3558 |
3559 private: | 3559 private: |
3560 Zone* zone_; | 3560 Zone* zone_; |
3561 AstValueFactory* ast_value_factory_; | 3561 AstValueFactory* ast_value_factory_; |
3562 }; | 3562 }; |
3563 | 3563 |
3564 | 3564 |
3565 } } // namespace v8::internal | 3565 } } // namespace v8::internal |
3566 | 3566 |
3567 #endif // V8_AST_H_ | 3567 #endif // V8_AST_H_ |
OLD | NEW |