Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Unified Diff: runtime/lib/mirrors.cc

Issue 1644793002: Replace intptr_t with TokenDescriptor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « runtime/lib/errors.cc ('k') | runtime/lib/object.cc » ('j') | runtime/vm/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698