| Index: src/full-codegen.h
|
| diff --git a/src/full-codegen.h b/src/full-codegen.h
|
| index 73a6c412ee9021cafc56e48af6fe6e0db28654b9..1439942db8ae33785ce817ba91d3c669e34cddf9 100644
|
| --- a/src/full-codegen.h
|
| +++ b/src/full-codegen.h
|
| @@ -586,6 +586,19 @@ class FullCodeGenerator: public AstVisitor {
|
| // is expected in the accumulator.
|
| void EmitAssignment(Expression* expr);
|
|
|
| + // Shall an error be thrown if assignment with 'op' operation is perfomed
|
| + // on this variable in given language mode?
|
| + static bool IsSignallingAssignmentToConst(Variable* var, Token::Value op,
|
| + StrictMode strict_mode) {
|
| + if (var->mode() == CONST) return op != Token::INIT_CONST;
|
| +
|
| + if (var->mode() == CONST_LEGACY) {
|
| + return strict_mode == STRICT && op != Token::INIT_CONST_LEGACY;
|
| + }
|
| +
|
| + return false;
|
| + }
|
| +
|
| // Complete a variable assignment. The right-hand-side value is expected
|
| // in the accumulator.
|
| void EmitVariableAssignment(Variable* var,
|
|
|