Reviewers: Steven,
Description:
MIPS: port Parse harmony let declarations.
Port r8944 (a5a36f4)
Original commit message:
Implementation of the harmony block scoped let bindings as proposed here:
http://wiki.ecmascript.org/doku.php?id=harmony:block_scoped_bindings
Changes to the syntax are explained there. They are active under the
harmony_block_scoping_ flag in the parser.
BUG=
TEST=
Please review this at http://codereview.chromium.org/7696020/
Affected files:
M src/mips/full-codegen-mips.cc
Index: src/mips/full-codegen-mips.cc
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
index
d8909c9ddd4c536affd089f16c5e080986dcf8c9..856f5179a74f2222ed8a9df98d625c901fc7b72c
100644
--- a/src/mips/full-codegen-mips.cc
+++ b/src/mips/full-codegen-mips.cc
@@ -747,9 +747,9 @@ void FullCodeGenerator::EmitDeclaration(Variable*
variable,
__ li(a2, Operand(variable->name()));
// Declaration nodes are always introduced in one of two modes.
ASSERT(mode == Variable::VAR ||
- mode == Variable::CONST);
- PropertyAttributes attr =
- (mode == Variable::VAR) ? NONE : READ_ONLY;
+ mode == Variable::CONST ||
+ mode == Variable::LET);
+ PropertyAttributes attr = (mode == Variable::CONST) ? READ_ONLY :
NONE;
__ li(a1, Operand(Smi::FromInt(attr)));
// Push initial value, if any.
// Note: For variables we must not push an initial value (such as
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev