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 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2290 enum IsParenthesizedFlag { | 2290 enum IsParenthesizedFlag { |
2291 kIsParenthesized, | 2291 kIsParenthesized, |
2292 kNotParenthesized | 2292 kNotParenthesized |
2293 }; | 2293 }; |
2294 | 2294 |
2295 enum IsGeneratorFlag { | 2295 enum IsGeneratorFlag { |
2296 kIsGenerator, | 2296 kIsGenerator, |
2297 kNotGenerator | 2297 kNotGenerator |
2298 }; | 2298 }; |
2299 | 2299 |
| 2300 enum ArityRestriction { |
| 2301 NORMAL_ARITY, |
| 2302 GETTER_ARITY, |
| 2303 SETTER_ARITY |
| 2304 }; |
| 2305 |
2300 DECLARE_NODE_TYPE(FunctionLiteral) | 2306 DECLARE_NODE_TYPE(FunctionLiteral) |
2301 | 2307 |
2302 Handle<String> name() const { return name_; } | 2308 Handle<String> name() const { return name_; } |
2303 Scope* scope() const { return scope_; } | 2309 Scope* scope() const { return scope_; } |
2304 ZoneList<Statement*>* body() const { return body_; } | 2310 ZoneList<Statement*>* body() const { return body_; } |
2305 void set_function_token_position(int pos) { function_token_position_ = pos; } | 2311 void set_function_token_position(int pos) { function_token_position_ = pos; } |
2306 int function_token_position() const { return function_token_position_; } | 2312 int function_token_position() const { return function_token_position_; } |
2307 int start_position() const; | 2313 int start_position() const; |
2308 int end_position() const; | 2314 int end_position() const; |
2309 int SourceSize() const { return end_position() - start_position(); } | 2315 int SourceSize() const { return end_position() - start_position(); } |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3338 | 3344 |
3339 private: | 3345 private: |
3340 Zone* zone_; | 3346 Zone* zone_; |
3341 Visitor visitor_; | 3347 Visitor visitor_; |
3342 }; | 3348 }; |
3343 | 3349 |
3344 | 3350 |
3345 } } // namespace v8::internal | 3351 } } // namespace v8::internal |
3346 | 3352 |
3347 #endif // V8_AST_H_ | 3353 #endif // V8_AST_H_ |
OLD | NEW |