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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 Expression* NewThrowReferenceError(const char* type, int pos); | 531 Expression* NewThrowReferenceError(const char* type, int pos); |
532 | 532 |
533 // Generate AST node that throws a SyntaxError with the given | 533 // Generate AST node that throws a SyntaxError with the given |
534 // type. The first argument may be null (in the handle sense) in | 534 // type. The first argument may be null (in the handle sense) in |
535 // which case no arguments are passed to the constructor. | 535 // which case no arguments are passed to the constructor. |
536 Expression* NewThrowSyntaxError( | 536 Expression* NewThrowSyntaxError( |
537 const char* type, Handle<Object> arg, int pos); | 537 const char* type, Handle<Object> arg, int pos); |
538 | 538 |
539 // Generate AST node that throws a TypeError with the given | 539 // Generate AST node that throws a TypeError with the given |
540 // type. Both arguments must be non-null (in the handle sense). | 540 // type. Both arguments must be non-null (in the handle sense). |
541 Expression* NewThrowTypeError( | 541 Expression* NewThrowTypeError(const char* type, Handle<Object> arg, int pos); |
542 const char* type, Handle<Object> arg1, Handle<Object> arg2, int pos); | |
543 | 542 |
544 // Generic AST generator for throwing errors from compiled code. | 543 // Generic AST generator for throwing errors from compiled code. |
545 Expression* NewThrowError( | 544 Expression* NewThrowError( |
546 Handle<String> constructor, const char* type, | 545 Handle<String> constructor, const char* type, |
547 Vector<Handle<Object> > arguments, int pos); | 546 Vector<Handle<Object> > arguments, int pos); |
548 | 547 |
549 // Reporting errors. | 548 // Reporting errors. |
550 void ReportMessageAt(Scanner::Location source_location, | 549 void ReportMessageAt(Scanner::Location source_location, |
551 const char* message, | 550 const char* message, |
552 Vector<const char*> args, | 551 Vector<const char*> args, |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 private: | 838 private: |
840 static const int kLiteralTypeSlot = 0; | 839 static const int kLiteralTypeSlot = 0; |
841 static const int kElementsSlot = 1; | 840 static const int kElementsSlot = 1; |
842 | 841 |
843 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 842 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
844 }; | 843 }; |
845 | 844 |
846 } } // namespace v8::internal | 845 } } // namespace v8::internal |
847 | 846 |
848 #endif // V8_PARSER_H_ | 847 #endif // V8_PARSER_H_ |
OLD | NEW |