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

Unified Diff: runtime/vm/stack_frame.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/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 65f7c3ba61346ba298351dd1bc97ad9d07852f9a..fb3d8d858cc0358169d7f1746ad3bcff87891e0d 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -240,10 +240,10 @@ bool StackFrame::FindExceptionHandler(Thread* thread,
}
-intptr_t StackFrame::GetTokenPos() const {
+TokenPosition StackFrame::GetTokenPos() const {
const Code& code = Code::Handle(LookupDartCode());
if (code.IsNull()) {
- return -1; // Stub frames do not have token_pos.
+ return TokenPosition::kNoSource; // Stub frames do not have token_pos.
}
uword pc_offset = pc() - code.EntryPoint();
const PcDescriptors& descriptors =
@@ -252,10 +252,10 @@ intptr_t StackFrame::GetTokenPos() const {
PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind);
while (iter.MoveNext()) {
if (iter.PcOffset() == pc_offset) {
- return iter.TokenPos();
+ return TokenPosition(iter.TokenPos());
}
}
- return -1;
+ return TokenPosition::kNoSource;
}
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | runtime/vm/stub_code_arm64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698