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

Unified Diff: runtime/vm/compiler.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/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 74795062b1ef56e71e69b289926e3e98ca2a5909..0de223e390e0126afcb7ae1469dddefd6b676673 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -1220,7 +1220,8 @@ static void DisassembleCode(const Function& function, bool optimized) {
THR_Print(" context var '%s' level %d offset %d",
var_name.ToCString(), var_info.scope_id, var_info.index());
}
- THR_Print(" (valid %d-%d)\n", var_info.begin_pos, var_info.end_pos);
+ THR_Print(" (valid %" Pd "-%" Pd ")\n", var_info.begin_pos.value(),
+ var_info.end_pos.value());
}
}
THR_Print("}\n");
@@ -1316,12 +1317,14 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
ParsedFunction* parsed_function = new(zone) ParsedFunction(
thread, Function::ZoneHandle(zone, function.raw()));
if (trace_compiler) {
+ const intptr_t token_size = function.end_token_pos().value() -
+ function.token_pos().value();
THR_Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n",
(osr_id == Compiler::kNoOSRDeoptId ? "" : "osr "),
(optimized ? "optimized " : ""),
function.ToFullyQualifiedCString(),
- function.token_pos(),
- (function.end_token_pos() - function.token_pos()));
+ function.token_pos().value(),
+ token_size);
}
INC_STAT(thread, num_functions_compiled, 1);
if (optimized) {
@@ -1418,7 +1421,7 @@ RawError* Compiler::CompileFunction(Thread* thread,
if (!isolate->compilation_allowed()) {
FATAL3("Precompilation missed function %s (%" Pd ", %s)\n",
function.ToLibNamePrefixedQualifiedCString(),
- function.token_pos(),
+ function.token_pos().value(),
Function::KindToCString(function.kind()));
}

Powered by Google App Engine
This is Rietveld 408576698