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

Unified Diff: runtime/vm/kernel_to_il.h

Issue 2628693004: TokenPositions on more nodes when running from Kernel (Closed)
Patch Set: Created 3 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/kernel_to_il.h
diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
index ec5bfd494c06b63eb02c5b143fefadf8f5ba75ad..2e4c725a96fd89cc5428b681ef22d42c350b6fdc 100644
--- a/runtime/vm/kernel_to_il.h
+++ b/runtime/vm/kernel_to_il.h
@@ -561,12 +561,15 @@ class ScopeBuilder : public RecursiveVisitor {
virtual void VisitConstructor(Constructor* node);
private:
- void EnterScope(TreeNode* node);
- void ExitScope();
+ void EnterScope(TreeNode* node, TokenPosition start_position);
+ void ExitScope(TokenPosition end_position);
const Type& TranslateVariableType(VariableDeclaration* variable);
- LocalVariable* MakeVariable(const dart::String& name,
- const AbstractType& type);
+ LocalVariable* MakeVariable(
+ const dart::String& name,
+ const AbstractType& type,
+ TokenPosition declaration_pos = TokenPosition::kNoSource,
+ TokenPosition token_pos = TokenPosition::kNoSource);
void AddParameters(FunctionNode* function, intptr_t pos = 0);
void AddParameter(VariableDeclaration* declaration, intptr_t pos);
@@ -802,7 +805,7 @@ class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
Fragment NullConstant();
Fragment NativeCall(const dart::String* name, const Function* function);
Fragment PushArgument();
- Fragment Return();
+ Fragment Return(TokenPosition position = TokenPosition::kNoSource);
Kevin Millikin (Google) 2017/01/12 13:43:04 None of the other methods have default values for
jensj 2017/01/13 10:14:44 Done.
Fragment StaticCall(TokenPosition position,
const Function& target,
intptr_t argument_count);
@@ -818,9 +821,10 @@ class FlowGraphBuilder : public ExpressionVisitor, public StatementVisitor {
Fragment StoreInstanceField(
intptr_t offset,
StoreBarrierType emit_store_barrier = kEmitStoreBarrier);
- Fragment StoreLocal(LocalVariable* variable);
+ Fragment StoreLocal(LocalVariable* variable,
+ TokenPosition position = TokenPosition::kNoSource);
Kevin Millikin (Google) 2017/01/12 13:43:04 Also here, I'd make this required. For consistenc
jensj 2017/01/13 10:14:44 Done.
Fragment StoreStaticField(const dart::Field& field);
- Fragment StringInterpolate();
+ Fragment StringInterpolate(TokenPosition position);
Fragment ThrowTypeError();
Fragment ThrowNoSuchMethodError();
Fragment BuildImplicitClosureCreation(const Function& target);

Powered by Google App Engine
This is Rietveld 408576698