| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 FunctionLiteral* ParseLazy(); | 441 FunctionLiteral* ParseLazy(); |
| 442 | 442 |
| 443 void ReportMessageAt(Scanner::Location loc, | 443 void ReportMessageAt(Scanner::Location loc, |
| 444 const char* message, | 444 const char* message, |
| 445 Vector<const char*> args); | 445 Vector<const char*> args); |
| 446 void ReportMessageAt(Scanner::Location loc, | 446 void ReportMessageAt(Scanner::Location loc, |
| 447 const char* message, | 447 const char* message, |
| 448 Vector<Handle<String> > args); | 448 Vector<Handle<String> > args); |
| 449 | 449 |
| 450 private: | 450 private: |
| 451 // Limit on number of function parameters is chosen arbitrarily. | |
| 452 // Code::Flags uses only the low 17 bits of num-parameters to | |
| 453 // construct a hashable id, so if more than 2^17 are allowed, this | |
| 454 // should be checked. | |
| 455 static const int kMaxNumFunctionParameters = 32766; | |
| 456 static const int kMaxNumFunctionLocals = 131071; // 2^17-1 | 451 static const int kMaxNumFunctionLocals = 131071; // 2^17-1 |
| 457 | 452 |
| 458 enum Mode { | 453 enum Mode { |
| 459 PARSE_LAZILY, | 454 PARSE_LAZILY, |
| 460 PARSE_EAGERLY | 455 PARSE_EAGERLY |
| 461 }; | 456 }; |
| 462 | 457 |
| 463 enum VariableDeclarationContext { | 458 enum VariableDeclarationContext { |
| 464 kModuleElement, | 459 kModuleElement, |
| 465 kBlockElement, | 460 kBlockElement, |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 877 private: | 872 private: |
| 878 static const int kTypeSlot = 0; | 873 static const int kTypeSlot = 0; |
| 879 static const int kElementsSlot = 1; | 874 static const int kElementsSlot = 1; |
| 880 | 875 |
| 881 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 876 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 882 }; | 877 }; |
| 883 | 878 |
| 884 } } // namespace v8::internal | 879 } } // namespace v8::internal |
| 885 | 880 |
| 886 #endif // V8_PARSER_H_ | 881 #endif // V8_PARSER_H_ |
| OLD | NEW |