Closed
Bug 1505150
Opened 6 years ago
Closed 6 years ago
ParseContext/SharedContext implementations should not be in Parser.cpp
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: khyperia, Assigned: khyperia)
Details
Attachments
(1 file)
The organization here is confusing and clutters the already-huge Parser.cpp file. Parser.cpp should only have good ol' basic recursive descent parsing logic, nothing more.
Assignee | ||
Comment 1•6 years ago
|
||
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9675e3a0f693 Move implementations of ParseContext and SharedContext to their own files. r=jorendorff
Comment 3•6 years ago
|
||
Backed out changeset 9675e3a0f693 (bug 1505150) for spidermonkey failure in builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h Log: https://treeherder.mozilla.org/logviewer.html#?job_id=210165151&repo=autoland&lineNumber=866 Running `/builds/worker/workspace/rustc/bin/rustc --crate-name quote /builds/worker/workspace/build/src/third_party/rust/quote-0.5.2/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=1 -C debuginfo=2 -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' --cfg 'feature="proc-macro2"' -C metadata=f4c88d5f26cc8d95 -C extra-filename=-f4c88d5f26cc8d95 --out-dir /builds/worker/workspace/build/src/obj-spider/debug/deps -C linker=/builds/worker/workspace/build/src/build/cargo-linker -L dependency=/builds/worker/workspace/build/src/obj-spider/debug/deps --extern proc_macro2=/builds/worker/workspace/build/src/obj-spider/debug/deps/libproc_macro2-9c5395702f97afe9.rlib --cap-lints warn` [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h: In constructor 'js::frontend::ParseContext::Scope::Scope(js::frontend::ParserBase*)': [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:48:28: error: invalid use of incomplete type 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] : Nestable<Scope>(&parser->pc->innermostScope_), [task 2018-11-06T20:16:00.612Z] ^~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10:0, [task 2018-11-06T20:16:00.612Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:20:7: note: forward declaration of 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] class ParserBase; [task 2018-11-06T20:16:00.612Z] ^~~~~~~~~~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:49:21: error: invalid use of incomplete type 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] declared_(parser->context->frontendCollectionPool()), [task 2018-11-06T20:16:00.612Z] ^~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10:0, [task 2018-11-06T20:16:00.612Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:20:7: note: forward declaration of 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] class ParserBase; [task 2018-11-06T20:16:00.612Z] ^~~~~~~~~~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:50:40: error: invalid use of incomplete type 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] possibleAnnexBFunctionBoxes_(parser->context->frontendCollectionPool()), [task 2018-11-06T20:16:00.612Z] ^~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10:0, [task 2018-11-06T20:16:00.612Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:20:7: note: forward declaration of 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] class ParserBase; [task 2018-11-06T20:16:00.612Z] ^~~~~~~~~~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:51:15: error: invalid use of incomplete type 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.612Z] id_(parser->usedNames.nextScopeId()) [task 2018-11-06T20:16:00.612Z] ^~ [task 2018-11-06T20:16:00.612Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10:0, [task 2018-11-06T20:16:00.612Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.612Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:20:7: note: forward declaration of 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.613Z] class ParserBase; [task 2018-11-06T20:16:00.613Z] ^~~~~~~~~~ [task 2018-11-06T20:16:00.613Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h: In constructor 'js::frontend::ParseContext::Scope::Scope(JSContext*, js::frontend::ParseContext*, js::frontend::UsedNameTracker&)': [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:57:17: error: invalid use of incomplete type 'struct JSContext' [task 2018-11-06T20:16:00.613Z] declared_(cx->frontendCollectionPool()), [task 2018-11-06T20:16:00.613Z] ^~ [task 2018-11-06T20:16:00.613Z] In file included from /builds/worker/workspace/build/src/obj-spider/dist/include/js/TraceKind.h:12:0, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/jspubtd.h:18, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/obj-spider/dist/include/js/RootingAPI.h:19, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/obj-spider/dist/include/js/CallArgs.h:72, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/obj-spider/dist/include/js/CallNonGenericMethod.h:12, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/NamespaceImports.h:15, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/BytecodeCompiler.h:12, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:12, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/obj-spider/dist/include/js/TypeDecls.h:28:8: note: forward declaration of 'struct JSContext' [task 2018-11-06T20:16:00.613Z] struct JSContext; [task 2018-11-06T20:16:00.613Z] ^~~~~~~~~ [task 2018-11-06T20:16:00.613Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:58:36: error: invalid use of incomplete type 'struct JSContext' [task 2018-11-06T20:16:00.613Z] possibleAnnexBFunctionBoxes_(cx->frontendCollectionPool()), [task 2018-11-06T20:16:00.613Z] ^~ [task 2018-11-06T20:16:00.613Z] In file included from /builds/worker/workspace/build/src/obj-spider/dist/include/js/TraceKind.h:12:0, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/jspubtd.h:18, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/obj-spider/dist/include/js/RootingAPI.h:19, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/obj-spider/dist/include/js/CallArgs.h:72, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/obj-spider/dist/include/js/CallNonGenericMethod.h:12, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/NamespaceImports.h:15, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/BytecodeCompiler.h:12, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:12, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/obj-spider/dist/include/js/TypeDecls.h:28:8: note: forward declaration of 'struct JSContext' [task 2018-11-06T20:16:00.613Z] struct JSContext; [task 2018-11-06T20:16:00.613Z] ^~~~~~~~~ [task 2018-11-06T20:16:00.613Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7:0: [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h: In constructor 'js::frontend::ParseContext::VarScope::VarScope(js::frontend::ParserBase*)': [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:66:25: error: invalid use of incomplete type 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.613Z] useAsVarScope(parser->pc); [task 2018-11-06T20:16:00.613Z] ^~ [task 2018-11-06T20:16:00.613Z] In file included from /builds/worker/workspace/build/src/js/src/frontend/ParseContext-inl.h:10:0, [task 2018-11-06T20:16:00.613Z] from /builds/worker/workspace/build/src/js/src/frontend/ParseContext.cpp:7: [task 2018-11-06T20:16:00.613Z] /builds/worker/workspace/build/src/js/src/frontend/ParseContext.h:20:7: note: forward declaration of 'class js::frontend::ParserBase' [task 2018-11-06T20:16:00.613Z] class ParserBase; [task 2018-11-06T20:16:00.613Z] ^~~~~~~~~~ [task 2018-11-06T20:16:00.915Z] /builds/worker/workspace/gcc/bin/g++ -o Parser.o -c -I/builds/worker/workspace/build/src/obj-spider/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DDEBUG=1 -DENABLE_BINARYDATA -DENABLE_WASM_BULKMEM_OPS -DENABLE_WASM_THREAD_OPS -DENABLE_WASM_GC -DWASM_PRIVATE_REFTYPES -DWASM_HUGE_MEMORY -DJS_CACHEIR_SPEW -DENABLE_SHARED_ARRAY_BUFFER -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE -I/builds/worker/workspace/build/src/js/src/frontend -I/builds/worker/workspace/build/src/obj-spider/js/src/frontend -I/builds/worker/workspace/build/src/obj-spider/js/src -I/builds/worker/workspace/build/src/js/src -I/builds/worker/workspace/build/src/obj-spider/dist/include -I/builds/worker/workspace/build/src/obj-spider/dist/include/nspr -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-spider/js/src/js-confdefs.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -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=free-nonheap-object -Wformat -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -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 2018-11-06T20:16:01.024Z] Running `/builds/worker/workspace/rustc/bin/rustc --crate-name ryu /builds/worker/workspace/build/src/third_party/rust/ryu/src/lib.rs --color never --crate-type lib --emit=dep-info,link -C opt-level=1 -C debuginfo=2 -C debug-assertions=on -C metadata=2b867c938edbff26 -C extra-filename=-2b867c938edbff26 --out-dir /builds/worker/workspace/build/src/obj-spider/debug/deps -C linker=/builds/worker/workspace/build/src/build/cargo-linker -L dependency=/builds/worker/workspace/build/src/obj-spider/debug/deps --cap-lints warn --cfg integer128 --cfg must_use_return` [task 2018-11-06T20:16:01.669Z] Running `/builds/worker/workspace/build/src/obj-spider/debug/build/libloading-24ced30bac832a9f/build-script-build` Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=9675e3a0f693e4da23d8e4660fd9dd71209b0aa9 https://hg.mozilla.org/integration/autoland/rev/748e2beda47e5060d556df539bb45d471562c05b
Flags: needinfo?(khyperia)
Assignee | ||
Comment 4•6 years ago
|
||
Ah, I think I didn't test building without unified sources (I'm still not 100% sure how to, I just ran `autospider.py nonunified` and the issue seems to be resolved by shuffling two functions around) Pushed another update to the phab patch, that one should be good. To double-check, here's a try job that just builds this patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6266ca9dcf9e049cf9880c25a8c7746c9ec70307
Flags: needinfo?(khyperia)
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/04a5b29e9c89 Move implementations of ParseContext and SharedContext to their own files. r=jorendorff
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/04a5b29e9c89
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•