Closed
Bug 541455
Opened 15 years ago
Closed 15 years ago
Do not drop "mumble"; would-be directives in the parser, let them be completion values (or useless expressions for the emitter to cull)
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: brendan, Assigned: brendan)
References
(Blocks 1 open bug)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
(deleted),
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
RecognizeDirectivePrologue returns true for any string literal, eliminating constant string expression statements even when they are wanted as the completion value (e.g., via eval or a special API). Dave Herman ran into this just now using JSCompiler::parse.
/be
Assignee | ||
Updated•15 years ago
|
Assignee | ||
Comment 1•15 years ago
|
||
ES5 14.1 pretty clearly says directives are evaluated, which implies that one in the completion position supplies the completion value. There's no requirement for non-empty body after directive prologue.
/be
Attachment #423030 -
Flags: review?(jim)
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.9.3a1
Updated•15 years ago
|
Attachment #423030 -
Flags: review?(jim) → review+
Assignee | ||
Updated•15 years ago
|
Summary: ES5 strict mode: recognize "use strict" directives in Directive Prologue → Do not drop "mumble"; would-be directives in the parser, let them be completion values (or useless expressions for the emitter to cull)
Assignee | ||
Comment 2•15 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #4)
> is there a test for this?
Sorry, should have included these:
http://hg.mozilla.org/tracemonkey/rev/3f3a9abc3b8f
http://hg.mozilla.org/tracemonkey/rev/3f65f66f4468
/be
Updated•15 years ago
|
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•