OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 class Declaration: public AstNode { | 398 class Declaration: public AstNode { |
399 public: | 399 public: |
400 Declaration(VariableProxy* proxy, | 400 Declaration(VariableProxy* proxy, |
401 VariableMode mode, | 401 VariableMode mode, |
402 FunctionLiteral* fun, | 402 FunctionLiteral* fun, |
403 Scope* scope) | 403 Scope* scope) |
404 : proxy_(proxy), | 404 : proxy_(proxy), |
405 mode_(mode), | 405 mode_(mode), |
406 fun_(fun), | 406 fun_(fun), |
407 scope_(scope) { | 407 scope_(scope) { |
408 ASSERT(mode == VAR || mode == CONST || mode == LET); | 408 ASSERT(mode == VAR || |
| 409 mode == CONST || |
| 410 mode == CONST_HARMONY || |
| 411 mode == LET); |
409 // At the moment there are no "const functions"'s in JavaScript... | 412 // At the moment there are no "const functions"'s in JavaScript... |
410 ASSERT(fun == NULL || mode == VAR || mode == LET); | 413 ASSERT(fun == NULL || mode == VAR || mode == LET); |
411 } | 414 } |
412 | 415 |
413 DECLARE_NODE_TYPE(Declaration) | 416 DECLARE_NODE_TYPE(Declaration) |
414 | 417 |
415 VariableProxy* proxy() const { return proxy_; } | 418 VariableProxy* proxy() const { return proxy_; } |
416 VariableMode mode() const { return mode_; } | 419 VariableMode mode() const { return mode_; } |
417 FunctionLiteral* fun() const { return fun_; } // may be NULL | 420 FunctionLiteral* fun() const { return fun_; } // may be NULL |
418 virtual bool IsInlineable() const; | 421 virtual bool IsInlineable() const; |
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2124 | 2127 |
2125 private: | 2128 private: |
2126 Isolate* isolate_; | 2129 Isolate* isolate_; |
2127 bool stack_overflow_; | 2130 bool stack_overflow_; |
2128 }; | 2131 }; |
2129 | 2132 |
2130 | 2133 |
2131 } } // namespace v8::internal | 2134 } } // namespace v8::internal |
2132 | 2135 |
2133 #endif // V8_AST_H_ | 2136 #endif // V8_AST_H_ |
OLD | NEW |