Reviewers: Michael Starzinger,

Description:
Implement proper module linking.

Specifically:

- In parser, check that all exports are defined.
- Move JSModule allocation from parser to scope resolution.
- Move JSModule linking from full codegen to scope resolution.
- Implement module accessors for exported value members.
- Allocate module contexts statically along with JSModules
(to allow static linking), but chain them when module literal is evaluated.
- Make module contexts' extension slot refer to resp. JSModule
  (makes modules' ScopeInfo accessible from context).
- Some other tweaks to context handling in general.
- Make any code containing module literals (and thus embedding
  static references to JSModules) non-cacheable.

This enables accessing module instance objects as expected.
Import declarations are a separate feature and do not work yet.

[email protected]
BUG=v8:1569
TEST=


Please review this at https://chromiumcodereview.appspot.com/10690043/

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

Affected files:
  M src/accessors.h
  M src/accessors.cc
  M src/ast.h
  M src/ast.cc
  M src/compiler.cc
  M src/contexts.h
  M src/contexts.cc
  M src/factory.h
  M src/factory.cc
  M src/full-codegen.cc
  M src/heap.h
  M src/heap.cc
  M src/messages.js
  M src/objects-debug.cc
  M src/objects-inl.h
  M src/objects-printer.cc
  M src/objects.h
  M src/parser.h
  M src/parser.cc
  M src/runtime.h
  M src/runtime.cc
  M src/scopeinfo.cc
  M src/scopes.h
  M src/scopes.cc
  M test/mjsunit/harmony/module-linking.js
  M test/mjsunit/harmony/module-parsing.js
  A + test/mjsunit/harmony/module-recompile.js
  M test/mjsunit/harmony/module-resolution.js


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

Reply via email to