Reviewers: fschneider, rossberg,

Message:
PTAL.

Description:
Block scoped const variables.

This implements block scoped 'const' declared variables in harmony mode. They have a temporal dead zone semantics similar to 'let' bindings, i.e. accessing
uninitialized 'const' bindings in throws a ReferenceError.

As for 'let' bindings, the semantics of 'const' bindings in global scope is not
correctly implemented yet. Furthermore assignments to 'const's are silently
ignored. Another CL will introduce treatment of those assignments as early
errors.


Please review this at http://codereview.chromium.org/7992005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/ast.h
  M src/contexts.h
  M src/contexts.cc
  M src/full-codegen.cc
  M src/ia32/full-codegen-ia32.cc
  M src/messages.js
  M src/parser.cc
  M src/preparser.cc
  M src/runtime.cc
  M src/scopeinfo.h
  M src/scopeinfo.cc
  M src/scopes.h
  M src/scopes.cc
  M src/token.h
  M src/variables.h
  M src/variables.cc
  M test/mjsunit/harmony/block-conflicts.js
  M test/mjsunit/harmony/block-let-semantics.js
  M test/mjsunit/harmony/block-scoping.js


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to