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

Unified Diff: runtime/vm/flow_graph_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/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index eabcbf164d7c063bbfe4cc511014d685bedc0571..a23ba57e6f853d37a16e519d5f1da25039b24c7f 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -449,7 +449,7 @@ void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) {
void FlowGraphCompiler::EmitSourceLine(Instruction* instr) {
- if ((instr->token_pos() < 0) || (instr->env() == NULL)) {
+ if (!instr->token_pos().IsReal() || (instr->env() == NULL)) {
return;
}
const Script& script =
@@ -764,7 +764,7 @@ void FlowGraphCompiler::SetNeedsStacktrace(intptr_t try_index) {
// Uses current pc position and try-index.
void FlowGraphCompiler::AddCurrentDescriptor(RawPcDescriptors::Kind kind,
intptr_t deopt_id,
- intptr_t token_pos) {
+ TokenDescriptor token_pos) {
// When running with optimizations disabled, don't emit deopt-descriptors.
if (!CanOptimize() && (kind == RawPcDescriptors::kDeopt)) return;
pc_descriptors_list()->AddDescriptor(kind,
@@ -790,7 +790,7 @@ void FlowGraphCompiler::AddStubCallTarget(const Code& code) {
void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id,
- intptr_t token_pos) {
+ TokenDescriptor token_pos) {
ASSERT(is_optimizing());
ASSERT(!intrinsic_mode());
CompilerDeoptInfo* info =
@@ -1049,8 +1049,8 @@ void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) {
RawLocalVarDescriptors::VarInfo info;
info.set_kind(RawLocalVarDescriptors::kSavedCurrentContext);
info.scope_id = 0;
- info.begin_pos = 0;
- info.end_pos = 0;
+ info.begin_pos = TokenDescriptor::kMinSource;
+ info.end_pos = TokenDescriptor::kMinSource;
info.set_index(parsed_function().current_context_var()->index());
var_descs.SetVar(0, Symbols::CurrentContextVar(), &info);
}
@@ -1140,7 +1140,7 @@ bool FlowGraphCompiler::TryIntrinsify() {
void FlowGraphCompiler::GenerateInstanceCall(
intptr_t deopt_id,
- intptr_t token_pos,
+ TokenDescriptor token_pos,
intptr_t argument_count,
LocationSummary* locs,
const ICData& ic_data_in) {
@@ -1206,7 +1206,7 @@ void FlowGraphCompiler::GenerateInstanceCall(
void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id,
- intptr_t token_pos,
+ TokenDescriptor token_pos,
const Function& function,
intptr_t argument_count,
const Array& argument_names,
@@ -1785,7 +1785,7 @@ void FlowGraphCompiler::EmitPolymorphicInstanceCall(
intptr_t argument_count,
const Array& argument_names,
intptr_t deopt_id,
- intptr_t token_pos,
+ TokenDescriptor token_pos,
LocationSummary* locs) {
if (FLAG_polymorphic_with_deopt) {
Label* deopt = AddDeoptStub(deopt_id,

Powered by Google App Engine
This is Rietveld 408576698