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

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
« no previous file with comments | « runtime/lib/errors.cc ('k') | runtime/lib/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/mirrors.cc
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 564db227d8f6aac65ce2b9c47838d60c54e97251..24254dbeb663aacdf1df30b14364b1d46aa5f7fb 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() == TokenPosition::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, TokenPosition::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;
+ TokenPosition token_pos = TokenPosition::kNoSource;
if (decl.IsFunction()) {
const Function& func = Function::Cast(decl);
@@ -2017,13 +2017,13 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) {
return CreateSourceLocation(uri, 1, 1);
}
const TokenStream& stream = TokenStream::Handle(script.tokens());
- TokenStream::Iterator tkit(stream, 0);
+ TokenStream::Iterator tkit(stream, TokenPosition::kMinSource);
if (tkit.CurrentTokenKind() == Token::kSCRIPTTAG) tkit.Advance();
token_pos = tkit.CurrentPosition();
}
ASSERT(!script.IsNull());
- ASSERT(token_pos != Token::kNoSourcePos);
+ ASSERT(token_pos != TokenPosition::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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698