| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/parser.h" | 5 #include "vm/parser.h" |
| 6 | 6 |
| 7 #include "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3093 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, | 3093 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, |
| 3094 intptr_t token_pos, | 3094 intptr_t token_pos, |
| 3095 const String& url) { | 3095 const String& url) { |
| 3096 Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler(); | 3096 Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler(); |
| 3097 if (handler == NULL) { | 3097 if (handler == NULL) { |
| 3098 ErrorMsg(token_pos, "no library handler registered"); | 3098 ErrorMsg(token_pos, "no library handler registered"); |
| 3099 } | 3099 } |
| 3100 Dart_Handle result = handler(tag, | 3100 Dart_Handle result = handler(tag, |
| 3101 Api::NewLocalHandle(library_), | 3101 Api::NewLocalHandle(library_), |
| 3102 Api::NewLocalHandle(url)); | 3102 Api::NewLocalHandle(url)); |
| 3103 if (!Dart_IsValid(result)) { | 3103 if (Dart_IsError(result)) { |
| 3104 ErrorMsg(token_pos, "library handler failed: %s", Dart_GetError(result)); | 3104 ErrorMsg(token_pos, "library handler failed: %s", Dart_GetError(result)); |
| 3105 } | 3105 } |
| 3106 return result; | 3106 return result; |
| 3107 } | 3107 } |
| 3108 | 3108 |
| 3109 | 3109 |
| 3110 void Parser::ParseLibraryImport() { | 3110 void Parser::ParseLibraryImport() { |
| 3111 while (CurrentToken() == Token::kIMPORT) { | 3111 while (CurrentToken() == Token::kIMPORT) { |
| 3112 intptr_t import_pos = token_index_; | 3112 intptr_t import_pos = token_index_; |
| 3113 ConsumeToken(); | 3113 ConsumeToken(); |
| (...skipping 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7266 } | 7266 } |
| 7267 | 7267 |
| 7268 | 7268 |
| 7269 void Parser::SkipNestedExpr() { | 7269 void Parser::SkipNestedExpr() { |
| 7270 const bool saved_mode = SetAllowFunctionLiterals(true); | 7270 const bool saved_mode = SetAllowFunctionLiterals(true); |
| 7271 SkipExpr(); | 7271 SkipExpr(); |
| 7272 SetAllowFunctionLiterals(saved_mode); | 7272 SetAllowFunctionLiterals(saved_mode); |
| 7273 } | 7273 } |
| 7274 | 7274 |
| 7275 } // namespace dart | 7275 } // namespace dart |
| OLD | NEW |