| 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 3375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3386 ExpectToken(Token::kSEMICOLON); | 3386 ExpectToken(Token::kSEMICOLON); |
| 3387 library_.SetName(name); | 3387 library_.SetName(name); |
| 3388 } | 3388 } |
| 3389 } | 3389 } |
| 3390 | 3390 |
| 3391 | 3391 |
| 3392 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, | 3392 Dart_Handle Parser::CallLibraryTagHandler(Dart_LibraryTag tag, |
| 3393 intptr_t token_pos, | 3393 intptr_t token_pos, |
| 3394 const String& url, | 3394 const String& url, |
| 3395 const Array& import_map) { | 3395 const Array& import_map) { |
| 3396 Dart_LibraryTagHandler handler = Isolate::Current()->library_tag_handler(); | 3396 Isolate* isolate = Isolate::Current(); |
| 3397 Dart_LibraryTagHandler handler = isolate->library_tag_handler(); |
| 3397 if (handler == NULL) { | 3398 if (handler == NULL) { |
| 3398 ErrorMsg(token_pos, "no library handler registered"); | 3399 ErrorMsg(token_pos, "no library handler registered"); |
| 3399 } | 3400 } |
| 3400 Dart_Handle result = handler(tag, | 3401 Dart_Handle result = handler(tag, |
| 3401 Api::NewLocalHandle(library_), | 3402 Api::NewLocalHandle(isolate, library_), |
| 3402 Api::NewLocalHandle(url), | 3403 Api::NewLocalHandle(isolate, url), |
| 3403 Api::NewLocalHandle(import_map)); | 3404 Api::NewLocalHandle(isolate, import_map)); |
| 3404 if (Dart_IsError(result)) { | 3405 if (Dart_IsError(result)) { |
| 3405 Error& prev_error = Error::Handle(); | 3406 Error& prev_error = Error::Handle(); |
| 3406 prev_error ^= Api::UnwrapHandle(result); | 3407 prev_error ^= Api::UnwrapHandle(result); |
| 3407 AppendErrorMsg(prev_error, token_pos, "library handler failed"); | 3408 AppendErrorMsg(prev_error, token_pos, "library handler failed"); |
| 3408 } | 3409 } |
| 3409 return result; | 3410 return result; |
| 3410 } | 3411 } |
| 3411 | 3412 |
| 3412 | 3413 |
| 3413 void Parser::ParseLibraryImport() { | 3414 void Parser::ParseLibraryImport() { |
| (...skipping 4866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8280 void Parser::SkipQualIdent() { | 8281 void Parser::SkipQualIdent() { |
| 8281 ASSERT(IsIdentifier()); | 8282 ASSERT(IsIdentifier()); |
| 8282 ConsumeToken(); | 8283 ConsumeToken(); |
| 8283 if (CurrentToken() == Token::kPERIOD) { | 8284 if (CurrentToken() == Token::kPERIOD) { |
| 8284 ConsumeToken(); // Consume the kPERIOD token. | 8285 ConsumeToken(); // Consume the kPERIOD token. |
| 8285 ExpectIdentifier("identifier expected after '.'"); | 8286 ExpectIdentifier("identifier expected after '.'"); |
| 8286 } | 8287 } |
| 8287 } | 8288 } |
| 8288 | 8289 |
| 8289 } // namespace dart | 8290 } // namespace dart |
| OLD | NEW |