Status

()

enhancement
P1
normal
RESOLVED FIXED
4 months ago
2 months ago

People

(Reporter: jorendorff, Assigned: jorendorff)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

()

Attachments

(4 attachments)

Assignee

Description

4 months ago

The committee, catering to the small but vocal minority who like picking their teeth with knives and leaving out the semicolons when they write JS, inadvisedly chose not to make the semicolon at the end of a field declaration mandatory. It is therefore subject to Automatic Semicolon Insertion.

https://github.com/tc39/proposal-class-fields/issues/7#issuecomment-309879686

Assignee

Updated

3 months ago
Priority: -- → P1
Assignee

Updated

3 months ago
Depends on: 1539821
Assignee

Comment 2

3 months ago

The existing propertyName() method parses a little more than just
PropertyNames; this patch renames it, to clarify that, but the behavior is
unchanged.

There was a lot of redundancy in the implementation of getters and setters, so
this deletes a bunch of code.

Depends on D26035

Attachment #9055665 - Attachment description: Bug 1529772 - Part 3: Implement ASI for fields that have initializers. r?khyperia → Bug 1529772 - Part 3: Implement ASI for fields that have initializers. r?jwalden
Attachment #9055666 - Attachment description: Bug 1529772 - Part 4: Implement ASI for fields that don't have initializers. r?khyperia → Bug 1529772 - Part 4: Implement ASI for fields that don't have initializers. r?jwalden

Comment 6

2 months ago
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b75b904ed0ab
Part 1: Document current state of play in GeneralParser::propertyName. r=khyperia
https://hg.mozilla.org/integration/autoland/rev/067e3a99b027
Part 2: Factor out PropertyName parsing from Parser::propertyName(). r=khyperia
https://hg.mozilla.org/integration/autoland/rev/12f5ca654613
Part 3: Implement ASI for fields that have initializers. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/9d97f970cbeb
Part 4: Implement ASI for fields that don't have initializers. r=jwalden

Backed out 4 changesets (Bug 1529772) for Parser.cpp related bustages

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=9d97f970cbeb6d6b0e0eb052550ab66865fe4527

Backout link: https://hg.mozilla.org/integration/autoland/rev/7730a257c3ce8c87c72c6244961411db41211322

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=240067751&repo=autoland&lineNumber=4879

[task 2019-04-12T23:43:41.415Z] 23:43:41 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src'
[task 2019-04-12T23:43:42.422Z] 23:43:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/src/frontend'
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/gcc/bin/g++ -o Parser.o -c -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DWASM_HUGE_MEMORY -DJS_CACHEIR_SPEW -DJS_STRUCTURED_SPEW -DJS_HAS_CTYPES -DFFI_BUILDING -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/builds/worker/workspace/build/src/js/src/frontend -I/builds/worker/workspace/build/src/obj-firefox/js/src/frontend -I/builds/worker/workspace/build/src/obj-firefox/js/src -I/builds/worker/workspace/build/src/js/src -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/js/src/js-confdefs.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wduplicated-cond -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wformat -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -freorder-blocks -O3 -fno-omit-frame-pointer -funwind-tables -Werror -fno-strict-aliasing -Werror=format -Wno-shadow -MD -MP -MF .deps/Parser.o.pp /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp: In instantiation of 'bool js::frontend::GeneralParser<ParseHandler, Unit>::classMember(js::frontend::YieldHandling, js::frontend::DefaultHandling, const js::frontend::ParseContext::ClassStatement&, js::HandlePropertyName, uint32_t, js::frontend::HasHeritage, size_t&, size_t&, js::frontend::GeneralParser<ParseHandler, Unit>::ListNodeType&, bool*) [with ParseHandler = js::frontend::FullParseHandler; Unit = mozilla::Utf8Unit; js::HandlePropertyName = JS::Handle<js::PropertyName*>; uint32_t = unsigned int; size_t = long unsigned int; js::frontend::GeneralParser<ParseHandler, Unit>::ListNodeType = js::frontend::ListNode*]':
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp:10504:16: required from here
[task 2019-04-12T23:43:42.428Z] 23:43:42 ERROR - /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp:6815:18: error: converting to 'bool' from 'js::frontend::FullParseHandler::NullNode {aka std::nullptr_t}' requires direct-initialization [-fpermissive]
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - return null();
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - ^
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp: In instantiation of 'bool js::frontend::GeneralParser<ParseHandler, Unit>::classMember(js::frontend::YieldHandling, js::frontend::DefaultHandling, const js::frontend::ParseContext::ClassStatement&, js::HandlePropertyName, uint32_t, js::frontend::HasHeritage, size_t&, size_t&, js::frontend::GeneralParser<ParseHandler, Unit>::ListNodeType&, bool*) [with ParseHandler = js::frontend::FullParseHandler; Unit = char16_t; js::HandlePropertyName = JS::Handle<js::PropertyName*>; uint32_t = unsigned int; size_t = long unsigned int; js::frontend::GeneralParser<ParseHandler, Unit>::ListNodeType = js::frontend::ListNode*]':
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp:10506:16: required from here
[task 2019-04-12T23:43:42.428Z] 23:43:42 ERROR - /builds/worker/workspace/build/src/js/src/frontend/Parser.cpp:6815:18: error: converting to 'bool' from 'js::frontend::FullParseHandler::NullNode {aka std::nullptr_t}' requires direct-initialization [-fpermissive]
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - /builds/worker/workspace/build/src/config/rules.mk:805: recipe for target 'Parser.o' failed
[task 2019-04-12T23:43:42.428Z] 23:43:42 ERROR - make[4]: *** [Parser.o] Error 1
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src/frontend'
[task 2019-04-12T23:43:42.428Z] 23:43:42 INFO - make[4]: *** Waiting for unfinished jobs....
[task 2019-04-12T23:43:42.431Z] 23:43:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/src'
[task 2019-04-12T23:43:42.431Z] 23:43:42 INFO - js/src/ProfilingStack.o
[task 2019-04-12T23:43:42.431Z] 23:43:42 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src'

Flags: needinfo?(jorendorff)

Comment 8

2 months ago
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7d26d6d473cf
Part 1: Document current state of play in GeneralParser::propertyName. r=khyperia
https://hg.mozilla.org/integration/autoland/rev/0f4a343adc59
Part 2: Factor out PropertyName parsing from Parser::propertyName(). r=khyperia
https://hg.mozilla.org/integration/autoland/rev/e771e63200c6
Part 3: Implement ASI for fields that have initializers. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/27f0cd20a8b0
Part 4: Implement ASI for fields that don't have initializers. r=jwalden
Assignee: nobody → jorendorff
Assignee

Updated

2 months ago
Flags: needinfo?(jorendorff)
You need to log in before you can comment on or make changes to this bug.