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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 253013006: Add flag —source-lines which emits appropriate source lines as code comments. Added token_pos to … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 35591)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -717,14 +717,16 @@
Value* context = Bind(new CurrentContextInstr());
while (delta-- > 0) {
context = Bind(new LoadFieldInstr(
- context, Context::parent_offset(), Type::ZoneHandle()));
+ context, Context::parent_offset(), Type::ZoneHandle(),
+ Scanner::kNoSourcePos));
}
Value* tmp_val = Bind(new LoadLocalInstr(*tmp_var));
StoreInstanceFieldInstr* store =
new StoreInstanceFieldInstr(Context::variable_offset(local.index()),
context,
tmp_val,
- kEmitStoreBarrier);
+ kEmitStoreBarrier,
+ Scanner::kNoSourcePos);
Do(store);
return ExitTempLocalScope(tmp_var);
} else {
@@ -743,11 +745,13 @@
Value* context = Bind(new CurrentContextInstr());
while (delta-- > 0) {
context = Bind(new LoadFieldInstr(
- context, Context::parent_offset(), Type::ZoneHandle()));
+ context, Context::parent_offset(), Type::ZoneHandle(),
+ Scanner::kNoSourcePos));
}
return new LoadFieldInstr(context,
Context::variable_offset(local.index()),
- local.type());
+ local.type(),
+ Scanner::kNoSourcePos);
} else {
return new LoadLocalInstr(local);
}
@@ -2150,8 +2154,8 @@
: kEmitStoreBarrier;
intptr_t index_scale = FlowGraphCompiler::ElementSizeFor(class_id);
StoreIndexedInstr* store = new StoreIndexedInstr(
- array, index, for_value.value(),
- emit_store_barrier, index_scale, class_id, deopt_id);
+ array, index, for_value.value(), emit_store_barrier,
+ index_scale, class_id, deopt_id, node->token_pos());
Do(store);
}
ReturnDefinition(ExitTempLocalScope(tmp_var));
@@ -2247,7 +2251,8 @@
Do(new StoreInstanceFieldInstr(Closure::function_offset(),
closure_tmp_val,
func_val,
- kEmitStoreBarrier));
+ kEmitStoreBarrier,
+ node->token_pos()));
if (is_implicit) {
// Create new context containing the receiver.
const intptr_t kNumContextVariables = 1; // The receiver.
@@ -2264,14 +2269,16 @@
Do(new StoreInstanceFieldInstr(Context::variable_offset(0),
context_tmp_val,
receiver,
- kEmitStoreBarrier));
+ kEmitStoreBarrier,
+ node->token_pos()));
// Store new context in closure.
closure_tmp_val = Bind(new LoadLocalInstr(*closure_tmp_var));
context_tmp_val = Bind(new LoadLocalInstr(*context_tmp_var));
Do(new StoreInstanceFieldInstr(Closure::context_offset(),
closure_tmp_val,
context_tmp_val,
- kEmitStoreBarrier));
+ kEmitStoreBarrier,
+ node->token_pos()));
Do(ExitTempLocalScope(context_tmp_var));
}
} else {
@@ -2281,7 +2288,8 @@
Do(new StoreInstanceFieldInstr(Closure::context_offset(),
closure_tmp_val,
context,
- kEmitStoreBarrier));
+ kEmitStoreBarrier,
+ node->token_pos()));
}
ReturnDefinition(ExitTempLocalScope(closure_tmp_var));
}
@@ -2596,7 +2604,8 @@
return Bind(new LoadFieldInstr(
instantiator,
type_arguments_field_offset,
- Type::ZoneHandle())); // Not an instance, no type.
+ Type::ZoneHandle(), // Not an instance, no type.
+ Scanner::kNoSourcePos));
}
@@ -2943,7 +2952,8 @@
LoadFieldInstr* load = new LoadFieldInstr(
receiver,
String::length_offset(),
- Type::ZoneHandle(Type::SmiType()));
+ Type::ZoneHandle(Type::SmiType()),
+ node->token_pos());
load->set_result_cid(kSmiCid);
load->set_recognized_kind(MethodRecognizer::kStringBaseLength);
if (kind == MethodRecognizer::kStringBaseLength) {
@@ -2968,7 +2978,8 @@
LoadFieldInstr* load = new LoadFieldInstr(
receiver,
OffsetForLengthGetter(kind),
- Type::ZoneHandle(Type::SmiType()));
+ Type::ZoneHandle(Type::SmiType()),
+ node->token_pos());
load->set_is_immutable(kind != MethodRecognizer::kGrowableArrayLength);
load->set_result_cid(kSmiCid);
load->set_recognized_kind(kind);
@@ -2985,13 +2996,15 @@
LoadFieldInstr* data_load = new LoadFieldInstr(
receiver,
Array::data_offset(),
- Type::ZoneHandle(Type::DynamicType()));
+ Type::ZoneHandle(Type::DynamicType()),
+ node->token_pos());
data_load->set_result_cid(kArrayCid);
Value* data = Bind(data_load);
LoadFieldInstr* length_load = new LoadFieldInstr(
data,
Array::length_offset(),
- Type::ZoneHandle(Type::SmiType()));
+ Type::ZoneHandle(Type::SmiType()),
+ node->token_pos());
length_load->set_result_cid(kSmiCid);
length_load->set_recognized_kind(MethodRecognizer::kObjectArrayLength);
return ReturnDefinition(length_load);
@@ -3059,7 +3072,8 @@
LoadFieldInstr* load = new LoadFieldInstr(
for_instance.value(),
&node->field(),
- AbstractType::ZoneHandle(node->field().type()));
+ AbstractType::ZoneHandle(node->field().type()),
+ node->token_pos());
if (node->field().guarded_cid() != kIllegalCid) {
if (!node->field().is_nullable() ||
(node->field().guarded_cid() == kNullCid)) {
@@ -3101,7 +3115,8 @@
new StoreInstanceFieldInstr(node->field(),
for_instance.value(),
store_value,
- kEmitStoreBarrier);
+ kEmitStoreBarrier,
+ node->token_pos());
store->set_is_initialization(true); // Maybe initializing store.
ReturnDefinition(store);
}
@@ -3338,7 +3353,8 @@
context = Bind(
new LoadFieldInstr(context,
Context::parent_offset(),
- Type::ZoneHandle())); // Not an instance, no type.
+ Type::ZoneHandle(), // Not an instance, no type.
+ Scanner::kNoSourcePos));
}
AddInstruction(new StoreContextInstr(context));
}
@@ -3383,7 +3399,8 @@
Do(new StoreInstanceFieldInstr(Context::parent_offset(),
tmp_val,
parent_context,
- kEmitStoreBarrier));
+ kEmitStoreBarrier,
+ Scanner::kNoSourcePos));
AddInstruction(
new StoreContextInstr(Bind(ExitTempLocalScope(tmp_var))));
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698