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

Unified Diff: runtime/vm/kernel_to_il.h

Issue 2420323002: Don't use in-class initialization of non-static data members. It's a C++11 extension. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.h
diff --git a/runtime/vm/kernel_to_il.h b/runtime/vm/kernel_to_il.h
index ccf4801a81e0055ec34d0ec86104be8098d94c57..6f50949e500feaca4a3b5aa9527b9105f7ab10ce 100644
--- a/runtime/vm/kernel_to_il.h
+++ b/runtime/vm/kernel_to_il.h
@@ -382,34 +382,43 @@ struct FunctionScope {
class ScopeBuildingResult : public ZoneAllocated {
public:
+ ScopeBuildingResult()
+ : this_variable(NULL),
+ type_arguments_variable(NULL),
+ switch_variable(NULL),
+ finally_return_variable(NULL),
+ setter_value(NULL),
+ yield_jump_variable(NULL),
+ yield_context_variable(NULL) {}
+
Map<VariableDeclaration, LocalVariable*> locals;
Map<TreeNode, LocalScope*> scopes;
GrowableArray<FunctionScope> function_scopes;
// Only non-NULL for instance functions.
- LocalVariable* this_variable = NULL;
+ LocalVariable* this_variable;
// Only non-NULL for factory constructor functions.
- LocalVariable* type_arguments_variable = NULL;
+ LocalVariable* type_arguments_variable;
// Non-NULL when the function contains a switch statement.
- LocalVariable* switch_variable = NULL;
+ LocalVariable* switch_variable;
// Non-NULL when the function contains a return inside a finally block.
- LocalVariable* finally_return_variable = NULL;
+ LocalVariable* finally_return_variable;
// Non-NULL when the function is a setter.
- LocalVariable* setter_value = NULL;
+ LocalVariable* setter_value;
// Non-NULL if the function contains yield statement.
// TODO(27590) actual variable is called :await_jump_var, we should rename
// it to reflect the fact that it is used for both await and yield.
- LocalVariable* yield_jump_variable = NULL;
+ LocalVariable* yield_jump_variable;
// Non-NULL if the function contains yield statement.
// TODO(27590) actual variable is called :await_ctx_var, we should rename
// it to reflect the fact that it is used for both await and yield.
- LocalVariable* yield_context_variable = NULL;
+ LocalVariable* yield_context_variable;
// Variables used in exception handlers, one per exception handler nesting
// level.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698