| 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 4171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7285 } | 7285 } |
| 7286 | 7286 |
| 7287 | 7287 |
| 7288 void Parser::SkipNestedExpr() { | 7288 void Parser::SkipNestedExpr() { |
| 7289 const bool saved_mode = SetAllowFunctionLiterals(true); | 7289 const bool saved_mode = SetAllowFunctionLiterals(true); |
| 7290 SkipExpr(); | 7290 SkipExpr(); |
| 7291 SetAllowFunctionLiterals(saved_mode); | 7291 SetAllowFunctionLiterals(saved_mode); |
| 7292 } | 7292 } |
| 7293 | 7293 |
| 7294 } // namespace dart | 7294 } // namespace dart |
| OLD | NEW |