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

Unified Diff: runtime/vm/simulator_arm64.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/simulator_arm.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.cc
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index e0df11546be4f5d119074b5d8042f3368973bee6..8ab84559953b0b609636d15d015fcc2ca4c29218 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -95,11 +95,11 @@ class SimulatorDebugger {
bool GetDValue(char* desc, uint64_t* value);
bool GetQValue(char* desc, simd_value_t* value);
- static intptr_t GetApproximateTokenIndex(const Code& code, uword pc);
+ static TokenPosition GetApproximateTokenIndex(const Code& code, uword pc);
static void PrintDartFrame(uword pc, uword fp, uword sp,
const Function& function,
- intptr_t token_pos,
+ TokenPosition token_pos,
bool is_optimized,
bool is_inlined);
void PrintBacktrace();
@@ -263,9 +263,9 @@ bool SimulatorDebugger::GetQValue(char* desc, simd_value_t* value) {
}
-intptr_t SimulatorDebugger::GetApproximateTokenIndex(const Code& code,
- uword pc) {
- intptr_t token_pos = -1;
+TokenPosition SimulatorDebugger::GetApproximateTokenIndex(const Code& code,
+ uword pc) {
+ TokenPosition token_pos = TokenPosition::kNoSource;
uword pc_offset = pc - code.EntryPoint();
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
@@ -273,7 +273,7 @@ intptr_t SimulatorDebugger::GetApproximateTokenIndex(const Code& code,
while (iter.MoveNext()) {
if (iter.PcOffset() == pc_offset) {
return iter.TokenPos();
- } else if ((token_pos <= 0) && (iter.PcOffset() > pc_offset)) {
+ } else if (!token_pos.IsReal() && (iter.PcOffset() > pc_offset)) {
token_pos = iter.TokenPos();
}
}
@@ -283,7 +283,7 @@ intptr_t SimulatorDebugger::GetApproximateTokenIndex(const Code& code,
void SimulatorDebugger::PrintDartFrame(uword pc, uword fp, uword sp,
const Function& function,
- intptr_t token_pos,
+ TokenPosition token_pos,
bool is_optimized,
bool is_inlined) {
const Script& script = Script::Handle(function.script());
@@ -291,7 +291,7 @@ void SimulatorDebugger::PrintDartFrame(uword pc, uword fp, uword sp,
const String& url = String::Handle(script.url());
intptr_t line = -1;
intptr_t column = -1;
- if (token_pos >= 0) {
+ if (token_pos.IsReal()) {
script.GetTokenLocation(token_pos, &line, &column);
}
OS::Print("pc=0x%" Px " fp=0x%" Px " sp=0x%" Px " %s%s (%s:%" Pd
« no previous file with comments | « runtime/vm/simulator_arm.cc ('k') | runtime/vm/simulator_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698