| 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 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 bool allow_lazy = false) { | 611 bool allow_lazy = false) { |
| 612 Parser parser(info); | 612 Parser parser(info); |
| 613 parser.set_allow_lazy(allow_lazy); | 613 parser.set_allow_lazy(allow_lazy); |
| 614 return parser.Parse(); | 614 return parser.Parse(); |
| 615 } | 615 } |
| 616 bool Parse(); | 616 bool Parse(); |
| 617 | 617 |
| 618 private: | 618 private: |
| 619 friend class ParserTraits; | 619 friend class ParserTraits; |
| 620 | 620 |
| 621 static const int kMaxNumFunctionLocals = 131071; // 2^17-1 | |
| 622 | |
| 623 enum Mode { | 621 enum Mode { |
| 624 PARSE_LAZILY, | 622 PARSE_LAZILY, |
| 625 PARSE_EAGERLY | 623 PARSE_EAGERLY |
| 626 }; | 624 }; |
| 627 | 625 |
| 628 enum VariableDeclarationContext { | 626 enum VariableDeclarationContext { |
| 629 kModuleElement, | 627 kModuleElement, |
| 630 kBlockElement, | 628 kBlockElement, |
| 631 kStatement, | 629 kStatement, |
| 632 kForStatement | 630 kForStatement |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 864 private: | 862 private: |
| 865 static const int kLiteralTypeSlot = 0; | 863 static const int kLiteralTypeSlot = 0; |
| 866 static const int kElementsSlot = 1; | 864 static const int kElementsSlot = 1; |
| 867 | 865 |
| 868 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 866 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 869 }; | 867 }; |
| 870 | 868 |
| 871 } } // namespace v8::internal | 869 } } // namespace v8::internal |
| 872 | 870 |
| 873 #endif // V8_PARSER_H_ | 871 #endif // V8_PARSER_H_ |
| OLD | NEW |