Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Side by Side Diff: src/parser.h

Issue 1210533003: Use C runtime functions for ThrowNewXXError desugarings. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 // which case no arguments are passed to the constructor. 690 // which case no arguments are passed to the constructor.
691 Expression* NewThrowSyntaxError(MessageTemplate::Template message, 691 Expression* NewThrowSyntaxError(MessageTemplate::Template message,
692 const AstRawString* arg, int pos); 692 const AstRawString* arg, int pos);
693 693
694 // Generate AST node that throws a TypeError with the given 694 // Generate AST node that throws a TypeError with the given
695 // type. Both arguments must be non-null (in the handle sense). 695 // type. Both arguments must be non-null (in the handle sense).
696 Expression* NewThrowTypeError(MessageTemplate::Template message, 696 Expression* NewThrowTypeError(MessageTemplate::Template message,
697 const AstRawString* arg, int pos); 697 const AstRawString* arg, int pos);
698 698
699 // Generic AST generator for throwing errors from compiled code. 699 // Generic AST generator for throwing errors from compiled code.
700 Expression* NewThrowError(const AstRawString* constructor, 700 Expression* NewThrowError(Runtime::FunctionId function_id,
701 MessageTemplate::Template message, 701 MessageTemplate::Template message,
702 const AstRawString* arg, int pos); 702 const AstRawString* arg, int pos);
703 703
704 // Reporting errors. 704 // Reporting errors.
705 void ReportMessageAt(Scanner::Location source_location, 705 void ReportMessageAt(Scanner::Location source_location,
706 MessageTemplate::Template message, 706 MessageTemplate::Template message,
707 const char* arg = NULL, 707 const char* arg = NULL,
708 ParseErrorType error_type = kSyntaxError); 708 ParseErrorType error_type = kSyntaxError);
709 void ReportMessage(MessageTemplate::Template message, const char* arg = NULL, 709 void ReportMessage(MessageTemplate::Template message, const char* arg = NULL,
710 ParseErrorType error_type = kSyntaxError); 710 ParseErrorType error_type = kSyntaxError);
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 auto* init_block = 1337 auto* init_block =
1338 parser_->BuildParameterInitializationBlock(formal_parameters, ok); 1338 parser_->BuildParameterInitializationBlock(formal_parameters, ok);
1339 if (!*ok) return; 1339 if (!*ok) return;
1340 if (init_block != nullptr) { 1340 if (init_block != nullptr) {
1341 body->Add(init_block, parser_->zone()); 1341 body->Add(init_block, parser_->zone());
1342 } 1342 }
1343 } 1343 }
1344 } } // namespace v8::internal 1344 } } // namespace v8::internal
1345 1345
1346 #endif // V8_PARSER_H_ 1346 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698