Revision: 8977
Author: [email protected]
Date: Mon Aug 22 02:05:28 2011
Log: 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=
Review URL: http://codereview.chromium.org/7696020
http://code.google.com/p/v8/source/detail?r=8977
Modified:
/branches/bleeding_edge/src/mips/full-codegen-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/full-codegen-mips.cc Mon Aug 22
02:00:27 2011
+++ /branches/bleeding_edge/src/mips/full-codegen-mips.cc Mon Aug 22
02:05:28 2011
@@ -747,9 +747,9 @@
__ 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