Chromium Code Reviews| Index: runtime/lib/mirrors.cc |
| diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc |
| index 564db227d8f6aac65ce2b9c47838d60c54e97251..6bdf686364671cf8f4a98a9105845af77bf1a73e 100644 |
| --- a/runtime/lib/mirrors.cc |
| +++ b/runtime/lib/mirrors.cc |
| @@ -140,7 +140,7 @@ static RawInstance* CreateParameterMirrorList(const Function& func, |
| has_extra_parameter_info = false; |
| } |
| if (func.IsSignatureFunction() && |
| - (func.token_pos() == Token::kNoSourcePos)) { |
| + (func.token_pos() == TokenDescriptor::kNoSource)) { |
| // Signature functions (except those describing typedefs) get canonicalized, |
| // hence do not have a token position, and therefore cannot be reparsed. |
| has_extra_parameter_info = false; |
| @@ -1448,7 +1448,7 @@ DEFINE_NATIVE_ENTRY(ClosureMirror_function, 1) { |
| TypeArguments::Handle(closure.GetTypeArguments()); |
| const Class& cls = |
| Class::Handle(Isolate::Current()->object_store()->object_class()); |
| - instantiator = Type::New(cls, arguments, Token::kNoSourcePos); |
| + instantiator = Type::New(cls, arguments, TokenDescriptor::kNoSource); |
| instantiator.SetIsFinalized(); |
| } |
| return CreateMethodMirror(function, |
| @@ -1969,7 +1969,7 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) { |
| } |
| Script& script = Script::Handle(); |
| - intptr_t token_pos = Token::kNoSourcePos; |
| + TokenDescriptor token_pos = TokenDescriptor::kNoSource; |
| if (decl.IsFunction()) { |
| const Function& func = Function::Cast(decl); |
| @@ -2019,11 +2019,11 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) { |
| const TokenStream& stream = TokenStream::Handle(script.tokens()); |
| TokenStream::Iterator tkit(stream, 0); |
| if (tkit.CurrentTokenKind() == Token::kSCRIPTTAG) tkit.Advance(); |
| - token_pos = tkit.CurrentPosition(); |
| + token_pos = TokenDescriptor(tkit.CurrentPosition()); |
|
Ivan Posva
2016/02/01 17:16:52
Should we consider having the TokenStream::Iterato
Cutch
2016/02/02 18:00:20
Done.
|
| } |
| ASSERT(!script.IsNull()); |
| - ASSERT(token_pos != Token::kNoSourcePos); |
| + ASSERT(token_pos != TokenDescriptor::kNoSource); |
| const String& uri = String::Handle(script.url()); |
| intptr_t from_line = 0; |