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