| OLD | NEW | 
|     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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   681  |   681  | 
|   682   // Generate AST node that throws a ReferenceError with the given type. |   682   // Generate AST node that throws a ReferenceError with the given type. | 
|   683   Expression* NewThrowReferenceError(MessageTemplate::Template message, |   683   Expression* NewThrowReferenceError(MessageTemplate::Template message, | 
|   684                                      int pos); |   684                                      int pos); | 
|   685  |   685  | 
|   686   // Generate AST node that throws a SyntaxError with the given |   686   // Generate AST node that throws a SyntaxError with the given | 
|   687   // type. The first argument may be null (in the handle sense) in |   687   // type. The first argument may be null (in the handle sense) in | 
|   688   // which case no arguments are passed to the constructor. |   688   // which case no arguments are passed to the constructor. | 
|   689   Expression* NewThrowSyntaxError(MessageTemplate::Template message, |   689   Expression* NewThrowSyntaxError(MessageTemplate::Template message, | 
|   690                                   const AstRawString* arg, int pos); |   690                                   const AstRawString* arg, int pos); | 
 |   691   Expression* NewThrowSyntaxError(MessageTemplate::Template message, int pos); | 
|   691  |   692  | 
|   692   // Generate AST node that throws a TypeError with the given |   693   // Generate AST node that throws a TypeError with the given | 
|   693   // type. Both arguments must be non-null (in the handle sense). |   694   // type. Both arguments must be non-null (in the handle sense). | 
|   694   Expression* NewThrowTypeError(MessageTemplate::Template message, |   695   Expression* NewThrowTypeError(MessageTemplate::Template message, | 
|   695                                 const AstRawString* arg, int pos); |   696                                 const AstRawString* arg, int pos); | 
|   696  |   697  | 
|   697   // Generic AST generator for throwing errors from compiled code. |   698   // Generic AST generator for throwing errors from compiled code. | 
|   698   Expression* NewThrowError(Runtime::FunctionId function_id, |   699   Expression* NewThrowError(Runtime::FunctionId function_id, | 
|   699                             MessageTemplate::Template message, |   700                             MessageTemplate::Template message, | 
|   700                             const AstRawString* arg, int pos); |   701                             const AstRawString* arg, int pos); | 
| (...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1357         parser_->BuildParameterInitializationBlock(parameters, ok); |  1358         parser_->BuildParameterInitializationBlock(parameters, ok); | 
|  1358     if (!*ok) return; |  1359     if (!*ok) return; | 
|  1359     if (init_block != nullptr) { |  1360     if (init_block != nullptr) { | 
|  1360       body->Add(init_block, parser_->zone()); |  1361       body->Add(init_block, parser_->zone()); | 
|  1361     } |  1362     } | 
|  1362   } |  1363   } | 
|  1363 } |  1364 } | 
|  1364 } }  // namespace v8::internal |  1365 } }  // namespace v8::internal | 
|  1365  |  1366  | 
|  1366 #endif  // V8_PARSER_H_ |  1367 #endif  // V8_PARSER_H_ | 
| OLD | NEW |