Closed Bug 1105608 Opened 10 years ago Closed 10 years ago

PNK_EXPORT_FROM is not handled in frontend::EmitTree.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

Steps to reproduce: 1. Run debug build js shell 2. enter following code eval("export { x } from 'a';"); Expected result: "SyntaxError: modules are not implemented yet" is thrown. Actual result: Assertion fails at frontend::EmitTree. > switch (pn->getKind()) { >... > default: > MOZ_ASSERT(0); > }
Blocks: 930411
bug1105608.js does not check the thrown exception's type, because the code should throw a different error than SyntaxError after modules are implemented, and the error's type is not yet specified in the spec (or I overlooked it?). Green on try runs: https://tbpl.mozilla.org/?tree=Try&rev=470ce7a92717 (only BytecodeEmitter.cpp change) https://tbpl.mozilla.org/?tree=Try&rev=7c49fc8cf171 (added a test)
Attachment #8529782 - Flags: review?(jorendorff)
Blocks: 1089045
Comment on attachment 8529782 [details] [diff] [review] Throw SyntaxError for export-from. Review of attachment 8529782 [details] [diff] [review]: ----------------------------------------------------------------- Thank you!
Attachment #8529782 - Flags: review?(jorendorff) → review+
Assignee: nobody → arai_a
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: