| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 virtual InitializationFlag initialization() const = 0; | 447 virtual InitializationFlag initialization() const = 0; |
| 448 virtual bool IsInlineable() const; | 448 virtual bool IsInlineable() const; |
| 449 | 449 |
| 450 protected: | 450 protected: |
| 451 Declaration(VariableProxy* proxy, | 451 Declaration(VariableProxy* proxy, |
| 452 VariableMode mode, | 452 VariableMode mode, |
| 453 Scope* scope) | 453 Scope* scope) |
| 454 : proxy_(proxy), | 454 : proxy_(proxy), |
| 455 mode_(mode), | 455 mode_(mode), |
| 456 scope_(scope) { | 456 scope_(scope) { |
| 457 ASSERT(mode == VAR || | 457 ASSERT(IsDeclaredVariableMode(mode)); |
| 458 mode == CONST || | |
| 459 mode == CONST_HARMONY || | |
| 460 mode == LET); | |
| 461 } | 458 } |
| 462 | 459 |
| 463 private: | 460 private: |
| 464 VariableProxy* proxy_; | 461 VariableProxy* proxy_; |
| 465 VariableMode mode_; | 462 VariableMode mode_; |
| 466 | 463 |
| 467 // Nested scope from which the declaration originated. | 464 // Nested scope from which the declaration originated. |
| 468 Scope* scope_; | 465 Scope* scope_; |
| 469 }; | 466 }; |
| 470 | 467 |
| (...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3005 private: | 3002 private: |
| 3006 Isolate* isolate_; | 3003 Isolate* isolate_; |
| 3007 Zone* zone_; | 3004 Zone* zone_; |
| 3008 Visitor visitor_; | 3005 Visitor visitor_; |
| 3009 }; | 3006 }; |
| 3010 | 3007 |
| 3011 | 3008 |
| 3012 } } // namespace v8::internal | 3009 } } // namespace v8::internal |
| 3013 | 3010 |
| 3014 #endif // V8_AST_H_ | 3011 #endif // V8_AST_H_ |
| OLD | NEW |