Don't use in-class initialization of non-static data members. It's a C++11 extension.

TBR=asiva@google.com

Review URL: https://codereview.chromium.org/2420323002 .
This commit is contained in:
Vyacheslav Egorov 2016-10-15 23:02:49 +02:00
parent f67ce21068
commit caa0167457

View file

@ -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.