| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3387 ExpectToken(Token::kSEMICOLON); | 3387 ExpectToken(Token::kSEMICOLON); |
| 3388 library_.SetName(name); | 3388 library_.SetName(name); |
| 3389 } | 3389 } |
| 3390 } | 3390 } |
| 3391 | 3391 |
| 3392 | 3392 |
| 3393 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, | 3393 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, |
| 3394 intptr_t token_pos, | 3394 intptr_t token_pos, |
| 3395 const String& url, | 3395 const String& url, |
| 3396 const Array& import_map) { | 3396 const Array& import_map) { |
| 3397 Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler(); | 3397 Isolate* isolate = Isolate::Current(); |
| 3398 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); |
| 3398 if (handler == NULL) { | 3399 if (handler == NULL) { |
| 3399 ErrorMsg(token_pos, "no library handler registered"); | 3400 ErrorMsg(token_pos, "no library handler registered"); |
| 3400 } | 3401 } |
| 3401 Dart_Handle result = handler(tag, | 3402 Dart_Handle result = handler(tag, |
| 3402 Api::NewLocalHandle(library_), | 3403 Api::NewLocalHandle(isolate, library_), |
| 3403 Api::NewLocalHandle(url), | 3404 Api::NewLocalHandle(isolate, url), |
| 3404 Api::NewLocalHandle(import_map)); | 3405 Api::NewLocalHandle(isolate, import_map)); |
| 3405 if (Dart_IsError(result)) { | 3406 if (Dart_IsError(result)) { |
| 3406 Error& prev_error = Error::Handle(); | 3407 Error& prev_error = Error::Handle(); |
| 3407 prev_error ^= Api::UnwrapHandle(result); | 3408 prev_error ^= Api::UnwrapHandle(result); |
| 3408 AppendErrorMsg(prev_error, token_pos, "library handler failed"); | 3409 AppendErrorMsg(prev_error, token_pos, "library handler failed"); |
| 3409 } | 3410 } |
| 3410 return result; | 3411 return result; |
| 3411 } | 3412 } |
| 3412 | 3413 |
| 3413 | 3414 |
| 3414 void Parser::ParseLibraryImport() { | 3415 void Parser::ParseLibraryImport() { |
| (...skipping 4850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8265 void Parser::SkipQualIdent() { | 8266 void Parser::SkipQualIdent() { |
| 8266 ASSERT(IsIdentifier()); | 8267 ASSERT(IsIdentifier()); |
| 8267 ConsumeToken(); | 8268 ConsumeToken(); |
| 8268 if (CurrentToken() == Token::kPERIOD) { | 8269 if (CurrentToken() == Token::kPERIOD) { |
| 8269 ConsumeToken(); // Consume the kPERIOD token. | 8270 ConsumeToken(); // Consume the kPERIOD token. |
| 8270 ExpectIdentifier("identifier expected after '.'"); | 8271 ExpectIdentifier("identifier expected after '.'"); |
| 8271 } | 8272 } |
| 8272 } | 8273 } |
| 8273 | 8274 |
| 8274 } // namespace dart | 8275 } // namespace dart |
| OLD | NEW |