|
Implement rudimentary module linking.
Constructs the (generally cyclic) graph of module instance objects
and populates their exports. Any exports other than nested modules
are currently set to 'undefined' (but already present as properties).
Details:
- Added new type JSModule for instance objects: a JSObject carrying a context.
- Statically allocate instance objects for all module literals (in parser 8-}).
- Extend interfaces to record and unify concrete instance objects,
and to support iteration over members.
- Introduce new runtime function for pushing module contexts.
- Generate code for allocating, initializing, and setting module contexts,
and for populating instance objects from module literals.
Currently, all non-module exports are still initialized with 'undefined'.
- Module aliases are resolved statically, so no special code is required.
- Make sure that code containing module constructs is never optimized
(macrofy AST node construction flag setting while we're at it).
- Add test case checking linkage.
Baseline: http://codereview.chromium.org/9722043/
R=svenpanne@chromium.org,mstarzinger@chromium.org
BUG=
TEST=
Committed: https://code.google.com/p/v8/source/detail?r=11336
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+596 lines, -245 lines) |
Patch |
|
M |
src/arm/full-codegen-arm.cc
|
View
|
1
2
|
4 chunks |
+20 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/ast.h
|
View
|
1
2
|
4 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/ast.cc
|
View
|
1
2
|
2 chunks |
+73 lines, -128 lines |
0 comments
|
Download
|
|
M |
src/factory.h
|
View
|
|
3 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/factory.cc
|
View
|
1
2
|
3 chunks |
+19 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/full-codegen.h
|
View
|
1
2
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/full-codegen.cc
|
View
|
1
2
|
3 chunks |
+70 lines, -11 lines |
0 comments
|
Download
|
|
M |
src/heap.h
|
View
|
1
2
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/heap.cc
|
View
|
1
2
|
2 chunks |
+26 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/hydrogen.cc
|
View
|
1
2
|
2 chunks |
+8 lines, -38 lines |
0 comments
|
Download
|
|
M |
src/ia32/full-codegen-ia32.cc
|
View
|
1
2
|
4 chunks |
+19 lines, -10 lines |
0 comments
|
Download
|
|
M |
src/interface.h
|
View
|
|
4 chunks |
+43 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/interface.cc
|
View
|
|
3 chunks |
+11 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/objects.h
|
View
|
1
2
|
6 chunks |
+34 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects.cc
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/objects-debug.cc
|
View
|
1
2
|
2 chunks |
+12 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/objects-inl.h
|
View
|
1
2
|
5 chunks |
+22 lines, -1 line |
0 comments
|
Download
|
|
M |
src/objects-printer.cc
|
View
|
1
2
|
4 chunks |
+18 lines, -1 line |
0 comments
|
Download
|
|
M |
src/objects-visiting.cc
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/parser.cc
|
View
|
1
2
|
5 chunks |
+22 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/runtime.h
|
View
|
1
2
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/runtime.cc
|
View
|
1
2
|
2 chunks |
+20 lines, -1 line |
0 comments
|
Download
|
|
M |
src/scopeinfo.cc
|
View
|
2
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/scopes.cc
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/x64/full-codegen-x64.cc
|
View
|
1
2
|
4 chunks |
+19 lines, -10 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/harmony/module-linking.js
|
View
|
|
1 chunk |
+121 lines, -0 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/module-parsing.js
|
View
|
1
2
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
test/mjsunit/harmony/module-resolution.js
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|