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 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8977 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
d3880a19bc
commit
a367058c6a
@ -747,9 +747,9 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable,
|
|||||||
__ li(a2, Operand(variable->name()));
|
__ li(a2, Operand(variable->name()));
|
||||||
// Declaration nodes are always introduced in one of two modes.
|
// Declaration nodes are always introduced in one of two modes.
|
||||||
ASSERT(mode == Variable::VAR ||
|
ASSERT(mode == Variable::VAR ||
|
||||||
mode == Variable::CONST);
|
mode == Variable::CONST ||
|
||||||
PropertyAttributes attr =
|
mode == Variable::LET);
|
||||||
(mode == Variable::VAR) ? NONE : READ_ONLY;
|
PropertyAttributes attr = (mode == Variable::CONST) ? READ_ONLY : NONE;
|
||||||
__ li(a1, Operand(Smi::FromInt(attr)));
|
__ li(a1, Operand(Smi::FromInt(attr)));
|
||||||
// Push initial value, if any.
|
// Push initial value, if any.
|
||||||
// Note: For variables we must not push an initial value (such as
|
// Note: For variables we must not push an initial value (such as
|
||||||
|
Loading…
Reference in New Issue
Block a user