Closed Bug 1535994 Opened 6 years ago Closed 6 years ago

Add struct for bytecode and directly associated data, and indirectly associated "per script" data

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(11 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

to achieve bug 1464311 (bytecode-let composition), we need a structure that represents following:

  1. bytecode itself, and all data directly associated with specific opcode/index inside the bytecode

this corresponds to each bytecode-let.
source notes/try notes etc are also in this struct, because it points specific opcode/index in the bytecode, and should be modified while composition.

  1. all data associated with bytecode but not directly to specific opcode

Data that is shared across multiple bytecode-lets.
this includes AtomIndexMap, CGNumberList, CGObjectList, CGScopeList, etc,
that is referred from the bytecode, and added while emitting bytecode.

while EmitSection is removed in bug 1284719,
I'm about to add yet another similar structure, with above rule.

Blocks: 1536037
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/384cdd1ee833 Part 1: Add BytecodeSection class with BytecodeVector. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/b77efa8567a2 Part 2: Move source notes to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/ee3359178d5f Part 3: Move lastTarget to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/4f5084424c22 Part 4: Move stackDepth to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/7c763b9a2118 Part 5: Move tryNodeList to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/8a480b0bbd05 Part 6: Move scope to BytecodeSection class and PerScriptData class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/096ab8585046 Part 7: Move object and number to PerScriptData class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/db520471b407 Part 8: Move resume/yield info to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/fdd1177e499a Part 9: Move atomIndices to PerScriptData class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/e56d1810fb40 Part 10: Move JIT information to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/d5975f907521 Part 11: Move line/colum information to BytecodeSection class. r=jorendorff

Backed out 11 changesets (Bug 1535994) for BytecodeEmitter.cpp related build bustages

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=d5975f907521e4a5fe727cd52e3799b60b97beb7&selectedJob=239290488

Backout link: https://hg.mozilla.org/integration/autoland/rev/7fb3acf38591979f105306e0c8f3441e75c95bd5

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

[task 2019-04-10T09:14:41.965Z] 09:14:41 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/libaom'
[task 2019-04-10T09:14:41.995Z] 09:14:41 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/js/src/frontend'
[task 2019-04-10T09:14:41.996Z] 09:14:41 INFO - /builds/worker/workspace/build/src/clang/bin/clang++ -isysroot /builds/worker/workspace/build/src/MacOSX10.11.sdk --target=x86_64-darwin11 -o Unified_cpp_js_src_frontend0.o -c -flto=thin -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG=1 -DTRIMMED=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 -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-common -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -Werror -fno-strict-aliasing -Werror=format -Wno-shadow -MD -MP -MF .deps/Unified_cpp_js_src_frontend0.o.pp /builds/worker/workspace/build/src/obj-firefox/js/src/frontend/Unified_cpp_js_src_frontend0.cpp
[task 2019-04-10T09:14:41.996Z] 09:14:41 INFO - In file included from /builds/worker/workspace/build/src/obj-firefox/js/src/frontend/Unified_cpp_js_src_frontend0.cpp:20:
[task 2019-04-10T09:14:41.996Z] 09:14:41 ERROR - /builds/worker/workspace/build/src/js/src/frontend/BytecodeEmitter.cpp:2024:28: error: no member named 'code' in 'js::frontend::BytecodeEmitter'
[task 2019-04-10T09:14:41.996Z] 09:14:41 INFO - jsbytecode* code = this->code(offset);
[task 2019-04-10T09:14:41.996Z] 09:14:41 INFO - ~~~~ ^
[task 2019-04-10T09:14:41.996Z] 09:14:41 ERROR - /builds/worker/workspace/build/src/js/src/frontend/BytecodeEmitter.cpp:2027:3: error: use of undeclared identifier 'updateDepth'
[task 2019-04-10T09:14:41.996Z] 09:14:41 INFO - updateDepth(offset);
[task 2019-04-10T09:14:41.997Z] 09:14:41 INFO - ^
[task 2019-04-10T09:14:41.997Z] 09:14:41 INFO - 2 errors generated.
[task 2019-04-10T09:14:41.997Z] 09:14:41 INFO - /builds/worker/workspace/build/src/config/rules.mk:805: recipe for target 'Unified_cpp_js_src_frontend0.o' failed
[task 2019-04-10T09:14:41.997Z] 09:14:41 ERROR - make[4]: *** [Unified_cpp_js_src_frontend0.o] Error 1
[task 2019-04-10T09:14:41.997Z] 09:14:41 INFO - make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/js/src/frontend'
[task 2019-04-10T09:14:41.997Z] 09:14:41 INFO - make[4]: *** Waiting for unfinished jobs....
[task 2019-04-10T09:14:42.039Z] 09:14:42 INFO - make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/config/external/icu/i18n'
[task 2019-04-10T09:14:42.043Z] 09:14:42 INFO - /builds/worker/workspace/build/src/clang/bin/clang++ -isysroot /builds/worker/workspace/build/src/MacOSX10.11.sdk --target=x86_64-darwin11 -o numparse_compositions.o -c -flto=thin -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG=1 -DTRIMMED=1 -DU_I18N_IMPLEMENTATION -DUCONFIG_NO_TRANSLITERATION -DUCONFIG_NO_REGULAR_EXPRESSIONS -DUCONFIG_NO_LEGACY_CONVERSION -DU_USING_ICU_NAMESPACE=0 -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 -DU_CHARSET_IS_UTF8 -DU_HAVE_NL_LANGINFO_CODESET=0 -I/builds/worker/workspace/build/src/config/external/icu/i18n -I/builds/worker/workspace/build/src/obj-firefox/config/external/icu/i18n -I/builds/worker/workspace/build/src/intl/icu/source/common -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -fcrash-diagnostics-dir=/builds/worker/artifacts -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O3 -fno-omit-frame-pointer -funwind-tables -frtti -MD -MP -MF .deps/numparse_compositions.o.pp /builds/worker/workspace/build/src/intl/icu/source/i18n/numparse_compositions.cpp
[task 2019-04-10T09:14:42.045Z] 09:14:42 WARNING - /builds/worker/workspace/build/src/intl/icu/source/i18n/numparse_compositions.cpp:66:5: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment]
[task 2019-04-10T09:14:42.045Z] 09:14:42 INFO - for (auto& matcher : *this) {
[task 2019-04-10T09:14:42.046Z] 09:14:42 INFO - ^~~
[task 2019-04-10T09:14:42.046Z] 09:14:42 INFO - 1 warning generated.

Flags: needinfo?(arai.unmht)
https://hg.mozilla.org/integration/mozilla-inbound/rev/0a048e81c20c98ff831765e43be0ac76e4870c49 Bug 1535994 - Part 1: Add BytecodeSection class with BytecodeVector. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/2242a2c3e65ae6b516221d6492b3451ac5d11947 Bug 1535994 - Part 2: Move source notes to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/eb9c786879f40e3d9758f49abe205940d9c5dbae Bug 1535994 - Part 3: Move lastTarget to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/66a27a2dece1aae22680d4f4b835640cd0c5df82 Bug 1535994 - Part 4: Move stackDepth to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/5781fc07513fd056b8a6f9a45018968d1e698059 Bug 1535994 - Part 5: Move tryNodeList to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/9177ca1dd1397356dbe895aae0b34b9016a0315c Bug 1535994 - Part 6: Move scope to BytecodeSection class and PerScriptData class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/60b6dc92078ea02f605c75f11a3d74a7a2138d10 Bug 1535994 - Part 7: Move object and number to PerScriptData class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/1f5c5914ebfb7c5e9f6684bd5ffe0538c1ea0de4 Bug 1535994 - Part 8: Move resume/yield info to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/c05f903f3bfdd0d7a5c9c0350d0a0a7690cb0302 Bug 1535994 - Part 9: Move atomIndices to PerScriptData class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/ab95e8d9d3002ef0ffd3b24a8c94db13094196f9 Bug 1535994 - Part 10: Move JIT information to BytecodeSection class. r=jorendorff https://hg.mozilla.org/integration/mozilla-inbound/rev/ced956a624de1e59f318bb124c79417068fecd10 Bug 1535994 - Part 11: Move line/colum information to BytecodeSection class. r=jorendorff
Flags: needinfo?(arai.unmht)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: