Closed
Bug 1222446
Opened 9 years ago
Closed 9 years ago
Add some module tests
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: jonco, Assigned: jonco)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
2.27 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
2.33 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
2.47 KB,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
995 bytes,
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
This bug is to commit a bunch of module test cases I have sitting in my patch queue.
Assignee | ||
Comment 1•9 years ago
|
||
Ambiguous exports occur when we use |export *| to export the same name from more than one module. Import or export of such a name is an error, but a module namespace ignores ambiguous exports.
Attachment #8684231 -
Flags: review?(shu)
Assignee | ||
Comment 2•9 years ago
|
||
Test that assigning to or deleting the various types of imports is an error.
Attachment #8684232 -
Flags: review?(shu)
Assignee | ||
Comment 3•9 years ago
|
||
Check that nothing goes awry when we have > 1000 imports or exports.
Attachment #8684234 -
Flags: review?(shu)
Assignee | ||
Comment 4•9 years ago
|
||
> Just checking: imported bindings can never be uninitialized (thus triggering TDZ) in the target module at this point, right?
Unfortunately yes they can, and this is the case - cyclic imported variable dependencies.
Attachment #8684294 -
Flags: review?(shu)
Comment 5•9 years ago
|
||
Comment on attachment 8684231 [details] [diff] [review]
test-ambiguous-exports
Review of attachment 8684231 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/jit-test/tests/modules/ambiguous-star-export.js
@@ +40,5 @@
> +// Check that namespace objects include only non-ambiguous names.
> +let m = parseModule("import * as ns from 'c'; ns;");
> +m.declarationInstantiation();
> +let ns = m.evaluation();
> +let names = Object.keys(ns).sort();
sort() doesn't seem important here since your tests below use 'in'
Attachment #8684231 -
Flags: review?(shu) → review+
Updated•9 years ago
|
Attachment #8684232 -
Flags: review?(shu) → review+
Comment 6•9 years ago
|
||
(In reply to Jon Coppeard (:jonco) from comment #4)
> Created attachment 8684294 [details] [diff] [review]
> test-cyclic-imports
>
> > Just checking: imported bindings can never be uninitialized (thus triggering TDZ) in the target module at this point, right?
>
What patch review did I say that in? I made that comment because there wasn't code that correctly dealt with imported bindings being uninitialized.
Comment 7•9 years ago
|
||
Comment on attachment 8684234 [details] [diff] [review]
test-many-import-exports
Review of attachment 8684234 [details] [diff] [review]:
-----------------------------------------------------------------
General note for future tests, using template strings over string concatenation would make the building up of the module source texts more readable.
Attachment #8684234 -
Flags: review?(shu) → review+
Updated•9 years ago
|
Attachment #8684294 -
Flags: review?(shu) → review+
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Shu-yu Guo [:shu] from comment #6)
> What patch review did I say that in? I made that comment because there
> wasn't code that correctly dealt with imported bindings being uninitialized.
Right, this was in bug 1219288. But it's a situation that wasn't previously exercised by our tests so I thought it was worth adding a test case right away.
Comment 10•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8ff488cc4d44
https://hg.mozilla.org/mozilla-central/rev/be11a4215c0b
https://hg.mozilla.org/mozilla-central/rev/d92cfc42f114
https://hg.mozilla.org/mozilla-central/rev/012f6c8917e5
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•