Backed out 7 changesets (bug 1377007) for web platform reftests failures on CSS2/borders. r=backout
authorNarcis Beleuzu <nbeleuzu@mozilla.com>
Fri, 15 Dec 2017 02:16:50 +0200
changeset 450782 d0d709880f192e88d1601b657cd562a6fe56d4aa
parent 450781 8649aeb6fc81451f822d74ef1e07e6a072ca4256
child 450783 4d3b01892567a572929af2313313d3dafab83598
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1377007
milestone59.0a1
backs outc30bc5d5adbc17de3d4b6d883d2f04e7ee30a5ff
33fdf9e531e216c00b704ec043677e720cf89d9d
267abdb38036fa113551f7c7ed06f85fb7af5eb9
4a452c3ac1156d2a69d325995057cf5c1c736151
e9310960c9e6b32cac8517afdd4df33649fb602f
8e5e61dfbbaf45cc6bf0f364b68c5aad99958de8
9ac83e79e6568b418f34e77be69e63b342aaa2c2
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 7 changesets (bug 1377007) for web platform reftests failures on CSS2/borders. r=backout Backed out changeset c30bc5d5adbc (bug 1377007) Backed out changeset 33fdf9e531e2 (bug 1377007) Backed out changeset 267abdb38036 (bug 1377007) Backed out changeset 4a452c3ac115 (bug 1377007) Backed out changeset e9310960c9e6 (bug 1377007) Backed out changeset 8e5e61dfbbaf (bug 1377007) Backed out changeset 9ac83e79e656 (bug 1377007)
.eslintignore
js/moz.configure
js/public/RootingAPI.h
js/src/devtools/automation/autospider.py
js/src/frontend/BinSource.cpp
js/src/frontend/BinSource.h
js/src/frontend/BinToken.cpp
js/src/frontend/BinToken.h
js/src/frontend/BinTokenReaderTester.cpp
js/src/frontend/BinTokenReaderTester.h
js/src/frontend/BytecodeCompiler.h
js/src/frontend/FullParseHandler.h
js/src/frontend/ParseContext-inl.h
js/src/frontend/ParseContext.h
js/src/frontend/ParseNode.h
js/src/frontend/Parser.cpp
js/src/frontend/Parser.h
js/src/frontend/SharedContext.h
js/src/gc/RootMarking.cpp
js/src/irregexp/RegExpEngine.cpp
js/src/jsapi-tests/binast/parser/tester/StrictEquality-001.binjs
js/src/jsapi-tests/binast/parser/tester/StrictEquality-001.js
js/src/jsapi-tests/binast/parser/tester/apply-001-n.binjs
js/src/jsapi-tests/binast/parser/tester/apply-001-n.js
js/src/jsapi-tests/binast/parser/tester/boolean-001.binjs
js/src/jsapi-tests/binast/parser/tester/boolean-001.js
js/src/jsapi-tests/binast/parser/tester/boolean-002.binjs
js/src/jsapi-tests/binast/parser/tester/boolean-002.js
js/src/jsapi-tests/binast/parser/tester/call-1.binjs
js/src/jsapi-tests/binast/parser/tester/call-1.js
js/src/jsapi-tests/binast/parser/tester/constructor-001.binjs
js/src/jsapi-tests/binast/parser/tester/constructor-001.js
js/src/jsapi-tests/binast/parser/tester/date-002.binjs
js/src/jsapi-tests/binast/parser/tester/date-002.js
js/src/jsapi-tests/binast/parser/tester/date-003.binjs
js/src/jsapi-tests/binast/parser/tester/date-003.js
js/src/jsapi-tests/binast/parser/tester/date-004.binjs
js/src/jsapi-tests/binast/parser/tester/date-004.js
js/src/jsapi-tests/binast/parser/tester/dowhile-001.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-001.js
js/src/jsapi-tests/binast/parser/tester/dowhile-002.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-002.js
js/src/jsapi-tests/binast/parser/tester/dowhile-003.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-003.js
js/src/jsapi-tests/binast/parser/tester/dowhile-004.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-004.js
js/src/jsapi-tests/binast/parser/tester/dowhile-005.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-005.js
js/src/jsapi-tests/binast/parser/tester/dowhile-006.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-006.js
js/src/jsapi-tests/binast/parser/tester/dowhile-007.binjs
js/src/jsapi-tests/binast/parser/tester/dowhile-007.js
js/src/jsapi-tests/binast/parser/tester/exception-001.binjs
js/src/jsapi-tests/binast/parser/tester/exception-001.js
js/src/jsapi-tests/binast/parser/tester/exception-002.binjs
js/src/jsapi-tests/binast/parser/tester/exception-002.js
js/src/jsapi-tests/binast/parser/tester/exception-003.binjs
js/src/jsapi-tests/binast/parser/tester/exception-003.js
js/src/jsapi-tests/binast/parser/tester/exception-004.binjs
js/src/jsapi-tests/binast/parser/tester/exception-004.js
js/src/jsapi-tests/binast/parser/tester/exception-005.binjs
js/src/jsapi-tests/binast/parser/tester/exception-005.js
js/src/jsapi-tests/binast/parser/tester/exception-006.binjs
js/src/jsapi-tests/binast/parser/tester/exception-006.js
js/src/jsapi-tests/binast/parser/tester/exception-007.binjs
js/src/jsapi-tests/binast/parser/tester/exception-007.js
js/src/jsapi-tests/binast/parser/tester/exception-008.binjs
js/src/jsapi-tests/binast/parser/tester/exception-008.js
js/src/jsapi-tests/binast/parser/tester/exception-009.binjs
js/src/jsapi-tests/binast/parser/tester/exception-009.js
js/src/jsapi-tests/binast/parser/tester/exception-010-n.binjs
js/src/jsapi-tests/binast/parser/tester/exception-010-n.js
js/src/jsapi-tests/binast/parser/tester/exception-011-n.binjs
js/src/jsapi-tests/binast/parser/tester/exception-011-n.js
js/src/jsapi-tests/binast/parser/tester/exec-002.binjs
js/src/jsapi-tests/binast/parser/tester/exec-002.js
js/src/jsapi-tests/binast/parser/tester/expression-001.binjs
js/src/jsapi-tests/binast/parser/tester/expression-001.js
js/src/jsapi-tests/binast/parser/tester/expression-002.binjs
js/src/jsapi-tests/binast/parser/tester/expression-002.js
js/src/jsapi-tests/binast/parser/tester/expression-003.binjs
js/src/jsapi-tests/binast/parser/tester/expression-003.js
js/src/jsapi-tests/binast/parser/tester/expression-004.binjs
js/src/jsapi-tests/binast/parser/tester/expression-004.js
js/src/jsapi-tests/binast/parser/tester/expression-005.binjs
js/src/jsapi-tests/binast/parser/tester/expression-005.js
js/src/jsapi-tests/binast/parser/tester/expression-006.binjs
js/src/jsapi-tests/binast/parser/tester/expression-006.js
js/src/jsapi-tests/binast/parser/tester/expression-007.binjs
js/src/jsapi-tests/binast/parser/tester/expression-007.js
js/src/jsapi-tests/binast/parser/tester/expression-008.binjs
js/src/jsapi-tests/binast/parser/tester/expression-008.js
js/src/jsapi-tests/binast/parser/tester/expression-009.binjs
js/src/jsapi-tests/binast/parser/tester/expression-009.js
js/src/jsapi-tests/binast/parser/tester/expression-010.binjs
js/src/jsapi-tests/binast/parser/tester/expression-010.js
js/src/jsapi-tests/binast/parser/tester/expression-011.binjs
js/src/jsapi-tests/binast/parser/tester/expression-011.js
js/src/jsapi-tests/binast/parser/tester/expression-012.binjs
js/src/jsapi-tests/binast/parser/tester/expression-012.js
js/src/jsapi-tests/binast/parser/tester/expression-013.binjs
js/src/jsapi-tests/binast/parser/tester/expression-013.js
js/src/jsapi-tests/binast/parser/tester/expression-014.binjs
js/src/jsapi-tests/binast/parser/tester/expression-014.js
js/src/jsapi-tests/binast/parser/tester/expression-015.binjs
js/src/jsapi-tests/binast/parser/tester/expression-015.js
js/src/jsapi-tests/binast/parser/tester/expression-016.binjs
js/src/jsapi-tests/binast/parser/tester/expression-016.js
js/src/jsapi-tests/binast/parser/tester/expression-017.binjs
js/src/jsapi-tests/binast/parser/tester/expression-017.js
js/src/jsapi-tests/binast/parser/tester/expression-019.binjs
js/src/jsapi-tests/binast/parser/tester/expression-019.js
js/src/jsapi-tests/binast/parser/tester/forin-001.binjs
js/src/jsapi-tests/binast/parser/tester/forin-001.js
js/src/jsapi-tests/binast/parser/tester/forin-002.binjs
js/src/jsapi-tests/binast/parser/tester/forin-002.js
js/src/jsapi-tests/binast/parser/tester/function-001.binjs
js/src/jsapi-tests/binast/parser/tester/function-001.js
js/src/jsapi-tests/binast/parser/tester/global-001.binjs
js/src/jsapi-tests/binast/parser/tester/global-001.js
js/src/jsapi-tests/binast/parser/tester/global-002.binjs
js/src/jsapi-tests/binast/parser/tester/global-002.js
js/src/jsapi-tests/binast/parser/tester/hex-001.binjs
js/src/jsapi-tests/binast/parser/tester/hex-001.js
js/src/jsapi-tests/binast/parser/tester/if-001.binjs
js/src/jsapi-tests/binast/parser/tester/if-001.js
js/src/jsapi-tests/binast/parser/tester/instanceof-001.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-001.js
js/src/jsapi-tests/binast/parser/tester/instanceof-002.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-002.js
js/src/jsapi-tests/binast/parser/tester/instanceof-003-n.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-003-n.js
js/src/jsapi-tests/binast/parser/tester/instanceof-003.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-003.js
js/src/jsapi-tests/binast/parser/tester/instanceof-004-n.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-004-n.js
js/src/jsapi-tests/binast/parser/tester/instanceof-005-n.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-005-n.js
js/src/jsapi-tests/binast/parser/tester/instanceof-006.binjs
js/src/jsapi-tests/binast/parser/tester/instanceof-006.js
js/src/jsapi-tests/binast/parser/tester/keywords-001.binjs
js/src/jsapi-tests/binast/parser/tester/keywords-001.js
js/src/jsapi-tests/binast/parser/tester/label-001.binjs
js/src/jsapi-tests/binast/parser/tester/label-001.js
js/src/jsapi-tests/binast/parser/tester/label-002.binjs
js/src/jsapi-tests/binast/parser/tester/label-002.js
js/src/jsapi-tests/binast/parser/tester/label-003.binjs
js/src/jsapi-tests/binast/parser/tester/label-003.js
js/src/jsapi-tests/binast/parser/tester/lexical-001.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-001.js
js/src/jsapi-tests/binast/parser/tester/lexical-002.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-002.js
js/src/jsapi-tests/binast/parser/tester/lexical-003.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-003.js
js/src/jsapi-tests/binast/parser/tester/lexical-004.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-004.js
js/src/jsapi-tests/binast/parser/tester/lexical-005.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-005.js
js/src/jsapi-tests/binast/parser/tester/lexical-006.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-006.js
js/src/jsapi-tests/binast/parser/tester/lexical-007.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-007.js
js/src/jsapi-tests/binast/parser/tester/lexical-008.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-008.js
js/src/jsapi-tests/binast/parser/tester/lexical-009.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-009.js
js/src/jsapi-tests/binast/parser/tester/lexical-011.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-011.js
js/src/jsapi-tests/binast/parser/tester/lexical-012.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-012.js
js/src/jsapi-tests/binast/parser/tester/lexical-013.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-013.js
js/src/jsapi-tests/binast/parser/tester/lexical-014.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-014.js
js/src/jsapi-tests/binast/parser/tester/lexical-015.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-015.js
js/src/jsapi-tests/binast/parser/tester/lexical-016.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-016.js
js/src/jsapi-tests/binast/parser/tester/lexical-017.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-017.js
js/src/jsapi-tests/binast/parser/tester/lexical-018.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-018.js
js/src/jsapi-tests/binast/parser/tester/lexical-019.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-019.js
js/src/jsapi-tests/binast/parser/tester/lexical-020.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-020.js
js/src/jsapi-tests/binast/parser/tester/lexical-021.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-021.js
js/src/jsapi-tests/binast/parser/tester/lexical-023.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-023.js
js/src/jsapi-tests/binast/parser/tester/lexical-024.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-024.js
js/src/jsapi-tests/binast/parser/tester/lexical-025.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-025.js
js/src/jsapi-tests/binast/parser/tester/lexical-026.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-026.js
js/src/jsapi-tests/binast/parser/tester/lexical-027.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-027.js
js/src/jsapi-tests/binast/parser/tester/lexical-028.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-028.js
js/src/jsapi-tests/binast/parser/tester/lexical-029.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-029.js
js/src/jsapi-tests/binast/parser/tester/lexical-030.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-030.js
js/src/jsapi-tests/binast/parser/tester/lexical-031.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-031.js
js/src/jsapi-tests/binast/parser/tester/lexical-032.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-032.js
js/src/jsapi-tests/binast/parser/tester/lexical-033.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-033.js
js/src/jsapi-tests/binast/parser/tester/lexical-034.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-034.js
js/src/jsapi-tests/binast/parser/tester/lexical-035.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-035.js
js/src/jsapi-tests/binast/parser/tester/lexical-036.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-036.js
js/src/jsapi-tests/binast/parser/tester/lexical-037.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-037.js
js/src/jsapi-tests/binast/parser/tester/lexical-038.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-038.js
js/src/jsapi-tests/binast/parser/tester/lexical-039.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-039.js
js/src/jsapi-tests/binast/parser/tester/lexical-040.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-040.js
js/src/jsapi-tests/binast/parser/tester/lexical-041.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-041.js
js/src/jsapi-tests/binast/parser/tester/lexical-042.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-042.js
js/src/jsapi-tests/binast/parser/tester/lexical-047.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-047.js
js/src/jsapi-tests/binast/parser/tester/lexical-048.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-048.js
js/src/jsapi-tests/binast/parser/tester/lexical-049.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-049.js
js/src/jsapi-tests/binast/parser/tester/lexical-050.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-050.js
js/src/jsapi-tests/binast/parser/tester/lexical-051.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-051.js
js/src/jsapi-tests/binast/parser/tester/lexical-052.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-052.js
js/src/jsapi-tests/binast/parser/tester/lexical-053.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-053.js
js/src/jsapi-tests/binast/parser/tester/lexical-054.binjs
js/src/jsapi-tests/binast/parser/tester/lexical-054.js
js/src/jsapi-tests/binast/parser/tester/match-001.binjs
js/src/jsapi-tests/binast/parser/tester/match-001.js
js/src/jsapi-tests/binast/parser/tester/match-002.binjs
js/src/jsapi-tests/binast/parser/tester/match-002.js
js/src/jsapi-tests/binast/parser/tester/match-003.binjs
js/src/jsapi-tests/binast/parser/tester/match-003.js
js/src/jsapi-tests/binast/parser/tester/match-004.binjs
js/src/jsapi-tests/binast/parser/tester/match-004.js
js/src/jsapi-tests/binast/parser/tester/multiline-001.binjs
js/src/jsapi-tests/binast/parser/tester/multiline-001.js
js/src/jsapi-tests/binast/parser/tester/number-001.binjs
js/src/jsapi-tests/binast/parser/tester/number-001.js
js/src/jsapi-tests/binast/parser/tester/number-002.binjs
js/src/jsapi-tests/binast/parser/tester/number-002.js
js/src/jsapi-tests/binast/parser/tester/number-003.binjs
js/src/jsapi-tests/binast/parser/tester/number-003.js
js/src/jsapi-tests/binast/parser/tester/octal-001.binjs
js/src/jsapi-tests/binast/parser/tester/octal-001.js
js/src/jsapi-tests/binast/parser/tester/octal-002.binjs
js/src/jsapi-tests/binast/parser/tester/octal-002.js
js/src/jsapi-tests/binast/parser/tester/octal-003.binjs
js/src/jsapi-tests/binast/parser/tester/octal-003.js
js/src/jsapi-tests/binast/parser/tester/properties-001.binjs
js/src/jsapi-tests/binast/parser/tester/properties-001.js
js/src/jsapi-tests/binast/parser/tester/properties-002.binjs
js/src/jsapi-tests/binast/parser/tester/properties-002.js
js/src/jsapi-tests/binast/parser/tester/regexp-enumerate-001.binjs
js/src/jsapi-tests/binast/parser/tester/regexp-enumerate-001.js
js/src/jsapi-tests/binast/parser/tester/regexp-literals-001.binjs
js/src/jsapi-tests/binast/parser/tester/regexp-literals-001.js
js/src/jsapi-tests/binast/parser/tester/regexp-literals-002.binjs
js/src/jsapi-tests/binast/parser/tester/regexp-literals-002.js
js/src/jsapi-tests/binast/parser/tester/regress-001.binjs
js/src/jsapi-tests/binast/parser/tester/regress-001.js
js/src/jsapi-tests/binast/parser/tester/regress-7635.binjs
js/src/jsapi-tests/binast/parser/tester/regress-7635.js
js/src/jsapi-tests/binast/parser/tester/split-001.binjs
js/src/jsapi-tests/binast/parser/tester/split-001.js
js/src/jsapi-tests/binast/parser/tester/split-002.binjs
js/src/jsapi-tests/binast/parser/tester/split-002.js
js/src/jsapi-tests/binast/parser/tester/split-003.binjs
js/src/jsapi-tests/binast/parser/tester/split-003.js
js/src/jsapi-tests/binast/parser/tester/statement-001.binjs
js/src/jsapi-tests/binast/parser/tester/statement-001.js
js/src/jsapi-tests/binast/parser/tester/statement-002.binjs
js/src/jsapi-tests/binast/parser/tester/statement-002.js
js/src/jsapi-tests/binast/parser/tester/statement-003.binjs
js/src/jsapi-tests/binast/parser/tester/statement-003.js
js/src/jsapi-tests/binast/parser/tester/statement-004.binjs
js/src/jsapi-tests/binast/parser/tester/statement-004.js
js/src/jsapi-tests/binast/parser/tester/statement-005.binjs
js/src/jsapi-tests/binast/parser/tester/statement-005.js
js/src/jsapi-tests/binast/parser/tester/statement-006.binjs
js/src/jsapi-tests/binast/parser/tester/statement-006.js
js/src/jsapi-tests/binast/parser/tester/statement-007.binjs
js/src/jsapi-tests/binast/parser/tester/statement-007.js
js/src/jsapi-tests/binast/parser/tester/statement-008.binjs
js/src/jsapi-tests/binast/parser/tester/statement-008.js
js/src/jsapi-tests/binast/parser/tester/statement-009.binjs
js/src/jsapi-tests/binast/parser/tester/statement-009.js
js/src/jsapi-tests/binast/parser/tester/string-001.binjs
js/src/jsapi-tests/binast/parser/tester/string-001.js
js/src/jsapi-tests/binast/parser/tester/string-002.binjs
js/src/jsapi-tests/binast/parser/tester/string-002.js
js/src/jsapi-tests/binast/parser/tester/switch-001.binjs
js/src/jsapi-tests/binast/parser/tester/switch-001.js
js/src/jsapi-tests/binast/parser/tester/switch-002.binjs
js/src/jsapi-tests/binast/parser/tester/switch-002.js
js/src/jsapi-tests/binast/parser/tester/switch-003.binjs
js/src/jsapi-tests/binast/parser/tester/switch-003.js
js/src/jsapi-tests/binast/parser/tester/switch-004.binjs
js/src/jsapi-tests/binast/parser/tester/switch-004.js
js/src/jsapi-tests/binast/parser/tester/try-001.binjs
js/src/jsapi-tests/binast/parser/tester/try-001.js
js/src/jsapi-tests/binast/parser/tester/try-003.binjs
js/src/jsapi-tests/binast/parser/tester/try-003.js
js/src/jsapi-tests/binast/parser/tester/try-004.binjs
js/src/jsapi-tests/binast/parser/tester/try-004.js
js/src/jsapi-tests/binast/parser/tester/try-005.binjs
js/src/jsapi-tests/binast/parser/tester/try-005.js
js/src/jsapi-tests/binast/parser/tester/try-006.binjs
js/src/jsapi-tests/binast/parser/tester/try-006.js
js/src/jsapi-tests/binast/parser/tester/try-007.binjs
js/src/jsapi-tests/binast/parser/tester/try-007.js
js/src/jsapi-tests/binast/parser/tester/try-008.binjs
js/src/jsapi-tests/binast/parser/tester/try-008.js
js/src/jsapi-tests/binast/parser/tester/try-009.binjs
js/src/jsapi-tests/binast/parser/tester/try-009.js
js/src/jsapi-tests/binast/parser/tester/try-010.binjs
js/src/jsapi-tests/binast/parser/tester/try-010.js
js/src/jsapi-tests/binast/parser/tester/try-012.binjs
js/src/jsapi-tests/binast/parser/tester/try-012.js
js/src/jsapi-tests/binast/parser/tester/unicode-001.binjs
js/src/jsapi-tests/binast/parser/tester/unicode-001.js
js/src/jsapi-tests/binast/parser/tester/while-001.binjs
js/src/jsapi-tests/binast/parser/tester/while-001.js
js/src/jsapi-tests/binast/parser/tester/while-002.binjs
js/src/jsapi-tests/binast/parser/tester/while-002.js
js/src/jsapi-tests/binast/parser/tester/while-003.binjs
js/src/jsapi-tests/binast/parser/tester/while-003.js
js/src/jsapi-tests/binast/parser/tester/while-004.binjs
js/src/jsapi-tests/binast/parser/tester/while-004.js
js/src/jsapi-tests/binast/tokenizer/tester/test-empty-list.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-empty-untagged-tuple.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-nested-lists.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-simple-string.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-simple-tagged-tuple.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-string-with-escapes.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-trivial-list.binjs
js/src/jsapi-tests/binast/tokenizer/tester/test-trivial-untagged-tuple.binjs
js/src/jsapi-tests/moz.build
js/src/jsapi-tests/testBinASTReader.cpp
js/src/jsapi-tests/testBinTokenReaderTester.cpp
js/src/moz.build
js/src/shell/js.cpp
testing/runcppunittests.py
--- a/.eslintignore
+++ b/.eslintignore
@@ -302,17 +302,16 @@ gfx/skia/**
 js/ductwork/**
 js/examples/**
 js/ipc/**
 js/public/**
 js/xpconnect/**
 js/src/devtools/**
 js/src/octane/**
 js/src/jit-test/**
-js/src/jsapi-tests/binast/**
 js/src/tests/**
 js/src/Y.js
 
 # Third-party
 media/webrtc/trunk/**
 
 # mobile/android/ exclusions
 mobile/android/tests/browser/chrome/tp5/**
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -403,23 +403,8 @@ js_option('--enable-pipeline-operator', 
 
 @depends('--enable-pipeline-operator')
 def enable_pipeline_operator(value):
     if value:
         return True
 
 set_config('ENABLE_PIPELINE_OPERATOR', enable_pipeline_operator)
 set_define('ENABLE_PIPELINE_OPERATOR', enable_pipeline_operator)
-
-
-
-# Experimental support for BinAST
-# ==============================================================
-
-@depends(target, milestone)
-def enable_build_binast(target, milestone):
-    # For reasons unknown at this time, BinAST causes timeouts on win32
-    # and failures on Android.
-    if milestone.is_nightly and not (target.kernel == 'WINNT' and target.cpu == 'x86') and not (target.os == 'Android'):
-        return True
-
-set_define('JS_BUILD_BINAST', enable_build_binast)
-set_config('JS_BUILD_BINAST', enable_build_binast)
--- a/js/public/RootingAPI.h
+++ b/js/public/RootingAPI.h
@@ -862,19 +862,16 @@ class JS_PUBLIC_API(AutoGCRooter)
      * below.  Any other negative value indicates some deeper problem such as
      * memory corruption.
      */
     ptrdiff_t tag_;
 
     enum {
         VALARRAY =     -2, /* js::AutoValueArray */
         PARSER =       -3, /* js::frontend::Parser */
-#if defined(JS_BUILD_BINAST)
-        BINPARSER =    -4, /* js::frontend::BinSource */
-#endif // defined(JS_BUILD_BINAST)
         VALVECTOR =   -10, /* js::AutoValueVector */
         IDVECTOR =    -11, /* js::AutoIdVector */
         OBJVECTOR =   -14, /* js::AutoObjectVector */
         IONMASM =     -19, /* js::jit::MacroAssembler */
         WRAPVECTOR =  -20, /* js::AutoWrapperVector */
         WRAPPER =     -21, /* js::AutoWrapperRooter */
         CUSTOM =      -26  /* js::CustomAutoRooter */
     };
--- a/js/src/devtools/automation/autospider.py
+++ b/js/src/devtools/automation/autospider.py
@@ -27,17 +27,16 @@ def directories(pathmodule, cwd, fixup=l
     return Dirs(scripts, js_src, source, tooltool)
 
 # Some scripts will be called with sh, which cannot use backslashed
 # paths. So for direct subprocess.* invocation, use normal paths from
 # DIR, but when running under the shell, use POSIX style paths.
 DIR = directories(os.path, os.getcwd())
 PDIR = directories(posixpath, os.environ["PWD"],
                    fixup=lambda s: re.sub(r'^(\w):', r'/\1', s))
-env['CPP_UNIT_TESTS_DIR_JS_SRC'] = DIR.js_src
 
 parser = argparse.ArgumentParser(
     description='Run a spidermonkey shell build job')
 parser.add_argument('--dep', action='store_true',
                     help='do not clobber the objdir before building')
 parser.add_argument('--keep', action='store_true',
                     help='do not delete the sanitizer output directory (for testing)')
 parser.add_argument('--platform', '-p', type=str, metavar='PLATFORM',
deleted file mode 100644
--- a/js/src/frontend/BinSource.cpp
+++ /dev/null
@@ -1,2503 +0,0 @@
-#include "frontend/BinSource.h"
-
-#include "mozilla/ArrayUtils.h"
-#include "mozilla/Casting.h"
-#include "mozilla/Maybe.h"
-#include "mozilla/Move.h"
-#include "mozilla/PodOperations.h"
-#include "mozilla/Vector.h"
-
-#include "frontend/BinTokenReaderTester.h"
-#include "frontend/FullParseHandler.h"
-#include "frontend/Parser.h"
-#include "frontend/SharedContext.h"
-
-#include "vm/RegExpObject.h"
-
-#include "frontend/ParseContext-inl.h"
-#include "frontend/ParseNode-inl.h"
-
-
-// # About compliance with EcmaScript
-//
-// For the moment, this parser implements ES5. Future versions will be extended
-// to ES6 and further on.
-//
-// By design, it does NOT implement Annex B.3.3. If possible, we would like
-// to avoid going down that rabbit hole.
-//
-//
-// # About the AST
-//
-// At this stage of experimentation, the AST specifications change often. This
-// version of the parser attempts to implement
-// https://gist.github.com/Yoric/2390f0367515c079172be2526349b294
-//
-//
-// # About validating the AST
-//
-// Normally, this implementation validates all properties of the AST *except* the
-// order of fields, which is partially constrained by the AST spec (e.g. in a block,
-// field `scope` must appear before field `body`, etc.).
-//
-//
-// # About names and scopes
-//
-// One of the key objectives of the BinAST syntax is to be able to entirely skip
-// parsing inner functions until they are needed. With a purely syntactic AST,
-// this is generally impossible, as we would need to walk the AST to find
-// lexically-bound/var-bound variables, instances of direct eval, etc.
-//
-// To achieve this, BinAST files contain scope data, as instances of
-// `BinJS:Scope` nodes. Rather than walking the AST to assign bindings
-// to scopes, we extract data from the `BinJS:Scope` and check it lazily,
-// once we actually need to walk the AST.
-//
-// WARNING: The current implementation DOES NOT perform the check yet. It
-// is therefore unsafe.
-//
-// # About directives
-//
-// Currently, directives are ignored and treated as regular strings.
-//
-// They should be treated lazily (whenever we open a subscope), like bindings.
-
-// Evaluate an expression, checking that the result is not 0.
-//
-// Throw `cx->alreadyReportedError()` if it returns 0/nullptr.
-#define TRY(EXPR) \
-    do { \
-        if (!EXPR) \
-            return cx_->alreadyReportedError(); \
-    } while(false)
-
-
-#define TRY_VAR(VAR, EXPR) \
-    do { \
-        VAR = EXPR; \
-        if (!VAR) \
-            return cx_->alreadyReportedError(); \
-    } while (false)
-
-#define TRY_DECL(VAR, EXPR) \
-    auto VAR = EXPR; \
-    if (!VAR) \
-       return cx_->alreadyReportedError();
-
-#define TRY_EMPL(VAR, EXPR) \
-    do { \
-        auto _tryEmplResult = EXPR; \
-        if (!_tryEmplResult) \
-            return cx_->alreadyReportedError(); \
-        VAR.emplace(_tryEmplResult.unwrap()); \
-    } while (false)
-
-#define MOZ_TRY_EMPLACE(VAR, EXPR) \
-    do { \
-        auto _tryEmplResult = EXPR; \
-        if (_tryEmplResult.isErr()) \
-            return ::mozilla::Err(_tryEmplResult.unwrapErr()); \
-        VAR.emplace(_tryEmplResult.unwrap()); \
-    } while (false)
-
-using namespace mozilla;
-
-namespace js {
-namespace frontend {
-
-using AutoList = BinTokenReaderTester::AutoList;
-using AutoTaggedTuple = BinTokenReaderTester::AutoTaggedTuple;
-using AutoTuple = BinTokenReaderTester::AutoTuple;
-using BinFields = BinTokenReaderTester::BinFields;
-using Chars = BinTokenReaderTester::Chars;
-using NameBag = GCHashSet<JSString*>;
-using Names = GCVector<JSString*, 8>;
-using UsedNamePtr = UsedNameTracker::UsedNameMap::Ptr;
-
-namespace {
-    // Compare a bunch of `uint8_t` values (as returned by the tokenizer_) with
-    // a string literal (and ONLY a string literal).
-    template<size_t N>
-    bool operator==(const Chars& left, const char (&right)[N]) {
-        return BinTokenReaderTester::equals(left, right);
-    }
-
-    bool isMethod(BinKind kind) {
-        switch (kind) {
-          case BinKind::ObjectMethod:
-          case BinKind::ObjectGetter:
-          case BinKind::ObjectSetter:
-            return true;
-          default:
-            return false;
-        }
-    }
-
-#if defined(DEBUG)
-    bool isMethodOrFunction(BinKind kind) {
-        if (isMethod(kind))
-            return true;
-        if (kind == BinKind::FunctionExpression || kind == BinKind::FunctionDeclaration)
-            return true;
-        return false;
-    }
-#endif // defined(DEBUG)
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parse(const Vector<uint8_t>& data)
-{
-    return parse(data.begin(), data.length());
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parse(const uint8_t* start, const size_t length)
-{
-    auto result = parseAux(start, length);
-    poison(); // Make sure that the parser is never used again accidentally.
-    return result;
-}
-
-
-JS::Result<ParseNode*>
-BinASTParser::parseAux(const uint8_t* start, const size_t length)
-{
-    tokenizer_.emplace(cx_, start, length);
-
-    Directives directives(options().strictOption);
-    GlobalSharedContext globalsc(cx_, ScopeKind::Global,
-                                 directives, options().extraWarningsOption);
-    BinParseContext globalpc(cx_, this, &globalsc, /* newDirectives = */ nullptr);
-    if (!globalpc.init())
-        return cx_->alreadyReportedError();
-
-    ParseContext::VarScope varScope(cx_, &globalpc, usedNames_);
-    if (!varScope.init(&globalpc))
-        return cx_->alreadyReportedError();
-
-    ParseNode* result(nullptr);
-    MOZ_TRY_VAR(result, parseProgram());
-
-    Maybe<GlobalScope::Data*> bindings = NewGlobalScopeData(cx_, varScope, alloc_, parseContext_);
-    if (!bindings)
-        return cx_->alreadyReportedError();
-    globalsc.bindings = *bindings;
-
-    return result; // Magic conversion to Ok.
-}
-
-Result<ParseNode*>
-BinASTParser::parseProgram()
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    if (kind != BinKind::Program)
-        return this->raiseInvalidKind("Program", kind);
-
-    ParseNode* result;
-    MOZ_TRY_VAR(result, parseBlockStatementAux(kind, fields));
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseBlockStatement()
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result(nullptr);
-    switch (kind) {
-      default:
-        return raiseInvalidKind("BlockStatement", kind);
-      case BinKind::BlockStatement:
-        MOZ_TRY_VAR(result, parseBlockStatementAux(kind, fields));
-        break;
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<Ok>
-BinASTParser::parseAndUpdateScopeNames(ParseContext::Scope& scope, DeclarationKind kind)
-{
-    AutoList guard(*tokenizer_);
-    uint32_t length = 0;
-
-    TRY(tokenizer_->enterList(length, guard));
-    RootedAtom name(cx_);
-    for (uint32_t i = 0; i < length; ++i) {
-        name = nullptr;
-
-        MOZ_TRY(readString(&name));
-        auto ptr = scope.lookupDeclaredNameForAdd(name);
-        if (ptr) {
-            if (kind == DeclarationKind::Let || kind == DeclarationKind::Const)
-                return raiseError("Variable redeclaration");
-
-#if defined(DEBUG)
-            // FIXME: Fix binjs-ref.
-            fprintf(stderr, "Weird: `var` redeclaration. Check encoder: ");
-            name->dump();
-            fprintf(stderr, "\n");
-#endif // defined(DEBUG)
-            continue;
-        }
-
-        TRY(scope.addDeclaredName(parseContext_, ptr, name.get(), kind, tokenizer_->offset()));
-    }
-    TRY(guard.done());
-    return Ok();
-}
-
-JS::Result<Ok>
-BinASTParser::parseAndUpdateCurrentScope()
-{
-    return parseAndUpdateScope(parseContext_->varScope(), *parseContext_->innermostScope());
-}
-
-JS::Result<Ok>
-BinASTParser::parseAndUpdateScope(ParseContext::Scope& varScope, ParseContext::Scope& letScope)
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    switch (kind) {
-      default:
-        return raiseInvalidKind("Scope", kind);
-      case BinKind::BINJS_Scope:
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::BINJS_HasDirectEval:
-                MOZ_TRY(readBool()); // Currently ignored.
-                break;
-              case BinField::BINJS_LetDeclaredNames:
-                MOZ_TRY(parseAndUpdateScopeNames(letScope, DeclarationKind::Let));
-                break;
-              case BinField::BINJS_ConstDeclaredNames:
-                MOZ_TRY(parseAndUpdateScopeNames(letScope, DeclarationKind::Const));
-                break;
-              case BinField::BINJS_VarDeclaredNames:
-                MOZ_TRY(parseAndUpdateScopeNames(varScope, DeclarationKind::Var));
-                break;
-              case BinField::BINJS_CapturedNames: {
-                Rooted<Maybe<Names>> names(cx_); //FIXME: Currently ignored.
-                MOZ_TRY(parseStringList(&names));
-                break;
-              }
-              default:
-                return raiseInvalidField("Scope", field);
-            }
-        }
-        break;
-    }
-
-    TRY(guard.done());
-    return Ok();
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseBlockStatementAux(const BinKind kind, const BinFields& fields)
-{
-    ParseContext::Statement stmt(parseContext_, StatementKind::Block);
-    ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-    TRY(scope.init(parseContext_));
-
-    ParseNode* body(nullptr);
-    ParseNode* directives(nullptr); // FIXME: Largely ignored
-
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::BINJS_Scope:
-            MOZ_TRY(parseAndUpdateCurrentScope());
-            break;
-          case BinField::Body:
-            MOZ_TRY_VAR(body, parseStatementList());
-            break;
-          case BinField::Directives:
-            if (kind != BinKind::Program)
-                return raiseInvalidField("BlockStatement", field);
-            MOZ_TRY_VAR(directives, parseDirectiveList());
-            break;
-          default:
-            return raiseInvalidField("BlockStatement", field);
-        }
-    }
-
-    // In case of absent optional fields, inject default values.
-    if (!body)
-        body = factory_.newStatementList(tokenizer_->pos());
-
-    MOZ_TRY_VAR(body, appendDirectivesToBody(body, directives));
-
-    ParseNode* result;
-    if (kind == BinKind::Program) {
-        result = body;
-    } else {
-        TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
-        TRY_VAR(result, factory_.newLexicalScope(*bindings, body));
-    }
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::appendDirectivesToBody(ParseNode* body, ParseNode* directives)
-{
-    ParseNode* result = body;
-    if (directives && directives->pn_count >= 1) {
-        MOZ_ASSERT(directives->isArity(PN_LIST));
-
-        // Convert directive list to a list of strings.
-        TRY_DECL(prefix, factory_.newStatementList(directives->pn_head->pn_pos));
-        for (ParseNode* iter = directives->pn_head; iter != nullptr; iter = iter->pn_next) {
-            TRY_DECL(statement, factory_.newExprStatement(iter, iter->pn_pos.end));
-            prefix->appendWithoutOrderAssumption(statement);
-        }
-
-        // Prepend to the body.
-        ParseNode* iter = body->pn_head;
-        while (iter) {
-            ParseNode* next = iter->pn_next;
-            prefix->appendWithoutOrderAssumption(iter);
-            iter = next;
-        }
-        prefix->setKind(body->getKind());
-        prefix->setOp(body->getOp());
-        result = prefix;
-#if defined(DEBUG)
-        result->checkListConsistency();
-#endif // defined(DEBUG)
-    }
-
-    return result;
-}
-
-JS::Result<Ok>
-BinASTParser::parseStringList(MutableHandle<Maybe<Names>> out)
-{
-    MOZ_ASSERT(out.get().isNothing()); // Sanity check: the node must not have been parsed yet.
-
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-
-    Names result(cx_);
-
-    TRY(tokenizer_->enterList(length, guard));
-    if (!result.reserve(length))
-        return raiseOOM();
-
-    RootedAtom string(cx_);
-    for (uint32_t i = 0; i < length; ++i) {
-        string = nullptr;
-
-        MOZ_TRY(readString(&string));
-        result.infallibleAppend(Move(string)); // Checked in the call to `reserve`.
-    }
-
-    TRY(guard.done());
-    out.set(Move(Some(Move(result))));
-    return Ok();
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseStatementList()
-{
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-
-    TRY_DECL(result, factory_.newStatementList(tokenizer_->pos()));
-
-    TRY(tokenizer_->enterList(length, guard));
-    for (uint32_t i = 0; i < length; ++i) {
-        BinKind kind;
-        BinFields fields(cx_);
-        AutoTaggedTuple guard(*tokenizer_);
-
-        ParseNode* statement(nullptr);
-
-        TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-        switch (kind) {
-          case BinKind::FunctionDeclaration:
-            MOZ_TRY_VAR(statement, parseFunctionAux(kind, fields));
-            break;
-          default:
-            MOZ_TRY_VAR(statement, parseStatementAux(kind, fields));
-            break;
-        }
-
-        TRY(guard.done());
-        result->appendWithoutOrderAssumption(statement);
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseStatement()
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result;
-    MOZ_TRY_VAR(result, parseStatementAux(kind, fields));
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseStatementAux(const BinKind kind, const BinFields& fields)
-{
-    const size_t start = tokenizer_->offset();
-
-    ParseNode* result(nullptr);
-    switch (kind) {
-      case BinKind::EmptyStatement: {
-        TRY_VAR(result, factory_.newEmptyStatement(tokenizer_->pos(start)));
-        break;
-      }
-      case BinKind::BlockStatement:
-        MOZ_TRY_VAR(result, parseBlockStatementAux(kind, fields));
-        break;
-      case BinKind::ExpressionStatement:
-        MOZ_TRY_VAR(result, parseExpressionStatementAux(kind, fields));
-        break;
-      case BinKind::DebuggerStatement: {
-        TRY_VAR(result, factory_.newDebuggerStatement(tokenizer_->pos(start)));
-        break;
-      }
-      case BinKind::WithStatement: {
-        ParseNode* body(nullptr);
-        ParseNode* expr(nullptr);
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Body:
-                MOZ_TRY_VAR(body, parseStatement());
-                break;
-              case BinField::Object:
-                MOZ_TRY_VAR(expr, parseExpression());
-                break;
-              default:
-                return raiseInvalidField("WithStatement", field);
-            }
-        }
-
-        if (!body)
-            return raiseMissingField("WithStatement", BinField::Body);
-        if (!expr)
-            return raiseMissingField("WithStatement", BinField::Object);
-
-        TRY_VAR(result, factory_.newWithStatement(start, expr, body));
-
-        break;
-      }
-      case BinKind::ReturnStatement: {
-        if (!parseContext_->isFunctionBox()) {
-            // Return statements are permitted only inside functions.
-            return raiseInvalidKind("Toplevel Statement", kind);
-        }
-        parseContext_->functionBox()->usesReturn = true;
-
-        ParseNode* arg(nullptr);
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Argument:
-                MOZ_TRY_VAR(arg, parseExpression());
-                break;
-              default:
-                return raiseInvalidField("ReturnStatement", field);
-            }
-        }
-
-        TRY_VAR(result, factory_.newReturnStatement(arg, tokenizer_->pos(start)));
-
-        break;
-      }
-      case BinKind::LabeledStatement: {
-        // We check for the existence of the jump target when parsing `break label;` or `continue label;`.
-        ParseContext::Statement stmt(parseContext_, StatementKind::Label);
-        ParseNode* label(nullptr);
-        ParseNode* body(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Label:
-                MOZ_TRY_VAR(label, parseIdentifier());
-                break;
-              case BinField::Body: {
-                if (!label)  // By order of fields, `label` MUST always be before `body` in the file.
-                    return raiseMissingField("LabeledStatement", BinField::Label);
-                MOZ_ASSERT(label->name());
-                ParseContext::LabelStatement stmt(parseContext_, label->name());
-                MOZ_TRY_VAR(body, parseStatement());
-                break;
-              }
-              default:
-                return raiseInvalidField("LabeledStatement", field);
-            }
-        }
-
-        if (!label)
-            return raiseMissingField("LabeledStatement", BinField::Label);
-        if (!body)
-            return raiseMissingField("LabeledStatement", BinField::Body);
-
-        TRY_VAR(result, factory_.newLabeledStatement(label->name(), body, start));
-
-        break;
-      }
-
-      case BinKind::BreakStatement:
-      case BinKind::ContinueStatement:
-        MOZ_TRY_VAR(result, parseBreakOrContinueStatementAux(kind, fields));
-        break;
-
-      case BinKind::IfStatement: {
-        ParseContext::Statement stmt(parseContext_, StatementKind::If);
-
-        ParseNode* test(nullptr);
-        ParseNode* consequent(nullptr);
-        ParseNode* alternate(nullptr); // Optional
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Test:
-                MOZ_TRY_VAR(test, parseExpression());
-                break;
-              case BinField::Consequent:
-                MOZ_TRY_VAR(consequent, parseStatement());
-                break;
-              case BinField::Alternate:
-                MOZ_TRY_VAR(alternate, parseStatement());
-                break;
-              default:
-                return raiseInvalidField("IfStatement", field);
-            }
-        }
-
-        if (!test)
-            return raiseMissingField("IfStatement", BinField::Test);
-        if (!consequent)
-            return raiseMissingField("IfStatement", BinField::Consequent);
-
-        TRY_VAR(result, factory_.newIfStatement(start, test, consequent, alternate));
-
-        break;
-      }
-      case BinKind::SwitchStatement: {
-        ParseContext::Statement stmt(parseContext_, StatementKind::Switch);
-        ParseNode* discriminant(nullptr);
-        ParseNode* cases(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Discriminant: {
-                MOZ_TRY_VAR(discriminant, parseExpression());
-                break;
-              }
-              case BinField::Cases: {
-                MOZ_TRY_VAR(cases, parseSwitchCaseList());
-                break;
-              }
-              default:
-                return raiseInvalidField("SwitchStatement", field);
-            }
-        }
-
-        if (!discriminant)
-            return raiseMissingField("SwitchStatement", BinField::Discriminant);
-        if (!cases) {
-            TRY_VAR(cases, factory_.newStatementList(tokenizer_->pos()));
-
-            TRY_VAR(cases, factory_.newLexicalScope(nullptr, cases));
-        }
-
-        TRY_VAR(result, factory_.newSwitchStatement(start, discriminant, cases));
-
-        break;
-      }
-
-      case BinKind::ThrowStatement: {
-        ParseNode* arg(nullptr);
-        for (auto field : fields) {
-            if (field != BinField::Argument)
-                return raiseInvalidField("ThrowStatement", field);
-
-            MOZ_TRY_VAR(arg, parseExpression());
-        }
-
-        if (!arg)
-            return raiseMissingField("ThrowStatement", BinField::Argument);
-
-        TRY_VAR(result, factory_.newThrowStatement(arg, tokenizer_->pos(start)));
-
-        break;
-      }
-
-      case BinKind::TryStatement: {
-        ParseNode* block(nullptr);
-        ParseNode* handler(nullptr);
-        ParseNode* finalizer(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Block: {
-                ParseContext::Statement stmt(parseContext_, StatementKind::Try);
-                ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-                TRY(scope.init(parseContext_));
-                MOZ_TRY_VAR(block, parseBlockStatement());
-                break;
-              }
-              case BinField::Handler:
-                MOZ_TRY_VAR(handler, parseCatchClause());
-                break;
-
-              case BinField::Finalizer: {
-                ParseContext::Statement stmt(parseContext_, StatementKind::Finally);
-                ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-                TRY(scope.init(parseContext_));
-                MOZ_TRY_VAR(finalizer, parseBlockStatement());
-                break;
-              }
-
-              default:
-                return raiseInvalidField("TryStatement", field);
-            }
-        }
-
-        if (!block)
-            return raiseMissingField("TryStatement", BinField::Handler);
-        if (!handler && !finalizer)
-            return raiseMissingField("TryStatement (without catch)", BinField::Finalizer);
-
-        TRY_VAR(result, factory_.newTryStatement(start, block, handler, finalizer));
-        break;
-      }
-
-      case BinKind::WhileStatement:
-      case BinKind::DoWhileStatement: {
-        ParseContext::Statement stmt(parseContext_, kind == BinKind::WhileStatement ? StatementKind::WhileLoop : StatementKind::DoLoop);
-        ParseNode* test(nullptr);
-        ParseNode* body(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Test:
-                MOZ_TRY_VAR(test, parseExpression());
-                break;
-              case BinField::Body:
-                MOZ_TRY_VAR(body, parseStatement());
-                break;
-              default:
-                return raiseInvalidField("WhileStatement | DoWhileStatement", field);
-            }
-        }
-
-        if (!test)
-            return raiseMissingField("WhileStatement | DoWhileStatement", BinField::Test);
-        if (!body)
-            return raiseMissingField("WhileStatement | DoWhileStatement", BinField::Body);
-
-        if (kind == BinKind::WhileStatement)
-            TRY_VAR(result, factory_.newWhileStatement(start, test, body));
-        else
-            TRY_VAR(result, factory_.newDoWhileStatement(body, test, tokenizer_->pos(start)));
-
-        break;
-      }
-      case BinKind::ForStatement: {
-        ParseContext::Statement stmt(parseContext_, StatementKind::ForLoop);
-
-        // Implicit scope around the `for`, used to store `for (let x; ...; ...)`
-        // or `for (const x; ...; ...)`-style declarations. Detail on the
-        // declaration is stored as part of `BINJS_Scope`.
-        ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-        TRY(scope.init(parseContext_));
-        ParseNode* init(nullptr); // Optional
-        ParseNode* test(nullptr); // Optional
-        ParseNode* update(nullptr); // Optional
-        ParseNode* body(nullptr); // Required
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Init:
-                MOZ_TRY_VAR(init, parseForInit());
-                break;
-              case BinField::Test:
-                MOZ_TRY_VAR(test, parseExpression());
-                break;
-              case BinField::Update:
-                MOZ_TRY_VAR(update, parseExpression());
-                break;
-              case BinField::BINJS_Scope: // The scope always appears before the body.
-                MOZ_TRY(parseAndUpdateCurrentScope());
-                break;
-              case BinField::Body:
-                MOZ_TRY_VAR(body, parseStatement());
-                break;
-              default:
-                return raiseInvalidField("ForStatement", field);
-            }
-        }
-
-        if (!body)
-            return raiseMissingField("ForStatement", BinField::Body);
-
-        TRY_DECL(forHead, factory_.newForHead(init, test, update, tokenizer_->pos(start)));
-        TRY_VAR(result, factory_.newForStatement(start, forHead, body, /* iflags = */ 0));
-
-        if (!scope.isEmpty()) {
-            TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
-            TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
-        }
-
-        break;
-      }
-      case BinKind::ForInStatement: {
-        ParseContext::Statement stmt(parseContext_, StatementKind::ForInLoop);
-
-        // Implicit scope around the `for`, used to store `for (let x in  ...)`
-        // or `for (const x in ...)`-style declarations. Detail on the
-        // declaration is stored as part of `BINJS_Scope`.
-        ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-        TRY(scope.init(parseContext_));
-        ParseNode* left(nullptr);
-        ParseNode* right(nullptr);
-        ParseNode* body(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Left:
-                MOZ_TRY_VAR(left, parseForInInit());
-                break;
-              case BinField::Right:
-                MOZ_TRY_VAR(right, parseExpression());
-                break;
-              case BinField::Body:
-                MOZ_TRY_VAR(body, parseStatement());
-                break;
-              case BinField::BINJS_Scope:
-                MOZ_TRY(parseAndUpdateCurrentScope());
-                break;
-              default:
-                return raiseInvalidField("ForInStatement", field);
-            }
-        }
-
-        if (!left)
-            return raiseMissingField("ForInStatement", BinField::Left);
-        if (!right)
-            return raiseMissingField("ForInStatement", BinField::Right);
-        if (!body)
-            return raiseMissingField("ForInStatement", BinField::Body);
-
-        TRY_DECL(forHead, factory_.newForInOrOfHead(PNK_FORIN, left, right, tokenizer_->pos(start)));
-        TRY_VAR(result, factory_.newForStatement(start, forHead, body, /*flags*/ 0));
-
-        if (!scope.isEmpty()) {
-            TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
-            TRY_VAR(result, factory_.newLexicalScope(*bindings, result));
-        }
-        break;
-      }
-
-      case BinKind::VariableDeclaration:
-        MOZ_TRY_VAR(result, parseVariableDeclarationAux(kind, fields));
-        break;
-
-      default:
-        return raiseInvalidKind("Statement", kind);
-    }
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseBreakOrContinueStatementAux(const BinKind kind, const BinFields& fields)
-{
-    const auto start = tokenizer_->offset();
-    ParseNode* label(nullptr);
-
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Label:
-            MOZ_TRY_VAR(label, parsePattern());
-
-            if (label && !label->isKind(PNK_NAME))
-                return raiseError("ContinueStatement | BreakStatement - Label MUST be an identifier"); // FIXME: This should be changed in the grammar.
-
-            break;
-          default:
-            return raiseInvalidField("ContinueStatement", field);
-        }
-    }
-
-    TokenPos pos = tokenizer_->pos(start);
-    ParseNode* result;
-    if (kind == BinKind::ContinueStatement) {
-#if 0 // FIXME: We probably need to fix the AST before making this check.
-        auto validity = parseContext_->checkContinueStatement(label ? label->name() : nullptr);
-        if (validity.isErr()) {
-            switch (validity.unwrapErr()) {
-              case ParseContext::ContinueStatementError::NotInALoop:
-                return raiseError(kind, "Not in a loop");
-              case ParseContext::ContinueStatementError::LabelNotFound:
-                return raiseError(kind, "Label not found");
-            }
-        }
-#endif // 0
-        // Ok, this is a valid continue statement.
-        TRY_VAR(result, factory_.newContinueStatement(label ? label->name() : nullptr, pos));
-    } else {
-#if 0 // FIXME: We probably need to fix the AST before making this check.
-        auto validity = parseContext_->checkBreakStatement(label ? label->name() : nullptr);
-        if (validity.isErr()) {
-            switch (validity.unwrapErr()) {
-              case ParseContext::BreakStatementError::ToughBreak:
-                 return raiseError(kind, "Not in a loop");
-              case ParseContext::BreakStatementError::LabelNotFound:
-                 return raiseError(kind, "Label not found");
-            }
-        }
-#endif // 0
-        // Ok, this is a valid break statement.
-        TRY_VAR(result, factory_.newBreakStatement(label ? label->name() : nullptr, pos));
-    }
-
-    MOZ_ASSERT(result);
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseForInit()
-{
-    // This can be either a VarDecl or an Expression.
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-    BinKind kind;
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result(nullptr);
-
-    switch (kind) {
-      case BinKind::VariableDeclaration:
-        MOZ_TRY_VAR(result, parseVariableDeclarationAux(kind, fields));
-        break;
-      default:
-        // Parse as expression
-        MOZ_TRY_VAR(result, parseExpressionAux(kind, fields));
-        break;
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseForInInit()
-{
-    // This can be either a VarDecl or a Pattern.
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-    BinKind kind;
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result(nullptr);
-
-    switch (kind) {
-      case BinKind::VariableDeclaration:
-        MOZ_TRY_VAR(result, parseVariableDeclarationAux(kind, fields));
-        break;
-      default:
-        // Parse as expression. Not a joke: http://www.ecma-international.org/ecma-262/5.1/index.html#sec-12.6.4 .
-        MOZ_TRY_VAR(result, parseExpressionAux(kind, fields));
-        break;
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseFunctionAux(const BinKind kind, const BinFields& fields)
-{
-    MOZ_ASSERT(isMethodOrFunction(kind));
-
-    const size_t start = tokenizer_->offset();
-
-    ParseNode* id(nullptr);
-    ParseNode* params(nullptr);
-    ParseNode* body(nullptr);
-    ParseNode* directives(nullptr); // Largely ignored for the moment.
-    ParseNode* key(nullptr);  // Methods only
-
-    // Allocate the function before walking down the tree.
-    RootedFunction fun(cx_);
-    TRY_VAR(fun, NewFunctionWithProto(cx_,
-            /*native*/nullptr,
-            /*nargs ?*/0,
-            /*flags */ JSFunction::INTERPRETED_NORMAL,
-            /*enclosing env*/nullptr,
-            /*name*/ nullptr, // Will be known later
-            /*proto*/ nullptr,
-            /*alloc*/gc::AllocKind::FUNCTION,
-            TenuredObject
-    ));
-    TRY_DECL(funbox, alloc_.new_<FunctionBox>(cx_,
-        traceListHead_,
-        fun,
-        /* toStringStart = */0,
-        /* directives = */Directives(parseContext_),
-        /* extraWarning = */false,
-        GeneratorKind::NotGenerator,
-        FunctionAsyncKind::SyncFunction
-    ));
-
-    traceListHead_ = funbox;
-
-    FunctionSyntaxKind syntax;
-    switch (kind) {
-      case BinKind::FunctionDeclaration:
-        syntax = Statement;
-        break;
-      case BinKind::FunctionExpression:
-        syntax = PrimaryExpression; // FIXME: Probably doesn't work.
-        break;
-      case BinKind::ObjectMethod:
-        syntax = Method;
-        break;
-      case BinKind::ObjectGetter:
-        syntax = Getter;
-        break;
-      case BinKind::ObjectSetter:
-        syntax = Setter;
-        break;
-      default:
-        MOZ_CRASH("Invalid FunctionSyntaxKind"); // Checked above.
-    }
-    funbox->initWithEnclosingParseContext(parseContext_, syntax);
-
-    // Container scopes.
-    ParseContext::Scope& varScope = parseContext_->varScope();
-    ParseContext::Scope* letScope = parseContext_->innermostScope();
-
-    // Push a new ParseContext.
-    BinParseContext funpc(cx_, this, funbox, /* newDirectives = */ nullptr);
-    TRY(funpc.init());
-    parseContext_->functionScope().useAsVarScope(parseContext_);
-    MOZ_ASSERT(parseContext_->isFunctionBox());
-
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Id:
-            MOZ_TRY_VAR(id, parseIdentifier());
-            break;
-          case BinField::Params:
-            MOZ_TRY_VAR(params, parseArgumentList());
-            break;
-          case BinField::BINJS_Scope:
-            // This scope information affects the scopes contained in the function body. MUST appear before the `body`.
-            MOZ_TRY(parseAndUpdateScope(varScope, *letScope));
-            break;
-          case BinField::Directives:
-            MOZ_TRY_VAR(directives, parseDirectiveList());
-            break;
-          case BinField::Body:
-            MOZ_TRY_VAR(body, parseBlockStatement());
-            break;
-          case BinField::Key:
-            if (!isMethod(kind))
-                return raiseInvalidField("Functions (unless defined as methods)", field);
-
-            MOZ_TRY_VAR(key, parseObjectPropertyName());
-            break;
-          default:
-            return raiseInvalidField("Function", field);
-        }
-    }
-
-    // Inject default values for absent fields.
-    if (!params)
-        TRY_VAR(params, new_<ListNode>(PNK_PARAMSBODY, tokenizer_->pos()));
-
-    if (!body)
-        TRY_VAR(body, factory_.newStatementList(tokenizer_->pos()));
-
-    if (kind == BinKind::FunctionDeclaration && !id) {
-        // The name is compulsory only for function declarations.
-        return raiseMissingField("FunctionDeclaration", BinField::Id);
-    }
-
-    // Reject if required values are missing.
-    if (isMethod(kind) && !key)
-        return raiseMissingField("method", BinField::Key);
-
-    if (id)
-        fun->initAtom(id->pn_atom);
-
-    MOZ_ASSERT(params->isArity(PN_LIST));
-
-    if (!(body->isKind(PNK_LEXICALSCOPE) && body->pn_u.scope.body->isKind(PNK_STATEMENTLIST))) {
-        // Promote to lexical scope + statement list.
-        if (!body->isKind(PNK_STATEMENTLIST)) {
-            TRY_DECL(list, factory_.newStatementList(tokenizer_->pos(start)));
-
-            list->initList(body);
-            body = list;
-        }
-
-        // Promote to lexical scope.
-        TRY_VAR(body, factory_.newLexicalScope(nullptr, body));
-    }
-    MOZ_ASSERT(body->isKind(PNK_LEXICALSCOPE));
-
-    MOZ_TRY_VAR(body, appendDirectivesToBody(body, directives));
-
-    params->appendWithoutOrderAssumption(body);
-
-    TokenPos pos = tokenizer_->pos(start);
-    TRY_DECL(function, kind == BinKind::FunctionDeclaration
-                       ? factory_.newFunctionStatement(pos)
-                       : factory_.newFunctionExpression(pos));
-
-    factory_.setFunctionBox(function, funbox);
-    factory_.setFunctionFormalParametersAndBody(function, params);
-
-    ParseNode* result;
-    if (kind == BinKind::ObjectMethod)
-        TRY_VAR(result, factory_.newObjectMethodOrPropertyDefinition(key, function, AccessorType::None));
-    else if (kind == BinKind::ObjectGetter)
-        TRY_VAR(result, factory_.newObjectMethodOrPropertyDefinition(key, function, AccessorType::Getter));
-    else if (kind == BinKind::ObjectSetter)
-        TRY_VAR(result, factory_.newObjectMethodOrPropertyDefinition(key, function, AccessorType::Setter));
-    else
-        result = function;
-
-    // Now handle bindings.
-    HandlePropertyName dotThis = cx_->names().dotThis;
-    const bool declareThis = hasUsedName(dotThis) || funbox->bindingsAccessedDynamically() || funbox->isDerivedClassConstructor();
-
-    if (declareThis) {
-        ParseContext::Scope& funScope = parseContext_->functionScope();
-        ParseContext::Scope::AddDeclaredNamePtr p = funScope.lookupDeclaredNameForAdd(dotThis);
-        MOZ_ASSERT(!p);
-        TRY(funScope.addDeclaredName(parseContext_, p, dotThis, DeclarationKind::Var,
-                                      DeclaredNameInfo::npos));
-        funbox->setHasThisBinding();
-    }
-
-    TRY_DECL(bindings,
-             NewFunctionScopeData(cx_, parseContext_->functionScope(),
-                                  /* hasParameterExprs = */false, alloc_, parseContext_));
-
-    funbox->functionScopeBindings().set(*bindings);
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseObjectPropertyName()
-{
-    auto start = tokenizer_->offset();
-
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-    BinKind kind;
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result;
-    switch (kind) {
-      case BinKind::StringLiteral: {
-        ParseNode* string;
-        MOZ_TRY_VAR(string, parseStringLiteralAux(kind, fields));
-        uint32_t index;
-        if (string->pn_atom->isIndex(&index))
-            TRY_VAR(result, factory_.newNumber(index, NoDecimal, TokenPos(start, tokenizer_->offset())));
-        else
-            result = string;
-
-        break;
-      }
-      case BinKind::NumericLiteral:
-        MOZ_TRY_VAR(result, parseNumericLiteralAux(kind, fields));
-        break;
-      case BinKind::Identifier:
-        MOZ_TRY_VAR(result, parseIdentifierAux(kind, fields, /* expectObjectPropertyName = */ true));
-        break;
-      case BinKind::ComputedPropertyName: {
-        ParseNode* expr;
-        MOZ_TRY_VAR(expr, parseExpressionAux(kind, fields));
-        TRY_VAR(result, factory_.newComputedName(expr, start, tokenizer_->offset()));
-        break;
-      }
-      default:
-        return raiseInvalidKind("ObjectLiteralPropertyName", kind);
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseVariableDeclarationAux(const BinKind kind, const BinFields& fields)
-{
-    const size_t start = tokenizer_->offset();
-
-    ParseNode* result(nullptr);
-    switch (kind) {
-      default:
-        return raiseInvalidKind("VariableDeclaration", kind);
-      case BinKind::VariableDeclaration:
-        ParseNodeKind pnk = PNK_LIMIT;
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Kind: {
-                Maybe<Chars> kindName;
-                MOZ_TRY(readString(kindName));
-
-                if (*kindName == "let")
-                    pnk = PNK_LET;
-                else if (*kindName == "var")
-                    pnk = PNK_VAR;
-                else if (*kindName == "const")
-                    pnk = PNK_CONST;
-                else
-                    return raiseInvalidEnum("VariableDeclaration", *kindName);
-
-                break;
-              }
-              case BinField::Declarations: {
-                uint32_t length;
-                AutoList guard(*tokenizer_);
-
-                TRY(tokenizer_->enterList(length, guard));
-                TRY_VAR(result, factory_.newDeclarationList(PNK_CONST /*Placeholder*/, tokenizer_->pos(start)));
-
-                for (uint32_t i = 0; i < length; ++i) {
-                    ParseNode* current;
-                    MOZ_TRY_VAR(current, parseVariableDeclarator());
-                    MOZ_ASSERT(current);
-
-                    result->appendWithoutOrderAssumption(current);
-                }
-
-                TRY(guard.done());
-                break;
-              }
-              default:
-                return raiseInvalidField("VariableDeclaration", field);
-            }
-        }
-
-        if (!result || pnk == PNK_LIMIT)
-            return raiseMissingField("VariableDeclaration", BinField::Declarations);
-
-        result->setKind(pnk);
-
-        MOZ_ASSERT(!result->isKind(PNK_NOP));
-    }
-
-    return result;
-}
-
-
-JS::Result<ParseNode*>
-BinASTParser::parseExpressionStatementAux(const BinKind kind, const BinFields& fields)
-{
-    MOZ_ASSERT(kind == BinKind::ExpressionStatement);
-
-    ParseNode* expr(nullptr);
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Expression:
-            MOZ_TRY_VAR(expr, parseExpression());
-
-            break;
-          default:
-            return raiseInvalidField("ExpressionStatement", field);
-        }
-    }
-
-    if (!expr)
-        return raiseMissingField("ExpressionStatement", BinField::Expression);
-
-    TRY_DECL(result, factory_.newExprStatement(expr, tokenizer_->offset()));
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseVariableDeclarator()
-{
-    const size_t start = tokenizer_->offset();
-
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    if (kind != BinKind::VariableDeclarator)
-        return raiseInvalidKind("VariableDeclarator", kind);
-
-    ParseNode* id(nullptr);
-    ParseNode* init(nullptr); // Optional.
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Id:
-            MOZ_TRY_VAR(id, parsePattern());
-
-            break;
-          case BinField::Init:
-            MOZ_TRY_VAR(init, parseExpression());
-
-            break;
-          default:
-            return raiseInvalidField("VariableDeclarator", field);
-        }
-    }
-
-    TRY(guard.done());
-    if (!id)
-        return raiseMissingField("VariableDeclarator", BinField::Id);
-
-    ParseNode* result(nullptr);
-
-    // FIXME: Documentation in ParseNode is clearly obsolete.
-    if (id->isKind(PNK_NAME)) {
-        // `var foo [= bar]``
-        TRY_VAR(result, factory_.newName(id->pn_atom->asPropertyName(), tokenizer_->pos(start), cx_));
-
-        if (init)
-            result->pn_expr = init;
-
-    } else {
-        // `var pattern = bar`
-        if (!init) {
-            // Here, `init` is required.
-            return raiseMissingField("VariableDeclarator (with non-trivial pattern)", BinField::Init);
-        }
-
-        TRY_VAR(result, factory_.newAssignment(PNK_ASSIGN, id, init));
-    }
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseExpressionList(bool acceptElisions)
-{
-    const size_t start = tokenizer_->offset();
-
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-
-    TRY(tokenizer_->enterList(length, guard));
-    TRY_DECL(result, factory_.newArrayLiteral(start));
-
-    for (uint32_t i = 0; i < length; ++i) {
-        BinFields fields(cx_);
-        AutoTaggedTuple guard(*tokenizer_);
-        BinKind kind;
-
-        TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-        switch (kind) {
-          case BinKind::Elision: {
-            if (!acceptElisions)
-                return raiseInvalidKind("[Expression]", kind);
-
-            MOZ_TRY(parseElisionAux(kind, fields));
-            TRY(!factory_.addElision(result, tokenizer_->pos(start)));
-            break;
-          }
-          default: {
-            ParseNode* expr(nullptr);
-            MOZ_TRY_VAR(expr, parseExpressionAux(kind, fields));
-
-            MOZ_ASSERT(expr);
-            factory_.addArrayElement(result, expr);
-          }
-        }
-
-        TRY(guard.done());
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<Ok>
-BinASTParser::parseElisionAux(const BinKind kind, const BinFields& fields)
-{
-    MOZ_ASSERT(kind == BinKind::Elision);
-    MOZ_TRY(checkEmptyTuple(kind, fields));
-
-    return Ok();
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseSwitchCaseList()
-{
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-
-    TRY(tokenizer_->enterList(length, guard));
-    TRY_DECL(list, factory_.newStatementList(tokenizer_->pos()));
-
-    // Set to `true` once we have encountered a `default:` case.
-    // Two `default:` cases is an error.
-    bool haveDefault = false;
-
-    for (uint32_t i = 0; i < length; ++i) {
-        ParseNode* caseNode(nullptr);
-        MOZ_TRY_VAR(caseNode, parseSwitchCase());
-        MOZ_ASSERT(caseNode);
-
-        if (caseNode->pn_left == nullptr) {
-            // Ah, seems that we have encountered a default case.
-            if (haveDefault) {
-                // Oh, wait, two defaults? That's an error.
-                return raiseError("This switch() has more than one `default:` case");
-            }
-            haveDefault = true;
-        }
-        factory_.addCaseStatementToList(list, caseNode);
-    }
-
-    TRY(guard.done());
-    TRY_DECL(result, factory_.newLexicalScope(nullptr, list));
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseExpression()
-{
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-    BinKind kind;
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result(nullptr);
-    MOZ_TRY_VAR(result, parseExpressionAux(kind, fields));
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseExpressionAux(const BinKind kind, const BinFields& fields)
-{
-    const size_t start = tokenizer_->offset();
-
-    ParseNode* result(nullptr);
-
-    switch (kind) {
-      case BinKind::Identifier: {
-        MOZ_TRY_VAR(result, parseIdentifierAux(kind, fields));
-        break;
-      }
-      case BinKind::BooleanLiteral: {
-        Maybe<bool> value;
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Value:
-                MOZ_TRY_EMPLACE(value, readBool());
-                break;
-              default:
-                return raiseInvalidField("BooleanLiteral", field);
-            }
-        }
-
-        // In case of absent optional fields, inject default values.
-        if (!value)
-            value.emplace(false);
-
-        TRY_VAR(result, factory_.newBooleanLiteral(*value, tokenizer_->pos(start)));
-
-        break;
-      }
-      case BinKind::NullLiteral: {
-        MOZ_TRY(checkEmptyTuple(kind, fields));
-        TRY_VAR(result, factory_.newNullLiteral(tokenizer_->pos(start)));
-        break;
-      }
-      case BinKind::NumericLiteral:
-        MOZ_TRY_VAR(result, parseNumericLiteralAux(kind, fields));
-        break;
-
-      case BinKind::RegExpLiteral: {
-        RootedAtom pattern(cx_);
-        Maybe<Chars> flags;
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Pattern:
-                MOZ_TRY(readString(&pattern));
-                break;
-              case BinField::Flags:
-                MOZ_TRY(readString(flags));
-                break;
-              default:
-                return raiseInvalidField("RegExpLiteral", field);
-            }
-        }
-
-        if (!pattern)
-            return raiseMissingField("RegExpLiteral", BinField::Pattern);
-        if (!flags)
-            return raiseMissingField("RegExpLiteral", BinField::Flags);
-
-        RegExpFlag reflags = NoFlags;
-        for (auto c : *flags) {
-            if (c == 'g' && !(reflags & GlobalFlag))
-                reflags = RegExpFlag(reflags | GlobalFlag);
-            else if (c == 'i' && !(reflags & IgnoreCaseFlag))
-                reflags = RegExpFlag(reflags | IgnoreCaseFlag);
-            else if (c == 'm' && !(reflags & MultilineFlag))
-                reflags = RegExpFlag(reflags | MultilineFlag);
-            else if (c == 'y' && !(reflags & StickyFlag))
-                reflags = RegExpFlag(reflags | StickyFlag);
-            else if (c == 'u' && !(reflags & UnicodeFlag))
-                reflags = RegExpFlag(reflags | UnicodeFlag);
-            else
-                return raiseInvalidEnum("RegExpLiteral", *flags);
-        }
-
-
-        Rooted<RegExpObject*> reobj(cx_);
-        TRY_VAR(reobj, RegExpObject::create(cx_,
-            pattern,
-            reflags,
-            alloc_,
-            TenuredObject));
-
-        TRY_VAR(result, factory_.newRegExp(reobj, tokenizer_->pos(start), *this));
-
-        break;
-      }
-      case BinKind::StringLiteral:
-        MOZ_TRY_VAR(result, parseStringLiteralAux(kind, fields));
-        break;
-
-      case BinKind::ThisExpression: {
-        MOZ_TRY(checkEmptyTuple(kind, fields));
-
-        if (parseContext_->isFunctionBox())
-            parseContext_->functionBox()->usesThis = true;
-
-        TokenPos pos = tokenizer_->pos(start);
-        ParseNode* thisName(nullptr);
-        if (parseContext_->sc()->thisBinding() == ThisBinding::Function)
-            TRY_VAR(thisName, factory_.newName(cx_->names().dotThis, pos, cx_));
-
-        TRY_VAR(result, factory_.newThisLiteral(pos, thisName));
-        break;
-      }
-      case BinKind::ArrayExpression:
-        MOZ_TRY_VAR(result, parseArrayExpressionAux(kind, fields));
-        break;
-
-      case BinKind::ObjectExpression:
-        MOZ_TRY_VAR(result, parseObjectExpressionAux(kind, fields));
-        break;
-
-      case BinKind::FunctionExpression:
-        MOZ_TRY_VAR(result, parseFunctionAux(kind, fields));
-        result->setOp(JSOP_LAMBDA);
-        break;
-
-      case BinKind::UnaryExpression:
-      case BinKind::UpdateExpression: {
-        ParseNode* expr(nullptr);
-        Maybe<Chars> operation;
-        Maybe<bool> prefix; // FIXME: Ignored for unary_expression?
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Operator:
-                MOZ_TRY(readString(operation));
-                break;
-              case BinField::Prefix:
-                MOZ_TRY_EMPLACE(prefix, readBool());
-                break;
-              case BinField::Argument:
-                  // arguments are always parsed *after* operator.
-                  if (operation.isNothing())
-                      return raiseMissingField("UpdateExpression", BinField::Operator);
-                MOZ_TRY_VAR(expr, parseExpression());
-                break;
-              default:
-                return raiseInvalidField("UpdateExpression", field);
-            }
-        }
-
-        if (!expr)
-            return raiseMissingField("UpdateExpression", BinField::Argument);
-        if (operation.isNothing())
-            return raiseMissingField("UpdateExpression", BinField::Operator);
-
-        // In case of absent optional fields, inject default values.
-        if (prefix.isNothing())
-            prefix.emplace(false);
-
-        ParseNodeKind pnk = PNK_LIMIT;
-        if (kind == BinKind::UnaryExpression) {
-            if (*operation == "-") {
-                pnk = PNK_NEG;
-            } else if (*operation == "+") {
-                pnk = PNK_POS;
-            } else if (*operation == "!") {
-                pnk = PNK_NOT;
-            } else if (*operation == "~") {
-                pnk = PNK_BITNOT;
-            } else if (*operation == "typeof") {
-                if (expr->isKind(PNK_NAME))
-                    pnk = PNK_TYPEOFNAME;
-                else
-                    pnk = PNK_TYPEOFEXPR;
-            } else if (*operation == "void") {
-                pnk = PNK_VOID;
-            } else if (*operation == "delete") {
-                switch (expr->getKind()) {
-                  case PNK_NAME:
-                    expr->setOp(JSOP_DELNAME);
-                    pnk = PNK_DELETENAME;
-                    break;
-                  case PNK_DOT:
-                    pnk = PNK_DELETEPROP;
-                    break;
-                  case PNK_ELEM:
-                    pnk = PNK_DELETEELEM;
-                    break;
-                  default:
-                    pnk = PNK_DELETEEXPR;
-                }
-            } else {
-                return raiseInvalidEnum("UnaryOperator", *operation);
-            }
-        } else if (kind == BinKind::UpdateExpression) {
-            if (!expr->isKind(PNK_NAME) && !factory_.isPropertyAccess(expr))
-                return raiseError("Invalid increment/decrement operand"); // FIXME: Shouldn't this be part of the syntax?
-
-            if (*operation == "++") {
-                if (*prefix)
-                    pnk = PNK_PREINCREMENT;
-                else
-                    pnk = PNK_POSTINCREMENT;
-            } else if (*operation == "--") {
-                if (*prefix)
-                    pnk = PNK_PREDECREMENT;
-                else
-                    pnk = PNK_POSTDECREMENT;
-            } else {
-                return raiseInvalidEnum("UpdateOperator", *operation);
-            }
-        }
-
-        TRY_VAR(result, factory_.newUnary(pnk, start, expr));
-
-        break;
-      }
-      case BinKind::BinaryExpression:
-      case BinKind::LogicalExpression: {
-        ParseNode* left(nullptr);
-        ParseNode* right(nullptr);
-        Maybe<Chars> operation;
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Left:
-                MOZ_TRY_VAR(left, parseExpression());
-                break;
-              case BinField::Right:
-                MOZ_TRY_VAR(right, parseExpression());
-                break;
-              case BinField::Operator:
-                MOZ_TRY(readString(operation));
-                break;
-              default:
-                return raiseInvalidField("LogicalExpression | BinaryExpression", field);
-            }
-        }
-
-        if (!left)
-            return raiseMissingField("LogicalExpression | BinaryExpression", BinField::Left);
-        if (!right)
-            return raiseMissingField("LogicalExpression | BinaryExpression", BinField::Right);
-        if (operation.isNothing())
-            return raiseMissingField("LogicalExpression | BinaryExpression", BinField::Operator);
-
-        // FIXME: Instead of Chars, we should use atoms and comparison
-        // between atom ptr.
-        ParseNodeKind pnk = PNK_LIMIT;
-        if (*operation == "==")
-            pnk = PNK_EQ;
-        else if (*operation == "!=")
-            pnk = PNK_NE;
-        else if (*operation == "===")
-            pnk = PNK_STRICTEQ;
-        else if (*operation == "!==")
-            pnk = PNK_STRICTNE;
-        else if (*operation == "<")
-            pnk = PNK_LT;
-        else if (*operation == "<=")
-            pnk = PNK_LE;
-        else if (*operation == ">")
-            pnk = PNK_GT;
-        else if (*operation == ">=")
-            pnk = PNK_GE;
-        else if (*operation == "<<")
-            pnk = PNK_LSH;
-        else if (*operation == ">>")
-            pnk = PNK_RSH;
-        else if (*operation == ">>>")
-            pnk = PNK_URSH;
-        else if (*operation == "+")
-            pnk = PNK_ADD;
-        else if (*operation == "-")
-            pnk = PNK_SUB;
-        else if (*operation == "*")
-            pnk = PNK_STAR;
-        else if (*operation == "/")
-            pnk = PNK_DIV;
-        else if (*operation == "%")
-            pnk = PNK_MOD;
-        else if (*operation == "|")
-            pnk = PNK_BITOR;
-        else if (*operation == "^")
-            pnk = PNK_BITXOR;
-        else if (*operation == "&")
-            pnk = PNK_BITAND;
-        else if (*operation == "in")
-            pnk = PNK_IN;
-        else if (*operation == "instanceof")
-            pnk = PNK_INSTANCEOF;
-        else if (*operation == "||")
-            pnk = PNK_OR;
-        else if (*operation == "&&")
-            pnk = PNK_AND;
-        else if (*operation == "**")
-            pnk = PNK_POW;
-        else
-            return raiseInvalidEnum("BinaryOperator | LogicalOperator", *operation);
-
-        if (left->isKind(pnk) && pnk != PNK_POW /* PNK_POW is not left-associative */) {
-            // Regroup left-associative operations into lists.
-            left->appendWithoutOrderAssumption(right);
-            result = left;
-        } else {
-            TRY_DECL(list, factory_.newList(pnk, tokenizer_->pos(start)));
-
-            list->appendWithoutOrderAssumption(left);
-            list->appendWithoutOrderAssumption(right);
-            result = list;
-        }
-
-         break;
-      }
-      case BinKind::AssignmentExpression: {
-        ParseNode* left(nullptr);
-        ParseNode* right(nullptr);
-        Maybe<Chars> operation;
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Left:
-                MOZ_TRY_VAR(left, parseExpression());
-                break;
-              case BinField::Right:
-                MOZ_TRY_VAR(right, parseExpression());
-                break;
-              case BinField::Operator:
-                MOZ_TRY(readString(operation));
-                break;
-              default:
-                return raiseInvalidField("AssignmentExpression", field);
-            }
-        }
-
-        if (!left)
-            return raiseMissingField("AssignmentExpression", BinField::Left);
-        if (!right)
-            return raiseMissingField("AssignmentExpression", BinField::Right);
-        if (operation.isNothing())
-            return raiseMissingField("AssignmentExpression", BinField::Operator);
-
-        // FIXME: Instead of Chars, we should use atoms and comparison
-        // between atom ptr.
-        // FIXME: We should probably turn associative operations into lists.
-        ParseNodeKind pnk = PNK_LIMIT;
-        if (*operation == "=")
-            pnk = PNK_ASSIGN;
-        else if (*operation == "+=")
-            pnk = PNK_ADDASSIGN;
-        else if (*operation == "-=")
-            pnk = PNK_SUBASSIGN;
-        else if (*operation == "*=")
-            pnk = PNK_MULASSIGN;
-        else if (*operation == "/=")
-            pnk = PNK_DIVASSIGN;
-        else if (*operation == "%=")
-            pnk = PNK_MODASSIGN;
-        else if (*operation == "<<=")
-            pnk = PNK_LSHASSIGN;
-        else if (*operation == ">>=")
-            pnk = PNK_RSHASSIGN;
-        else if (*operation == ">>>=")
-            pnk = PNK_URSHASSIGN;
-        else if (*operation == "|=")
-            pnk = PNK_BITORASSIGN;
-        else if (*operation == "^=")
-            pnk = PNK_BITXORASSIGN;
-        else if (*operation == "&=")
-            pnk = PNK_BITANDASSIGN;
-        else
-            return raiseInvalidEnum("AssignmentOperator", *operation);
-
-        TRY_VAR(result, factory_.newAssignment(pnk, left, right));
-
-        break;
-      }
-      case BinKind::BracketExpression:
-      case BinKind::DotExpression:
-        MOZ_TRY_VAR(result, parseMemberExpressionAux(kind, fields));
-
-        break;
-      case BinKind::ConditionalExpression: {
-        ParseNode* test(nullptr);
-        ParseNode* alternate(nullptr);
-        ParseNode* consequent(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Test:
-                MOZ_TRY_VAR(test, parseExpression());
-                break;
-              case BinField::Consequent:
-                MOZ_TRY_VAR(consequent, parseExpression());
-                break;
-              case BinField::Alternate:
-                MOZ_TRY_VAR(alternate, parseExpression());
-                break;
-              default:
-                return raiseInvalidField("ConditionalExpression", field);
-            }
-        }
-
-        if (!test)
-            return raiseMissingField("ConditionalExpression", BinField::Test);
-        if (!consequent)
-            return raiseMissingField("ConditionalExpression", BinField::Consequent);
-        if (!alternate)
-            return raiseMissingField("ConditionalExpression", BinField::Alternate);
-
-        TRY_VAR(result, factory_.newConditional(test, consequent, alternate));
-
-        break;
-      }
-      case BinKind::CallExpression:
-      case BinKind::NewExpression: {
-        ParseNode* callee(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Callee:
-                MOZ_TRY_VAR(callee, parseExpression());
-                break;
-              case BinField::Arguments:
-                MOZ_TRY_VAR(result, parseExpressionList(/* acceptElisions = */ false));
-                break;
-              default:
-                return raiseInvalidField("NewExpression", field);
-            }
-        }
-
-        // In case of absent required fields, fail.
-        if (!callee)
-            return raiseMissingField("NewExpression", BinField::Callee);
-
-        // In case of absent optional fields, inject default values.
-        if (!result)
-            TRY_VAR(result, factory_.newArrayLiteral(start));
-
-        ParseNodeKind pnk =
-            kind == BinKind::CallExpression
-            ? PNK_CALL
-            : PNK_NEW;
-        result->setKind(pnk);
-        result->prepend(callee);
-
-        break;
-      }
-      case BinKind::SequenceExpression: {
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Expressions:
-                MOZ_TRY_VAR(result, parseExpressionList(/* acceptElisions = */ false));
-                break;
-              default:
-                return raiseInvalidField("SequenceExpression", field);
-            }
-        }
-
-        if (!result)
-            return raiseMissingField("SequenceExpression", BinField::Expression);
-
-        result->setKind(PNK_COMMA);
-        break;
-      }
-      default:
-        return raiseInvalidKind("Expression", kind);
-    }
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseNumericLiteralAux(const BinKind kind, const BinFields& fields)
-{
-    auto start = tokenizer_->offset();
-
-    Maybe<double> value;
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Value:
-            MOZ_TRY_EMPLACE(value, readNumber());
-            break;
-          default:
-            return raiseInvalidField("NumericLiteral", field);
-        }
-    }
-
-    // In case of absent optional fields, inject default values.
-    if (!value)
-        value.emplace(0);
-
-    TRY_DECL(result, factory_.newNumber(*value, DecimalPoint::HasDecimal, tokenizer_->pos(start)));
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseStringLiteralAux(const BinKind kind, const BinFields& fields)
-{
-    auto start = tokenizer_->offset();
-
-    RootedAtom value(cx_);
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Value:
-            MOZ_TRY(readString(&value));
-            break;
-          default:
-            return raiseInvalidField("StringLiteral", field);
-        }
-    }
-
-    if (!value)
-        return raiseMissingField("StringLiteral", BinField::Value);
-
-    TRY_DECL(result, factory_.newStringLiteral(value, tokenizer_->pos(start)));
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseArrayExpressionAux(const BinKind kind, const BinFields& fields)
-{
-    MOZ_ASSERT(kind == BinKind::ArrayExpression);
-
-    ParseNode* result(nullptr);
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Elements: {
-            MOZ_TRY_VAR(result, parseExpressionList(/* acceptElisions = */ true));
-            break;
-          }
-          default:
-            return raiseInvalidField("ArrayExpression", field);
-        }
-    }
-
-    // Inject default values for absent fields.
-    if (!result)
-        TRY_VAR(result, factory_.newArrayLiteral(tokenizer_->offset()));
-
-    MOZ_ASSERT(result->isKind(PNK_ARRAY));
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseObjectExpressionAux(const BinKind kind, const BinFields& fields)
-{
-    MOZ_ASSERT(kind == BinKind::ObjectExpression);
-
-    ParseNode* result(nullptr);
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Properties: {
-            MOZ_TRY_VAR(result, parseObjectMemberList());
-            break;
-          }
-          default:
-            return raiseInvalidField("Property | Method", field);
-        }
-    }
-
-    if (!result)
-        TRY_VAR(result, factory_.newObjectLiteral(tokenizer_->offset()));
-
-    MOZ_ASSERT(result->isArity(PN_LIST));
-    MOZ_ASSERT(result->isKind(PNK_OBJECT));
-
-#if defined(DEBUG)
-    // Sanity check.
-    for (ParseNode* iter = result->pn_head; iter != nullptr; iter = iter->pn_next) {
-        MOZ_ASSERT(iter->isKind(PNK_COLON));
-        MOZ_ASSERT(iter->pn_left != nullptr);
-        MOZ_ASSERT(iter->pn_right != nullptr);
-    }
-#endif // defined(DEBUG)
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseMemberExpressionAux(const BinKind kind, const BinFields& fields)
-{
-    MOZ_ASSERT(kind == BinKind::DotExpression || kind == BinKind::BracketExpression);
-
-    ParseNode* object(nullptr);
-    ParseNode* property(nullptr);
-
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Object:
-            MOZ_TRY_VAR(object, parseExpression());
-            break;
-          case BinField::Property:
-            if (kind == BinKind::BracketExpression)
-                MOZ_TRY_VAR(property, parseExpression());
-            else
-                MOZ_TRY_VAR(property, parseIdentifier());
-            break;
-          default:
-            return raiseInvalidField("MemberExpression", field);
-        }
-    }
-
-    // In case of absent required fields, fail.
-    if (!object)
-        return raiseMissingField("MemberExpression", BinField::Object);
-    if (!property)
-        return raiseMissingField("MemberExpression", BinField::Property);
-
-    ParseNode* result(nullptr);
-    if (kind == BinKind::DotExpression) {
-        MOZ_ASSERT(property->isKind(PNK_NAME));
-        PropertyName* name = property->pn_atom->asPropertyName();
-        TRY_VAR(result, factory_.newPropertyAccess(object, name, tokenizer_->offset()));
-    } else {
-        TRY_VAR(result, factory_.newPropertyByValue(object, property, tokenizer_->offset()));
-    }
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseDirectiveList()
-{
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-    TRY(tokenizer_->enterList(length, guard));
-
-    TokenPos pos = tokenizer_->pos();
-    TRY_DECL(result, factory_.newStatementList(pos));
-
-    RootedAtom value(cx_);
-    for (uint32_t i = 0; i < length; ++i) {
-        value = nullptr;
-        MOZ_TRY(readString(&value));
-
-        TRY_DECL(directive, factory_.newStringLiteral(value, pos));
-        factory_.addStatementToList(result, directive);
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseSwitchCase()
-{
-    const size_t start = tokenizer_->offset();
-
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    if (kind != BinKind::SwitchCase)
-        return raiseInvalidKind("SwitchCase", kind);
-
-    ParseNode* test(nullptr); // Optional.
-    ParseNode* statements(nullptr); // Required.
-
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Test:
-            MOZ_TRY_VAR(test, parseExpression());
-            break;
-          case BinField::Consequent:
-            MOZ_TRY_VAR(statements, parseStatementList());
-            break;
-          default:
-            return raiseInvalidField("SwitchCase", field);
-        }
-    }
-
-    TRY(guard.done());
-    if (!statements)
-        return raiseMissingField("SwitchCase", BinField::Consequent);
-
-    MOZ_ASSERT(statements->isKind(PNK_STATEMENTLIST));
-
-    TRY_DECL(result, factory_.newCaseOrDefault(start, test, statements));
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseCatchClause()
-{
-    ParseContext::Statement stmt(parseContext_, StatementKind::Catch);
-    ParseContext::Scope scope(cx_, parseContext_, usedNames_);
-    TRY(scope.init(parseContext_));
-
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result(nullptr);
-
-    switch (kind) {
-      default:
-        return raiseInvalidKind("CatchClause", kind);
-      case BinKind::CatchClause: {
-        ParseNode* param(nullptr);
-        ParseNode* body(nullptr);
-
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Param:
-                MOZ_TRY_VAR(param, parsePattern());
-                break;
-              case BinField::Body:
-                MOZ_TRY_VAR(body, parseBlockStatement());
-                break;
-              case BinField::BINJS_Scope:
-                MOZ_TRY(parseAndUpdateCurrentScope());
-                break;
-              default:
-                return raiseInvalidField("CatchClause", field);
-            }
-        }
-
-        if (!param)
-            return raiseMissingField("CatchClause", BinField::Param);
-        if (!body)
-            return raiseMissingField("CatchClause", BinField::Body);
-
-        TRY_DECL(bindings, NewLexicalScopeData(cx_, scope, alloc_, parseContext_));
-        TRY_VAR(result, factory_.newLexicalScope(*bindings, body));
-        TRY(factory_.setupCatchScope(result, param, body));
-      }
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseArgumentList()
-{
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-
-    TRY(tokenizer_->enterList(length, guard));
-    ParseNode* result = new_<ListNode>(PNK_PARAMSBODY, tokenizer_->pos());
-
-    for (uint32_t i = 0; i < length; ++i) {
-        ParseNode* pattern;
-        MOZ_TRY_VAR(pattern, parsePattern());
-
-        result->appendWithoutOrderAssumption(pattern);
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseIdentifier()
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result;
-    MOZ_TRY_VAR(result, parseIdentifierAux(kind, fields));
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseIdentifierAux(const BinKind, const BinFields& fields, const bool expectObjectPropertyName /* = false */)
-{
-    const size_t start = tokenizer_->offset();
-
-    RootedAtom id(cx_);
-    for (auto field : fields) {
-        switch (field) {
-          case BinField::Name:
-            MOZ_TRY(readString(&id));
-            break;
-          default:
-            return raiseInvalidField("Identifier", field);
-        }
-    }
-
-    if (!id)
-        return raiseMissingField("Identifier", BinField::Name);
-
-    if (!IsIdentifier(id))
-        return raiseError("Invalid identifier");
-    if (!expectObjectPropertyName && IsKeyword(id))
-        return raiseError("Invalid identifier (keyword)");
-
-    // Once `IsIdentifier` has returned true, we may call `asPropertyName()` without fear.
-    TokenPos pos = tokenizer_->pos(start);
-
-    ParseNode* result;
-    if (expectObjectPropertyName)
-        TRY_VAR(result, factory_.newObjectLiteralPropertyName(id->asPropertyName(), pos));
-    else
-        TRY_VAR(result, factory_.newName(id->asPropertyName(), pos, cx_));
-
-    return result;
-}
-
-
-JS::Result<ParseNode*>
-BinASTParser::parsePattern()
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result;
-    MOZ_TRY_VAR(result, parsePatternAux(kind, fields));
-
-    TRY(guard.done());
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parsePatternAux(const BinKind kind, const BinFields& fields)
-{
-    ParseNode* result;
-    switch (kind) {
-      case BinKind::Identifier:
-        MOZ_TRY_VAR(result, parseIdentifierAux(kind ,fields));
-        break;
-      default:
-        return raiseInvalidKind("Pattern", kind);
-    }
-
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseObjectMember()
-{
-    BinKind kind;
-    BinFields fields(cx_);
-    AutoTaggedTuple guard(*tokenizer_);
-
-    TRY(tokenizer_->enterTaggedTuple(kind, fields, guard));
-    ParseNode* result(nullptr);
-
-    switch (kind) {
-      case BinKind::ObjectProperty: {
-        ParseNode* key(nullptr);
-        ParseNode* value(nullptr);
-        for (auto field : fields) {
-            switch (field) {
-              case BinField::Key:
-                MOZ_TRY_VAR(key, parseObjectPropertyName());
-                break;
-              case BinField::Value:
-                MOZ_TRY_VAR(value, parseExpression());
-                break;
-              default:
-                return raiseInvalidField("ObjectMember", field);
-            }
-        }
-
-        if (!key)
-            return raiseMissingField("ObjectMember", BinField::Key);
-        if (!value)
-            return raiseMissingField("ObjectMember", BinField::Value);
-
-        if (!factory_.isUsableAsObjectPropertyName(key))
-            return raiseError("ObjectMember key kind");
-
-        TRY_VAR(result, factory_.newObjectMethodOrPropertyDefinition(key, value, AccessorType::None));
-
-        break;
-      }
-      case BinKind::ObjectMethod:
-      case BinKind::ObjectGetter:
-      case BinKind::ObjectSetter:
-        MOZ_TRY_VAR(result, parseFunctionAux(kind, fields));
-
-        if (!result)
-            return raiseEmpty("ObjectMethod");
-
-        MOZ_ASSERT(result->isKind(PNK_COLON));
-        break;
-      default:
-        return raiseInvalidKind("ObjectMember", kind);
-    }
-
-    TRY(guard.done());
-    MOZ_ASSERT(result);
-    return result;
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parseObjectMemberList()
-{
-    uint32_t length;
-    AutoList guard(*tokenizer_);
-
-    auto start = tokenizer_->offset();
-    TRY(tokenizer_->enterList(length, guard));
-
-    TRY_DECL(result, factory_.newObjectLiteral(start));
-
-    for (uint32_t i = 0; i < length; ++i) {
-        ParseNode* keyValue;
-        MOZ_TRY_VAR(keyValue, parseObjectMember());
-        MOZ_ASSERT(keyValue);
-
-        result->appendWithoutOrderAssumption(keyValue);
-    }
-
-    TRY(guard.done());
-    return result;
-}
-
-
-JS::Result<Ok>
-BinASTParser::checkEmptyTuple(const BinKind kind, const BinFields& fields)
-{
-    if (fields.length() != 0)
-        return raiseInvalidField(describeBinKind(kind), fields[0]);
-
-    return Ok();
-}
-
-
-JS::Result<Ok>
-BinASTParser::readString(MutableHandleAtom out)
-{
-    MOZ_ASSERT(!out);
-
-    Maybe<Chars> string;
-    MOZ_TRY(readString(string));
-    MOZ_ASSERT(string);
-
-    RootedAtom atom(cx_);
-    TRY_VAR(atom, Atomize(cx_, (const char*)string->begin(), string->length()));
-
-    out.set(Move(atom));
-    return Ok();
-}
-
-JS::Result<ParseNode*>
-BinASTParser::parsePropertyName()
-{
-    RootedAtom atom(cx_);
-    MOZ_TRY(readString(&atom));
-
-    TokenPos pos = tokenizer_->pos();
-
-    ParseNode* result;
-
-    // If the atom matches an index (e.g. "3"), we need to normalize the
-    // propertyName to ensure that it has the same representation as
-    // the numeric index (e.g. 3).
-    uint32_t index;
-    if (atom->isIndex(&index))
-        TRY_VAR(result, factory_.newNumber(index, NoDecimal, pos));
-    else
-        TRY_VAR(result, factory_.newStringLiteral(atom, pos));
-
-    return result;
-}
-
-JS::Result<Ok>
-BinASTParser::readString(Maybe<Chars>& out)
-{
-    MOZ_ASSERT(out.isNothing());
-    Chars result(cx_);
-    TRY(tokenizer_->readChars(result));
-
-    out.emplace(Move(result));
-    return Ok();
-}
-
-JS::Result<double>
-BinASTParser::readNumber()
-{
-    double result;
-    TRY(tokenizer_->readDouble(result));
-
-    return result;
-}
-
-JS::Result<bool>
-BinASTParser::readBool()
-{
-    bool result;
-    TRY(tokenizer_->readBool(result));
-
-    return result;
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseInvalidKind(const char* superKind, const BinKind kind)
-{
-    Sprinter out(cx_);
-    TRY(out.init());
-    TRY(out.printf("In %s, invalid kind %s", superKind, describeBinKind(kind)));
-    return raiseError(out.string());
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseInvalidField(const char* kind, const BinField field)
-{
-    Sprinter out(cx_);
-    TRY(out.init());
-    TRY(out.printf("In %s, invalid field '%s'", kind, describeBinField(field)));
-    return raiseError(out.string());
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseInvalidEnum(const char* kind, const Chars& value)
-{
-    // We don't trust the actual chars of `value` to be properly formatted anything, so let's not use
-    // them anywhere.
-    return raiseError("Invalid enum");
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseMissingField(const char* kind, const BinField field)
-{
-    Sprinter out(cx_);
-    TRY(out.init());
-    TRY(out.printf("In %s, missing field '%s'", kind, describeBinField(field)));
-
-    return raiseError(out.string());
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseEmpty(const char* description)
-{
-    Sprinter out(cx_);
-    TRY(out.init());
-    TRY(out.printf("Empty %s", description));
-
-    return raiseError(out.string());
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseOOM()
-{
-    ReportOutOfMemory(cx_);
-    return cx_->alreadyReportedError();
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseError(BinKind kind, const char* description)
-{
-    Sprinter out(cx_);
-    TRY(out.init());
-    TRY(out.printf("In %s, ", description));
-    MOZ_ALWAYS_FALSE(tokenizer_->raiseError(out.string()));
-
-    return cx_->alreadyReportedError();
-}
-
-mozilla::GenericErrorResult<JS::Error&>
-BinASTParser::raiseError(const char* description)
-{
-    MOZ_ALWAYS_FALSE(tokenizer_->raiseError(description));
-    return cx_->alreadyReportedError();
-}
-
-void
-BinASTParser::poison()
-{
-    tokenizer_.reset();
-}
-
-void
-BinASTParser::reportErrorNoOffsetVA(unsigned errorNumber, va_list args)
-{
-    ErrorMetadata metadata;
-    metadata.filename = getFilename();
-    metadata.lineNumber = 0;
-    metadata.columnNumber = offset();
-    ReportCompileError(cx_, Move(metadata), nullptr, JSREPORT_ERROR, errorNumber, args);
-}
-
-bool
-BinASTParser::hasUsedName(HandlePropertyName name)
-{
-    if (UsedNamePtr p = usedNames_.lookup(name))
-        return p->value().isUsedInScript(parseContext_->scriptId());
-
-    return false;
-}
-
-void
-TraceBinParser(JSTracer* trc, AutoGCRooter* parser)
-{
-    static_cast<BinASTParser*>(parser)->trace(trc);
-}
-
-} // namespace frontend
-} // namespace js
-
-
-// #undef everything, to avoid collisions with unified builds.
-
-#undef TRY
-#undef TRY_VAR
-#undef TRY_DECL
-#undef TRY_EMPL
-#undef MOZ_TRY_EMPLACE
deleted file mode 100644
--- a/js/src/frontend/BinSource.h
+++ /dev/null
@@ -1,278 +0,0 @@
-#ifndef frontend_BinSource_h
-#define frontend_BinSource_h
-
-/**
- * A Binary AST parser.
- *
- * At the time of this writing, this parser implements the grammar of ES5
- * and trusts its input (in particular, variable declarations).
- */
-
-#include "mozilla/Maybe.h"
-
-#include "frontend/BinTokenReaderTester.h"
-#include "frontend/FullParseHandler.h"
-#include "frontend/ParseContext.h"
-#include "frontend/ParseNode.h"
-#include "frontend/SharedContext.h"
-
-#include "js/GCHashTable.h"
-#include "js/GCVector.h"
-#include "js/Result.h"
-
-namespace js {
-namespace frontend {
-
-class BinASTParser;
-
-/**
- * The parser for a Binary AST.
- *
- * By design, this parser never needs to backtrack or look ahead. Errors are not
- * recoverable.
- */
-class BinASTParser : private JS::AutoGCRooter, public ErrorReporter
-{
-    using Names = JS::GCVector<JSString*, 8>;
-    using Tokenizer = BinTokenReaderTester;
-    using Chars = Tokenizer::Chars;
-
-  public:
-    BinASTParser(JSContext* cx, LifoAlloc& alloc, UsedNameTracker& usedNames, const JS::ReadOnlyCompileOptions& options)
-        : AutoGCRooter(cx, BINPARSER)
-        , traceListHead_(nullptr)
-        , options_(options)
-        , cx_(cx)
-        , alloc_(alloc)
-        , nodeAlloc_(cx, alloc)
-        , keepAtoms_(cx)
-        , parseContext_(nullptr)
-        , usedNames_(usedNames)
-        , factory_(cx, alloc, nullptr, SourceKind::Binary)
-    {
-         cx_->frontendCollectionPool().addActiveCompilation();
-         tempPoolMark_ = alloc.mark();
-    }
-    ~BinASTParser()
-    {
-        alloc_.release(tempPoolMark_);
-
-        /*
-         * The parser can allocate enormous amounts of memory for large functions.
-         * Eagerly free the memory now (which otherwise won't be freed until the
-         * next GC) to avoid unnecessary OOMs.
-         */
-        alloc_.freeAllIfHugeAndUnused();
-
-        cx_->frontendCollectionPool().removeActiveCompilation();
-    }
-
-    /**
-     * Parse a buffer, returning a node (which may be nullptr) in case of success
-     * or Nothing() in case of error.
-     *
-     * The instance of `ParseNode` MAY NOT survive the `BinASTParser`. Indeed,
-     * destruction of the `BinASTParser` will also destroy the `ParseNode`.
-     *
-     * In case of error, the parser reports the JS error.
-     */
-    JS::Result<ParseNode*> parse(const uint8_t* start, const size_t length);
-    JS::Result<ParseNode*> parse(const Vector<uint8_t>& data);
-
-  private:
-    MOZ_MUST_USE JS::Result<ParseNode*> parseAux(const uint8_t* start, const size_t length);
-
-    // --- Raise errors.
-    //
-    // These methods return a (failed) JS::Result for convenience.
-
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidKind(const char* superKind, const BinKind kind);
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidField(const char* kind, const BinField field);
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseInvalidEnum(const char* kind, const Chars& value);
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseMissingField(const char* kind, const BinField field);
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseEmpty(const char* description);
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseOOM();
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(const char* description);
-    MOZ_MUST_USE mozilla::GenericErrorResult<JS::Error&> raiseError(BinKind kind, const char* description);
-
-    // Ensure that this parser will never be used again.
-    void poison();
-
-    // --- Parse full nodes (methods are sorted by alphabetical order)
-    //
-    // These method may NEVER return `nullptr`. // FIXME: We can probably optimize Result<> based on this.
-
-    MOZ_MUST_USE JS::Result<ParseNode*> parseBlockStatement();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseCatchClause();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseExpression();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseForInit();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseForInInit();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseIdentifier();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseObjectPropertyName();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseObjectMember();
-    MOZ_MUST_USE JS::Result<ParseNode*> parsePattern(); // Parse a *binding* pattern.
-    MOZ_MUST_USE JS::Result<ParseNode*> parsePropertyName();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseProgram();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseStatement();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseSwitchCase();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseVariableDeclarator();
-
-
-    // --- Parse lists of nodes (methods are sorted by alphabetical order)
-
-    MOZ_MUST_USE JS::Result<ParseNode*> parseArgumentList();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseDirectiveList();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseExpressionList(bool acceptElisions);
-
-    // Returns a list of PNK_COLON.
-    MOZ_MUST_USE JS::Result<ParseNode*> parseObjectMemberList();
-
-    MOZ_MUST_USE JS::Result<ParseNode*> parseStatementList();
-    MOZ_MUST_USE JS::Result<ParseNode*> parseSwitchCaseList();
-
-    // --- Parse the contents of a node whose kind has already been determined.
-
-    MOZ_MUST_USE JS::Result<ParseNode*> parseArrayExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseBreakOrContinueStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseBlockStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseExpressionStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseFunctionAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseIdentifierAux(const BinKind, const Tokenizer::BinFields& fields, const bool expectObjectPropertyName = false);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseMemberExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseNumericLiteralAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseObjectExpressionAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parsePatternAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseStringLiteralAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseStatementAux(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<ParseNode*> parseVariableDeclarationAux(const BinKind kind, const Tokenizer::BinFields& fields);
-
-    // --- Auxiliary parsing functions that may have a side-effect on the parser but do not return a node.
-
-    MOZ_MUST_USE JS::Result<Ok> checkEmptyTuple(const BinKind kind, const Tokenizer::BinFields& fields);
-    MOZ_MUST_USE JS::Result<Ok> parseElisionAux(const BinKind kind, const Tokenizer::BinFields& fields);
-
-    // Parse full scope information to the current innermost scope.
-    MOZ_MUST_USE JS::Result<Ok> parseAndUpdateCurrentScope();
-    // Parse full scope information to a specific var scope / let scope combination.
-    MOZ_MUST_USE JS::Result<Ok> parseAndUpdateScope(ParseContext::Scope& varScope, ParseContext::Scope& letScope);
-    // Parse a list of names and add it to a given scope.
-    MOZ_MUST_USE JS::Result<Ok> parseAndUpdateScopeNames(ParseContext::Scope& scope, DeclarationKind kind);
-    MOZ_MUST_USE JS::Result<Ok> parseStringList(MutableHandle<Maybe<Names>> out);
-
-    // --- Utilities.
-
-    MOZ_MUST_USE JS::Result<ParseNode*> appendDirectivesToBody(ParseNode* body, ParseNode* directives);
-
-    // Read a string as a `Chars`.
-    MOZ_MUST_USE JS::Result<Ok> readString(Maybe<Chars>& out);
-    MOZ_MUST_USE JS::Result<Ok> readString(MutableHandleAtom out);
-    MOZ_MUST_USE JS::Result<bool> readBool();
-    MOZ_MUST_USE JS::Result<double> readNumber();
-
-    const ReadOnlyCompileOptions& options() const override {
-        return this->options_;
-    }
-
-    // Names
-
-
-    bool hasUsedName(HandlePropertyName name);
-
-    // --- GC.
-
-    void trace(JSTracer* trc) {
-        ObjectBox::TraceList(trc, traceListHead_);
-    }
-
-
-  public:
-    ObjectBox* newObjectBox(JSObject* obj) {
-        MOZ_ASSERT(obj);
-
-        /*
-         * We use JSContext.tempLifoAlloc to allocate parsed objects and place them
-         * on a list in this Parser to ensure GC safety. Thus the tempLifoAlloc
-         * arenas containing the entries must be alive until we are done with
-         * scanning, parsing and code generation for the whole script or top-level
-         * function.
-         */
-
-         ObjectBox* objbox = alloc_.new_<ObjectBox>(obj, traceListHead_);
-         if (!objbox) {
-             ReportOutOfMemory(cx_);
-             return nullptr;
-        }
-
-        traceListHead_ = objbox;
-
-        return objbox;
-    }
-
-    ParseNode* allocParseNode(size_t size) {
-        MOZ_ASSERT(size == sizeof(ParseNode));
-        return static_cast<ParseNode*>(nodeAlloc_.allocNode());
-    }
-
-    JS_DECLARE_NEW_METHODS(new_, allocParseNode, inline)
-
-  private: // Implement ErrorReporter
-
-    virtual void lineAndColumnAt(size_t offset, uint32_t* line, uint32_t* column) const override {
-        *line = 0;
-        *column = offset;
-    }
-    virtual void currentLineAndColumn(uint32_t* line, uint32_t* column) const override {
-        *line = 0;
-        *column = offset();
-    }
-    size_t offset() const {
-        if (tokenizer_.isSome())
-            return tokenizer_->offset();
-
-        return 0;
-    }
-    virtual bool hasTokenizationStarted() const override {
-        return tokenizer_.isSome();
-    }
-    virtual void reportErrorNoOffsetVA(unsigned errorNumber, va_list args) override;
-    virtual const char* getFilename() const override {
-        return this->options_.filename();
-    }
-
-    ObjectBox* traceListHead_;
-    const ReadOnlyCompileOptions& options_;
-    JSContext* cx_;
-    LifoAlloc& alloc_;
-    LifoAlloc::Mark tempPoolMark_;
-    ParseNodeAllocator nodeAlloc_;
-
-    // Root atoms and objects allocated for the parse tree.
-    AutoKeepAtoms keepAtoms_;
-
-    // The current ParseContext, holding directives, etc.
-    ParseContext* parseContext_;
-    UsedNameTracker& usedNames_;
-    Maybe<Tokenizer> tokenizer_;
-    FullParseHandler factory_;
-
-    friend class BinParseContext;
-
-    // Needs access to AutoGCRooter.
-    friend void TraceBinParser(JSTracer* trc, AutoGCRooter* parser);
-};
-
-class BinParseContext : public ParseContext
-{
-  public:
-    BinParseContext(JSContext* cx, BinASTParser* parser, SharedContext* sc, Directives* newDirectives)
-        : ParseContext(cx, parser->parseContext_, sc, *parser,
-                       parser->usedNames_, newDirectives, /* isFull = */ true)
-    { }
-};
-
-
-} // namespace frontend
-} // namespace js
-
-#endif // frontend_BinSource_h
\ No newline at end of file
deleted file mode 100644
--- a/js/src/frontend/BinToken.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "frontend/BinToken.h"
-
-#include <sys/types.h>
-
-namespace js {
-namespace frontend {
-
-const char* BINKIND_DESCRIPTIONS[] = {
-#define WITH_KIND(_, SPEC_NAME) #SPEC_NAME,
-    FOR_EACH_BIN_KIND(WITH_KIND)
-#undef WITH_KIND
-};
-
-const char* BINFIELD_DESCRIPTIONS[] = {
-    #define WITH_FIELD(_, SPEC_NAME) #SPEC_NAME,
-        FOR_EACH_BIN_FIELD(WITH_FIELD)
-    #undef WITH_FIELD
-};
-
-const char* describeBinKind(const BinKind& kind) {
-    return BINKIND_DESCRIPTIONS[static_cast<size_t>(kind)];
-}
-
-const char* describeBinField(const BinField& field) {
-    return BINFIELD_DESCRIPTIONS[static_cast<size_t>(field)];
-}
-
-} // namespace frontend
-} // namespace js
\ No newline at end of file
deleted file mode 100644
--- a/js/src/frontend/BinToken.h
+++ /dev/null
@@ -1,201 +0,0 @@
-#ifndef frontend_BinToken_h
-#define frontend_BinToken_h
-
-/**
- * Definition of Binary AST tokens.
- *
- * In the Binary AST world, an AST is composed of nodes, where a node is
- * defined by:
- * - a Kind (see `BinKind`);
- * - a list of fields, where each field is:
- *    - a Name (see `BinField`);
- *    - a Value, which may be either a node or a primitive value.
- *
- * The mapping between Kind and list of fields is determined entirely by
- * the grammar of Binary AST. The mapping between (Kind, Name) and the structure
- * of Value is also determined entirely by the grammar of Binary AST.
- *
- * As per the specifications of Binary AST, kinds may be added as the language
- * grows, but never removed. The mapping between Kind and list of fields may
- * also change to add new fields or make some fields optional, but may never
- * remove a field. Finally, the mapping between (Kind, Name) and the structure
- * of Value may be modified to add new possible values, but never to remove a
- * value.
- *
- * A Binary AST parser must be able to fail gracefully when confronted with
- * unknown Kinds or Names.
- *
- * At the time of this writing, the Binary AST defined from the Babylon AST
- * (see https://github.com/babel/babylon/blob/master/ast/spec.md) restricted
- * to ES5, with a few amendments to store additional scoping data and to
- * represent the empty AST.
- *
- * Future versions of the Binary AST will progressively grow to encompass ES6
- * and beyond.
- */
-
-namespace js {
-namespace frontend {
-
- /**
- * The different kinds of Binary AST nodes, as per the specifications of
- * Binary AST.
- *
- * These kinds match roughly with the `ParseNodeKind` used internally.
- *
- * Usage:
- *
- * ```c++
- * #define WITH_KIND(CPP_NAME, SPEC_NAME) ...
- * FOR_EACH_BIN_KIND(WITH_KIND)
- * ```
- *
- *
- * (sorted by alphabetical order)
- */
-#define FOR_EACH_BIN_KIND(F) \
-    F(ArrayExpression, ArrayExpression) \
-    F(AssignmentExpression, AssignmentExpression) \
-    F(AssignmentOperator, AssignmentOperator) \
-    F(BinaryExpression, BinaryExpression) \
-    F(BinaryOperator, BinaryOperator) \
-    F(BINJS_Scope, BINJS:Scope) \
-    F(BlockStatement, BlockStatement) \
-    F(BooleanLiteral, BooleanLiteral) \
-    F(BracketExpression, BracketExpression) \
-    F(BreakStatement, BreakStatement) \
-    F(CallExpression, CallExpression) \
-    F(CatchClause, CatchClause) \
-    F(ComputedPropertyName, ComputedPropertyName) \
-    F(ConditionalExpression, ConditionalExpression) \
-    F(ContinueStatement, ContinueStatement) \
-    F(DebuggerStatement, DebuggerStatement) \
-    F(Declaration, Declaration) \
-    F(Directive, Directive) \
-    F(DirectiveLiteral, DirectiveLiteral) \
-    F(DotExpression, DotExpression) \
-    F(DoWhileStatement, DoWhileStatement) \
-    F(Elision, Elision) \
-    F(EmptyStatement, EmptyStatement) \
-    F(Expression, Expression) \
-    F(ExpressionStatement, ExpressionStatement) \
-    F(ForStatement, ForStatement) \
-    F(ForInStatement, ForInStatement) \
-    F(FunctionExpression, FunctionExpression) \
-    F(FunctionDeclaration, FunctionDeclaration) \
-    F(Identifier, Identifier) \
-    F(IfStatement, IfStatement) \
-    F(LabeledStatement, LabeledStatement) \
-    F(Literal, Literal) \
-    F(LogicalExpression, LogicalExpression) \
-    F(LogicalOperator, LogicalOperator) \
-    F(NewExpression, NewExpression) \
-    F(NullLiteral, NullLiteral) \
-    F(NumericLiteral, NumericLiteral) \
-    F(ObjectExpression, ObjectExpression) \
-    F(ObjectGetter, ObjectGetter) \
-    F(ObjectMethod, ObjectMethod) \
-    F(ObjectSetter, ObjectSetter) \
-    F(ObjectProperty, ObjectProperty) \
-    F(Pattern, Pattern) \
-    F(Program, Program) \
-    F(PropertyKind, PropertyKind) \
-    F(RegExpLiteral, RegExpLiteral) \
-    F(ReturnStatement, ReturnStatement) \
-    F(SequenceExpression, SequenceExpression) \
-    F(StringLiteral, StringLiteral) \
-    F(Statement, Statement) \
-    F(SwitchCase, SwitchCase) \
-    F(SwitchStatement, SwitchStatement) \
-    F(ThisExpression, ThisExpression) \
-    F(ThrowStatement, ThrowStatement) \
-    F(TryStatement, TryStatement) \
-    F(UnaryExpression, UnaryExpression) \
-    F(UnaryOperator, UnaryOperator) \
-    F(UpdateExpression, UpdateExpression) \
-    F(UpdateOperator, UpdateOperator) \
-    F(VariableDeclaration, VariableDeclaration) \
-    F(VariableDeclarator, VariableDeclarator) \
-    F(VariableKind, VariableKind) \
-    F(WhileStatement, WhileStatement) \
-    F(WithStatement, WithStatement)
-
-enum class BinKind {
-#define EMIT_ENUM(name, _) name,
-    FOR_EACH_BIN_KIND(EMIT_ENUM)
-#undef EMIT_ENUM
-    BINKIND_LIMIT /* domain size */
-};
-
-const char* describeBinKind(const BinKind& kind);
-
-/**
- * The different fields of Binary AST nodes, as per the specifications of
- * Binary AST.
- *
- * Usage:
- *
- * ```c++
- * #define WITH_FIELD(CPP_NAME, SPEC_NAME) ...
- * FOR_EACH_BIN_FIELD(WITH_FIELD)
- * ```
- *
- * (sorted by alphabetical order)
- */
- #define FOR_EACH_BIN_FIELD(F) \
-    F(Alternate, alternate) \
-    F(Argument, argument) \
-    F(Arguments, arguments) \
-    F(BINJS_CapturedNames, BINJS:CapturedNames) \
-    F(BINJS_ConstDeclaredNames, BINJS:ConstDeclaredNames) \
-    F(BINJS_HasDirectEval, BINJS:HasDirectEval) \
-    F(BINJS_LetDeclaredNames, BINJS:LetDeclaredNames) \
-    F(BINJS_VarDeclaredNames, BINJS:VarDeclaredNames) \
-    F(BINJS_Scope, BINJS:Scope) \
-    F(Block, block) \
-    F(Callee, callee) \
-    F(Cases, cases) \
-    F(Consequent, consequent) \
-    F(Body, body) \
-    F(Declarations, declarations) \
-    F(Directives, directives) \
-    F(Discriminant, discriminant) \
-    F(Elements, elements) \
-    F(Expression, expression) \
-    F(Expressions, expressions) \
-    F(Finalizer, finalizer) \
-    F(Flags, flags) \
-    F(Handler, handler) \
-    F(Id, id) \
-    F(Init, init) \
-    F(Key, key) \
-    F(Kind, kind) \
-    F(Label, label) \
-    F(Left, left) \
-    F(Name, name) \
-    F(Object, object) \
-    F(Operator, operator) \
-    F(Param, param) \
-    F(Params, params) \
-    F(Pattern, pattern) \
-    F(Prefix, prefix) \
-    F(Properties, properties) \
-    F(Property, property) \
-    F(Right, right) \
-    F(Test, test) \
-    F(Update, update) \
-    F(Value, value)
-
-enum class BinField {
-#define EMIT_ENUM(name, _) name,
-    FOR_EACH_BIN_FIELD(EMIT_ENUM)
-#undef EMIT_ENUM
-    BINFIELD_LIMIT /* domain size */
-};
-
-const char* describeBinField(const BinField& kind);
-
-} // namespace frontend
-} // namespace js
-
-#endif // frontend_BinToken_h
deleted file mode 100644
--- a/js/src/frontend/BinTokenReaderTester.cpp
+++ /dev/null
@@ -1,536 +0,0 @@
-#include "frontend/BinTokenReaderTester.h"
-
-#include "mozilla/EndianUtils.h"
-#include "gc/Zone.h"
-
-namespace js {
-namespace frontend {
-
-using BinFields = BinTokenReaderTester::BinFields;
-using AutoList = BinTokenReaderTester::AutoList;
-using AutoTaggedTuple = BinTokenReaderTester::AutoTaggedTuple;
-using AutoTuple = BinTokenReaderTester::AutoTuple;
-
-BinTokenReaderTester::BinTokenReaderTester(JSContext* cx, const uint8_t* start, const size_t length)
-    : cx_(cx)
-    , start_(start)
-    , current_(start)
-    , stop_(start + length)
-    , latestKnownGoodPos_(0)
-{ }
-
-BinTokenReaderTester::BinTokenReaderTester(JSContext* cx, const Vector<uint8_t>& chars)
-    : cx_(cx)
-    , start_(chars.begin())
-    , current_(chars.begin())
-    , stop_(chars.end())
-    , latestKnownGoodPos_(0)
-{ }
-
-bool
-BinTokenReaderTester::raiseError(const char* description)
-{
-    MOZ_ASSERT(!cx_->isExceptionPending());
-    TokenPos pos = this->pos();
-    JS_ReportErrorASCII(cx_, "BinAST parsing error: %s at offsets %u => %u",
-                        description, pos.begin, pos.end);
-    return false;
-}
-
-bool
-BinTokenReaderTester::readBuf(uint8_t* bytes, uint32_t len)
-{
-    MOZ_ASSERT(!cx_->isExceptionPending());
-    MOZ_ASSERT(len > 0);
-
-    if (stop_ < current_ + len)
-        return raiseError("Buffer exceeds length");
-
-    for (uint32_t i = 0; i < len; ++i)
-        *bytes++ = *current_++;
-
-    return true;
-}
-
-bool
-BinTokenReaderTester::readByte(uint8_t* byte)
-{
-    return readBuf(byte, 1);
-}
-
-
-// Nullable booleans:
-//
-// 0 => false
-// 1 => true
-// 2 => null
-bool
-BinTokenReaderTester::readMaybeBool(Maybe<bool>& result)
-{
-    updateLatestKnownGood();
-    uint8_t byte;
-    if (!readByte(&byte))
-        return false;
-
-    switch (byte) {
-      case 0:
-        result = Some(false);
-        break;
-      case 1:
-        result = Some(true);
-        break;
-      case 2:
-        result = Nothing();
-        break;
-      default:
-        return raiseError("Invalid boolean value");
-    }
-    return true;
-}
-
-bool
-BinTokenReaderTester::readBool(bool& out)
-{
-    Maybe<bool> result;
-
-    if (!readMaybeBool(result))
-        return false;
-
-    if (result.isNothing())
-        return raiseError("Empty boolean value");
-
-    out = *result;
-    return true;
-}
-
-// Nullable doubles (little-endian)
-//
-// 0x7FF0000000000001 (signaling NaN) => null
-// anything other 64 bit sequence => IEEE-764 64-bit floating point number
-bool
-BinTokenReaderTester::readMaybeDouble(Maybe<double>& result)
-{
-    updateLatestKnownGood();
-
-    uint8_t bytes[8];
-    MOZ_ASSERT(sizeof(bytes) == sizeof(double));
-    if (!readBuf(reinterpret_cast<uint8_t*>(bytes), ArrayLength(bytes)))
-        return false;
-
-    // Decode little-endian.
-    const uint64_t asInt = LittleEndian::readUint64(bytes);
-
-    if (asInt == 0x7FF0000000000001) {
-        result = Nothing();
-    } else {
-        // Canonicalize NaN, just to make sure another form of signalling NaN
-        // doesn't slip past us.
-        const double asDouble = CanonicalizeNaN(BitwiseCast<double>(asInt));
-        result = Some(asDouble);
-    }
-
-    return true;
-}
-
-bool
-BinTokenReaderTester::readDouble(double& out)
-{
-    Maybe<double> result;
-
-    if (!readMaybeDouble(result))
-        return false;
-
-    if (result.isNothing())
-        return raiseError("Empty double value");
-
-    out = *result;
-    return true;
-}
-
-// Internal uint32_t
-//
-// Encoded as 4 bytes, little-endian.
-bool
-BinTokenReaderTester::readInternalUint32(uint32_t* result)
-{
-    uint8_t bytes[4];
-    MOZ_ASSERT(sizeof(bytes) == sizeof(uint32_t));
-    if (!readBuf(bytes, 4))
-        return false;
-
-    // Decode little-endian.
-    *result = LittleEndian::readUint32(bytes);
-
-    return true;
-}
-
-
-
-// Nullable strings:
-// - "<string>" (not counted in byte length)
-// - byte length (not counted in byte length)
-// - bytes (UTF-8)
-// - "</string>" (not counted in byte length)
-//
-// The special sequence of bytes `[255, 0]` (which is an invalid UTF-8 sequence)
-// is reserved to `null`.
-bool
-BinTokenReaderTester::readMaybeChars(Maybe<Chars>& out)
-{
-    updateLatestKnownGood();
-
-    if (!readConst("<string>"))
-        return false;
-
-    // 1. Read byteLength
-    uint32_t byteLen;
-    if (!readInternalUint32(&byteLen))
-        return false;
-
-    // 2. Reject if we can't read
-    if (current_ + byteLen < current_) // Check for overflows
-        return raiseError("Arithmetics overflow: string is too long");
-
-    if (current_ + byteLen > stop_)
-        return raiseError("Not enough bytes to read chars");
-
-    // 3. Check null string (no allocation)
-    if (byteLen == 2 && *current_ == 255 && *(current_ + 1) == 0) {
-        // Special case: null string.
-        out = Nothing();
-        current_ += byteLen;
-        return true;
-    }
-
-    // 4. Other strings (bytes are copied)
-    out.emplace(cx_);
-    if (!out->resize(byteLen)) {
-        ReportOutOfMemory(cx_);
-        return false;
-    }
-    PodCopy(out->begin(), current_, byteLen);
-    current_ += byteLen;
-
-    if (!readConst("</string>"))
-        return false;
-
-    return true;
-}
-
-bool
-BinTokenReaderTester::readChars(Chars& out)
-{
-    Maybe<Chars> result;
-
-    if (!readMaybeChars(result))
-        return false;
-
-    if (result.isNothing())
-        return raiseError("Empty string");
-
-    out = Move(*result);
-    return true;
-}
-
-template <size_t N>
-bool
-BinTokenReaderTester::matchConst(const char (&value)[N])
-{
-    MOZ_ASSERT(N > 0);
-    MOZ_ASSERT(value[N - 1] == 0);
-    MOZ_ASSERT(!cx_->isExceptionPending());
-
-    if (current_ + N - 1 > stop_)
-        return false;
-
-    // Perform lookup, without side-effects.
-    if (!std::equal(current_, current_ + N - 1 /*implicit NUL*/, value))
-        return false;
-
-    // Looks like we have a match. Now perform side-effects
-    current_ += N - 1;
-    updateLatestKnownGood();
-    return true;
-}
-
-
-// Untagged tuple:
-// - "<tuple>";
-// - contents (specified by the higher-level grammar);
-// - "</tuple>"
-bool
-BinTokenReaderTester::enterUntaggedTuple(AutoTuple& guard)
-{
-    if (!readConst("<tuple>"))
-        return false;
-
-    guard.init();
-    return true;
-}
-
-template <size_t N>
-bool
-BinTokenReaderTester::readConst(const char (&value)[N])
-{
-    updateLatestKnownGood();
-    if (!matchConst(value))
-        return raiseError("Could not find expected literal");
-
-    return true;
-}
-
-// Tagged tuples:
-// - "<tuple>"
-// - "<head>"
-// - non-null string `name`, followed by \0 (see `readString()`);
-// - uint32_t number of fields;
-// - array of `number of fields` non-null strings followed each by \0 (see `readString()`);
-// - "</head>"
-// - content (specified by the higher-level grammar);
-// - "</tuple>"
-bool
-BinTokenReaderTester::enterTaggedTuple(BinKind& tag, BinFields& fields, AutoTaggedTuple& guard)
-{
-    // Header
-    if (!readConst("<tuple>"))
-        return false;
-
-    if (!readConst("<head>"))
-        return false;
-
-    // This would probably be much faster with a HashTable, but we don't
-    // really care about the speed of BinTokenReaderTester.
-    do {
-
-#define FIND_MATCH(CONSTRUCTOR, NAME) \
-        if (matchConst(#NAME "\0")) { \
-            tag = BinKind::CONSTRUCTOR; \
-            break; \
-        } // else
-
-        FOR_EACH_BIN_KIND(FIND_MATCH)
-#undef FIND_MATCH
-
-        // else
-        return raiseError("Invalid tag");
-    } while(false);
-
-    // Now fields.
-    uint32_t fieldNum;
-    if (!readInternalUint32(&fieldNum))
-        return false;
-
-    fields.clear();
-    if (!fields.reserve(fieldNum))
-        return raiseError("Out of memory");
-
-    for (uint32_t i = 0; i < fieldNum; ++i) {
-        // This would probably be much faster with a HashTable, but we don't
-        // really care about the speed of BinTokenReaderTester.
-        BinField field;
-        do {
-
-#define FIND_MATCH(CONSTRUCTOR, NAME) \
-            if (matchConst(#NAME "\0")) { \
-                field = BinField::CONSTRUCTOR; \
-                break; \
-            } // else
-
-            FOR_EACH_BIN_FIELD(FIND_MATCH)
-#undef FIND_MATCH
-
-            // else
-            return raiseError("Invalid field");
-        } while (false);
-
-        // Make sure that we do not have duplicate fields.
-        // Search is linear, but again, we don't really care
-        // in this implementation.
-        for (uint32_t j = 0; j < i; ++j) {
-            if (fields[j] == field) {
-                return raiseError("Duplicate field");
-            }
-        }
-
-        fields.infallibleAppend(field); // Already checked.
-    }
-
-    // End of header
-
-    if (!readConst("</head>"))
-        return false;
-
-    // Enter the body.
-    guard.init();
-    return true;
-}
-
-// List:
-//
-// - "<list>" (not counted in byte length);
-// - uint32_t byte length (not counted in byte length);
-// - uint32_t number of items;
-// - contents (specified by higher-level grammar);
-// - "</list>" (not counted in byte length)
-//
-// The total byte length of `number of items` + `contents` must be `byte length`.
-bool
-BinTokenReaderTester::enterList(uint32_t& items, AutoList& guard)
-{
-    if (!readConst("<list>"))
-        return false;
-
-    uint32_t byteLen;
-    if (!readInternalUint32(&byteLen))
-        return false;
-
-    const uint8_t* stop = current_ + byteLen;
-
-    if (stop < current_) // Check for overflows
-        return raiseError("Arithmetics overflow: list is too long");
-
-    if (stop > this->stop_)
-        return raiseError("Incorrect list length");
-
-    guard.init(stop);
-
-    if (!readInternalUint32(&items))
-        return false;
-
-    return true;
-}
-
-void
-BinTokenReaderTester::updateLatestKnownGood()
-{
-    MOZ_ASSERT(current_ >= start_);
-    const size_t update = current_ - start_;
-    MOZ_ASSERT(update >= latestKnownGoodPos_);
-    latestKnownGoodPos_ = update;
-}
-
-size_t
-BinTokenReaderTester::offset() const
-{
-    return latestKnownGoodPos_;
-}
-
-TokenPos
-BinTokenReaderTester::pos()
-{
-    return pos(latestKnownGoodPos_);
-}
-
-TokenPos
-BinTokenReaderTester::pos(size_t start)
-{
-    TokenPos pos;
-    pos.begin = start;
-    pos.end = current_ - start_;
-    MOZ_ASSERT(pos.end >= pos.begin);
-    return pos;
-}
-
-void
-BinTokenReaderTester::AutoBase::init()
-{
-    initialized_ = true;
-}
-
-BinTokenReaderTester::AutoBase::AutoBase(BinTokenReaderTester& reader)
-    : reader_(reader)
-{ }
-
-BinTokenReaderTester::AutoBase::~AutoBase()
-{
-    // By now, the `AutoBase` must have been deinitialized by calling `done()`.
-    // The only case in which we can accept not calling `done()` is if we have
-    // bailed out because of an error.
-    MOZ_ASSERT_IF(initialized_, reader_.cx_->isExceptionPending());
-}
-
-bool
-BinTokenReaderTester::AutoBase::checkPosition(const uint8_t* expectedEnd)
-{
-    if (reader_.current_ != expectedEnd)
-        return reader_.raiseError("Caller did not consume the expected set of bytes");
-
-    return true;
-}
-
-BinTokenReaderTester::AutoList::AutoList(BinTokenReaderTester& reader)
-    : AutoBase(reader)
-{ }
-
-void
-BinTokenReaderTester::AutoList::init(const uint8_t* expectedEnd)
-{
-    AutoBase::init();
-    this->expectedEnd_ = expectedEnd;
-}
-
-bool
-BinTokenReaderTester::AutoList::done()
-{
-    MOZ_ASSERT(initialized_);
-    initialized_ = false;
-    if (reader_.cx_->isExceptionPending()) {
-        // Already errored, no need to check further.
-        return false;
-    }
-
-    // Check that we have consumed the exact number of bytes.
-    if (!checkPosition(expectedEnd_))
-        return false;
-
-    // Check suffix.
-    if (!reader_.readConst("</list>"))
-        return false;
-
-    return true;
-}
-
-BinTokenReaderTester::AutoTaggedTuple::AutoTaggedTuple(BinTokenReaderTester& reader)
-    : AutoBase(reader)
-{ }
-
-bool
-BinTokenReaderTester::AutoTaggedTuple::done()
-{
-    MOZ_ASSERT(initialized_);
-    initialized_ = false;
-    if (reader_.cx_->isExceptionPending()) {
-        // Already errored, no need to check further.
-        return false;
-    }
-
-    // Check suffix.
-    if (!reader_.readConst("</tuple>"))
-        return false;
-
-    return true;
-}
-
-BinTokenReaderTester::AutoTuple::AutoTuple(BinTokenReaderTester& reader)
-    : AutoBase(reader)
-{ }
-
-bool
-BinTokenReaderTester::AutoTuple::done()
-{
-    MOZ_ASSERT(initialized_);
-    initialized_ = false;
-    if (reader_.cx_->isExceptionPending()) {
-        // Already errored, no need to check further.
-        return false;
-    }
-
-    // Check suffix.
-    if (!reader_.readConst("</tuple>"))
-        return false;
-
-    return true;
-}
-
-} // namespace frontend
-} // namespace js
deleted file mode 100644
--- a/js/src/frontend/BinTokenReaderTester.h
+++ /dev/null
@@ -1,357 +0,0 @@
-#ifndef frontend_BinTokenReaderTester_h
-#define frontend_BinTokenReaderTester_h
-
-#include "mozilla/Maybe.h"
-
-#include "frontend/BinToken.h"
-#include "frontend/TokenStream.h"
-
-#include "js/TypeDecls.h"
-
-#if !defined(NIGHTLY_BUILD)
-#error "BinTokenReaderTester.* is designed to help test implementations of successive versions of JS BinaryAST. It is available only on Nightly."
-#endif // !defined(NIGHTLY_BUILD)
-
-namespace js {
-namespace frontend {
-
-using namespace mozilla;
-using namespace JS;
-
-/**
- * A token reader for a simple, alternative serialization format for BinAST.
- *
- * This serialization format, which is also supported by the reference
- * implementation of the BinAST compression suite, is designed to be
- * mostly human-readable and easy to check for all sorts of deserialization
- * errors. While this format is NOT designed to be shipped to end-users, it
- * is nevertheless a very useful tool for implementing and testing parsers.
- *
- * Both the format and the implementation are ridiculously inefficient:
- *
- * - the underlying format tags almost all its data with e.g. `<tuple>`, `</tuple>`
- *   to aid with detecting offset errors or format error;
- * - the underlying format copies list of fields into every single node, instead
- *   of keeping them once in the header;
- * - every kind/field extraction requires memory allocation and plenty of string
- *   comparisons;
- * - ...
- *
- * This token reader is designed to be API-compatible with the standard, shipped,
- * token reader. For these reasons:
- *
- * - it does not support any form of look ahead, push back;
- * - it does not support any form of error recovery.
- */
-class MOZ_STACK_CLASS BinTokenReaderTester
-{
-  public:
-    // A list of fields, in the order in which they appear in the stream.
-    using BinFields = Vector<BinField, 8>;
-
-    // A bunch of characters. At this stage, there is no guarantee on whether
-    // they are valid UTF-8. Future versions may replace this by slice into
-    // the buffer.
-    using Chars     = Vector<uint8_t, 32>;
-
-    class AutoList;
-    class AutoTuple;
-    class AutoTaggedTuple;
-
-  public:
-    /**
-     * Construct a token reader.
-     *
-     * Does NOT copy the buffer.
-     */
-    BinTokenReaderTester(JSContext* cx, const uint8_t* start, const size_t length);
-
-    /**
-     * Construct a token reader.
-     *
-     * Does NOT copy the buffer.
-     */
-    BinTokenReaderTester(JSContext* cx, const Vector<uint8_t>& chars);
-
-    // --- Primitive values.
-    //
-    // Note that the underlying format allows for a `null` value for primitive
-    // values.
-    //
-    // Reading will return an error either in case of I/O error or in case of
-    // a format problem. Reading if an exception in pending is an error and
-    // will cause assertion failures. Do NOT attempt to read once an exception
-    // has been cleared: the token reader does NOT support recovery, by design.
-
-    /**
-     * Read a single `true | false | null` value.
-     *
-     * @param out Set to `Nothing` if the data specifies that the value is `null`.
-     * Otherwise, `Some(true)` or `Some(false)`.
-     *
-     * @return false If a boolean could not be read. In this case, an error
-     * has been raised.
-     */
-    MOZ_MUST_USE bool readMaybeBool(Maybe<bool>& out);
-    MOZ_MUST_USE bool readBool(bool& out);
-
-    /**
-     * Read a single `number | null` value.
-     *
-     * @param out Set to `Nothing` if the data specifies that the value is `null`.
-     * Otherwise, `Some(x)`, where `x` is a valid `double` (i.e. either a non-NaN
-     * or a canonical NaN).
-     *
-     * @return false If a double could not be read. In this case, an error
-     * has been raised.
-     */
-    MOZ_MUST_USE bool readMaybeDouble(Maybe<double>& out);
-    MOZ_MUST_USE bool readDouble(double& out);
-
-    /**
-     * Read a single `string | null` value.
-     *
-     * @param out Set to `Nothing` if the data specifies that the value is `null`.
-     * Otherwise, `Some(x)`, where `x` is a `string`.
-     *
-     * WARNING: At this stage, the `string` encoding has NOT been validated.
-     *
-     * @return false If a string could not be read. In this case, an error
-     * has been raised.
-     */
-    MOZ_MUST_USE bool readMaybeChars(Maybe<Chars>& out);
-    MOZ_MUST_USE bool readChars(Chars& out);
-
-    // --- Composite values.
-    //
-    // The underlying format does NOT allows for a `null` composite value.
-    //
-    // Reading will return an error either in case of I/O error or in case of
-    // a format problem. Reading from a poisoned tokenizer is an error and
-    // will cause assertion failures.
-
-    /**
-     * Start reading a list.
-     *
-     * @param length (OUT) The number of elements in the list.
-     * @param guard (OUT) A guard, ensuring that we read the list correctly.
-     *
-     * The `guard` is dedicated to ensuring that reading the list has consumed
-     * exactly all the bytes from that list. The `guard` MUST therefore be
-     * destroyed at the point where the caller has reached the end of the list.
-     * If the caller has consumed too few/too many bytes, this will be reported
-     * in the call go `guard.done()`.
-     *
-     * @return out If the header of the list is invalid.
-     */
-    MOZ_MUST_USE bool enterList(uint32_t& length, AutoList& guard);
-
-    /**
-     * Start reading a tagged tuple.
-     *
-     * @param tag (OUT) The tag of the tuple.
-     * @param fields (OUT) The ORDERED list of fields encoded in this tuple.
-     * @param guard (OUT) A guard, ensuring that we read the tagged tuple correctly.
-     *
-     * The `guard` is dedicated to ensuring that reading the list has consumed
-     * exactly all the bytes from that tuple. The `guard` MUST therefore be
-     * destroyed at the point where the caller has reached the end of the tuple.
-     * If the caller has consumed too few/too many bytes, this will be reported
-     * in the call go `guard.done()`.
-     *
-     * @return out If the header of the tuple is invalid.
-     */
-    MOZ_MUST_USE bool enterTaggedTuple(BinKind& tag, BinTokenReaderTester::BinFields& fields, AutoTaggedTuple& guard);
-
-    /**
-     * Start reading an untagged tuple.
-     *
-     * @param guard (OUT) A guard, ensuring that we read the tuple correctly.
-     *
-     * The `guard` is dedicated to ensuring that reading the list has consumed
-     * exactly all the bytes from that tuple. The `guard` MUST therefore be
-     * destroyed at the point where the caller has reached the end of the tuple.
-     * If the caller has consumed too few/too many bytes, this will be reported
-     * in the call go `guard.done()`.
-     *
-     * @return out If the header of the tuple is invalid.
-     */
-    MOZ_MUST_USE bool enterUntaggedTuple(AutoTuple& guard);
-
-    /**
-     * Return the position of the latest token.
-     */
-    TokenPos pos();
-    TokenPos pos(size_t startOffset);
-    size_t offset() const;
-
-    /**
-     * Raise an error.
-     *
-     * Once `raiseError` has been called, the tokenizer is poisoned.
-     */
-    MOZ_MUST_USE bool raiseError(const char* description);
-
-     /**
-      * Poison this tokenizer.
-      */
-    void poison();
-
-  private:
-    /**
-     * Read a single byte.
-     */
-    MOZ_MUST_USE bool readByte(uint8_t* byte);
-
-    /**
-     * Read several bytes.
-     *
-     * If there is not enough data, or if the tokenizer has previously been
-     * poisoned, return `false` and report an exception.
-     */
-    MOZ_MUST_USE bool readBuf(uint8_t* bytes, uint32_t len);
-
-    /**
-     * Read a single uint32_t.
-     */
-    MOZ_MUST_USE bool readInternalUint32(uint32_t*);
-
-    /**
-     * Read a sequence of chars, ensuring that they match an expected
-     * sequence of chars.
-     *
-     * @param value The sequence of chars to expect, NUL-terminated. The NUL
-     * is not expected in the stream.
-     */
-     template <size_t N>
-     MOZ_MUST_USE bool readConst(const char (&value)[N]);
-
-     /**
-     * Read a sequence of chars, consuming the bytes only if they match an expected
-     * sequence of chars.
-     *
-     * @param value The sequence of chars to expect, NUL-terminated. The NUL
-     * is not expected in the stream.
-     * @return true if `value` (minus NUL) represents the next few chars in the
-     * internal buffer, false otherwise. If `true`, the chars are consumed,
-     * otherwise there is no side-effect.
-     */
-    template <size_t N>
-    MOZ_MUST_USE bool matchConst(const char (&value)[N]);
-
-    /**
-     * Update the "latest known good" position, which is used during error
-     * reporting.
-     */
-    void updateLatestKnownGood();
-
-  private:
-    JSContext* cx_;
-
-    // `true` if we have encountered an error. Errors are non recoverable.
-    // Attempting to read from a poisoned tokenizer will cause assertion errors.
-    bool poisoned_;
-
-    // The first byte of the buffer. Not owned.
-    const uint8_t* start_;
-
-    // The current position.
-    const uint8_t* current_;
-
-    // The last+1 byte of the buffer.
-    const uint8_t* stop_;
-
-
-    // Latest known good position. Used for error reporting.
-    size_t latestKnownGoodPos_;
-
-    BinTokenReaderTester(const BinTokenReaderTester&) = delete;
-    BinTokenReaderTester(BinTokenReaderTester&&) = delete;
-    BinTokenReaderTester& operator=(BinTokenReaderTester&) = delete;
-
-  public:
-    // The following classes are used whenever we encounter a tuple/tagged tuple/list
-    // to make sure that:
-    //
-    // - if the construct "knows" its byte length, we have exactly consumed all
-    //   the bytes (otherwise, this means that the file is corrupted, perhaps on
-    //   purpose, so we need to reject the stream);
-    // - if the construct has a footer, once we are done reading it, we have
-    //   reached the footer (this is to aid with debugging).
-    //
-    // In either case, the caller MUST call method `done()` of the guard once
-    // it is done reading the tuple/tagged tuple/list, to report any pending error.
-
-    // Base class used by other Auto* classes.
-    class MOZ_STACK_CLASS AutoBase
-    {
-      protected:
-        explicit AutoBase(BinTokenReaderTester& reader);
-        ~AutoBase();
-
-        // Raise an error if we are not in the expected position.
-        MOZ_MUST_USE bool checkPosition(const uint8_t* expectedPosition);
-
-        friend BinTokenReaderTester;
-        void init();
-
-        // Set to `true` if `init()` has been called. Reset to `false` once
-        // all conditions have been checked.
-        bool initialized_;
-        BinTokenReaderTester& reader_;
-    };
-
-    // Guard class used to ensure that `enterList` is used properly.
-    class MOZ_STACK_CLASS AutoList : public AutoBase
-    {
-      public:
-        explicit AutoList(BinTokenReaderTester& reader);
-
-        // Check that we have properly read to the end of the list.
-        MOZ_MUST_USE bool done();
-      protected:
-        friend BinTokenReaderTester;
-        void init(const uint8_t* expectedEnd);
-      private:
-        const uint8_t* expectedEnd_;
-    };
-
-    // Guard class used to ensure that `enterTaggedTuple` is used properly.
-    class MOZ_STACK_CLASS AutoTaggedTuple : public AutoBase
-    {
-      public:
-        explicit AutoTaggedTuple(BinTokenReaderTester& reader);
-
-        // Check that we have properly read to the end of the tuple.
-        MOZ_MUST_USE bool done();
-    };
-
-    // Guard class used to ensure that `readTuple` is used properly.
-    class MOZ_STACK_CLASS AutoTuple : public AutoBase
-    {
-      public:
-        explicit AutoTuple(BinTokenReaderTester& reader);
-
-        // Check that we have properly read to the end of the tuple.
-        MOZ_MUST_USE bool done();
-    };
-
-    // Compare a `Chars` and a string literal (ONLY a string literal).
-    template <size_t N>
-    static bool equals(const Chars& left, const char (&right)[N]) {
-        MOZ_ASSERT(N > 0);
-        MOZ_ASSERT(right[N - 1] == 0);
-        if (left.length() + 1 /* implicit NUL */ != N)
-            return false;
-
-        if (!std::equal(left.begin(), left.end(), right))
-          return false;
-
-        return true;
-    }
-};
-
-} // namespace frontend
-} // namespace js
-
-#endif // frontend_BinTokenReaderTester_h
--- a/js/src/frontend/BytecodeCompiler.h
+++ b/js/src/frontend/BytecodeCompiler.h
@@ -119,24 +119,16 @@ IsIdentifier(const char16_t* chars, size
 /* True if str is a keyword. Defined in TokenStream.cpp. */
 bool
 IsKeyword(JSLinearString* str);
 
 /* Trace all GC things reachable from parser. Defined in Parser.cpp. */
 void
 TraceParser(JSTracer* trc, JS::AutoGCRooter* parser);
 
-#if defined(JS_BUILD_BINAST)
-
-/* Trace all GC things reachable from binjs parser. Defined in BinSource.cpp. */
-void
-TraceBinParser(JSTracer* trc, JS::AutoGCRooter* parser);
-
-#endif // defined(JS_BUILD_BINAST)
-
 class MOZ_STACK_CLASS AutoFrontendTraceLog
 {
 #ifdef JS_TRACE_LOGGING
     TraceLoggerThread* logger_;
     mozilla::Maybe<TraceLoggerEvent> frontendEvent_;
     mozilla::Maybe<AutoTraceLog> frontendLog_;
     mozilla::Maybe<AutoTraceLog> typeLog_;
 #endif
--- a/js/src/frontend/FullParseHandler.h
+++ b/js/src/frontend/FullParseHandler.h
@@ -16,23 +16,16 @@
 #include "frontend/SharedContext.h"
 
 namespace js {
 
 class RegExpObject;
 
 namespace frontend {
 
-enum class SourceKind {
-    // We are parsing from a text source (Parser.h)
-    Text,
-    // We are parsing from a binary source (BinSource.h)
-    Binary,
-};
-
 // Parse handler used when generating a full parse tree for all code which the
 // parser encounters.
 class FullParseHandler
 {
     ParseNodeAllocator allocator;
 
     ParseNode* allocParseNode(size_t size) {
         MOZ_ASSERT(size == sizeof(ParseNode));
@@ -43,18 +36,16 @@ class FullParseHandler
      * If this is a full parse to construct the bytecode for a function that
      * was previously lazily parsed, that lazy function and the current index
      * into its inner functions. We do not want to reparse the inner functions.
      */
     const Rooted<LazyScript*> lazyOuterFunction_;
     size_t lazyInnerFunctionIndex;
     size_t lazyClosedOverBindingIndex;
 
-    const SourceKind sourceKind_;
-
   public:
     /* new_ methods for creating parse nodes. These report OOM on context. */
     JS_DECLARE_NEW_METHODS(new_, allocParseNode, inline)
 
     typedef ParseNode* Node;
 
     bool isPropertyAccess(ParseNode* node) {
         return node->isKind(PNK_DOT) || node->isKind(PNK_ELEM);
@@ -72,34 +63,25 @@ class FullParseHandler
     static bool isParenthesizedDestructuringPattern(ParseNode* node) {
         // Technically this isn't a destructuring pattern at all -- the grammar
         // doesn't treat it as such.  But we need to know when this happens to
         // consider it a SyntaxError rather than an invalid-left-hand-side
         // ReferenceError.
         return node->isInParens() && (node->isKind(PNK_OBJECT) || node->isKind(PNK_ARRAY));
     }
 
-    FullParseHandler(JSContext* cx, LifoAlloc& alloc, LazyScript* lazyOuterFunction,
-                     SourceKind kind = SourceKind::Text)
+    FullParseHandler(JSContext* cx, LifoAlloc& alloc, LazyScript* lazyOuterFunction)
       : allocator(cx, alloc),
         lazyOuterFunction_(cx, lazyOuterFunction),
         lazyInnerFunctionIndex(0),
-        lazyClosedOverBindingIndex(0),
-        sourceKind_(SourceKind::Text)
+        lazyClosedOverBindingIndex(0)
     {}
 
     static ParseNode* null() { return nullptr; }
 
-    // The FullParseHandler may be used to create nodes for text sources
-    // (from Parser.h) or for binary sources (from BinSource.h). In the latter
-    // case, some common assumptions on offsets are incorrect, e.g. in `a + b`,
-    // `a`, `b` and `+` may be stored in any order. We use `sourceKind()`
-    // to determine whether we need to check these assumptions.
-    SourceKind sourceKind() const { return sourceKind_; }
-
     ParseNode* freeTree(ParseNode* pn) { return allocator.freeTree(pn); }
     void prepareNodeForMutation(ParseNode* pn) { return allocator.prepareNodeForMutation(pn); }
 
     ParseNode* newName(PropertyName* name, const TokenPos& pos, JSContext* cx)
     {
         return new_<NameNode>(PNK_NAME, JSOP_GETNAME, name, pos);
     }
 
@@ -243,39 +225,42 @@ class FullParseHandler
 
     MOZ_MUST_USE bool addElision(ParseNode* literal, const TokenPos& pos) {
         MOZ_ASSERT(literal->isKind(PNK_ARRAY));
         MOZ_ASSERT(literal->isArity(PN_LIST));
 
         ParseNode* elision = new_<NullaryNode>(PNK_ELISION, pos);
         if (!elision)
             return false;
-        addList(/* list = */ literal, /* child = */ elision);
+
+        literal->append(elision);
         literal->pn_xflags |= PNX_ARRAYHOLESPREAD | PNX_NONCONST;
         return true;
     }
 
     MOZ_MUST_USE bool addSpreadElement(ParseNode* literal, uint32_t begin, ParseNode* inner) {
         MOZ_ASSERT(literal->isKind(PNK_ARRAY));
         MOZ_ASSERT(literal->isArity(PN_LIST));
 
         ParseNode* spread = newSpread(begin, inner);
         if (!spread)
             return false;
-        addList(/* list = */ literal, /* child = */ spread);
+
+        literal->append(spread);
         literal->pn_xflags |= PNX_ARRAYHOLESPREAD | PNX_NONCONST;
         return true;
     }
 
     void addArrayElement(ParseNode* literal, ParseNode* element) {
         MOZ_ASSERT(literal->isArity(PN_LIST));
 
         if (!element->isConstant())
             literal->pn_xflags |= PNX_NONCONST;
-        addList(/* list = */ literal, /* child = */ element);
+
+        literal->append(element);
     }
 
     ParseNode* newCall(const TokenPos& pos) {
         return new_<ListNode>(PNK_CALL, JSOP_CALL, pos);
     }
 
     ParseNode* newSuperCall(ParseNode* callee) {
         return new_<ListNode>(PNK_SUPERCALL, JSOP_SUPERCALL, callee);
@@ -304,97 +289,106 @@ class FullParseHandler
         return new_<BinaryNode>(PNK_NEWTARGET, JSOP_NOP, newHolder, targetHolder);
     }
     ParseNode* newPosHolder(const TokenPos& pos) {
         return new_<NullaryNode>(PNK_POSHOLDER, pos);
     }
     ParseNode* newSuperBase(ParseNode* thisName, const TokenPos& pos) {
         return new_<UnaryNode>(PNK_SUPERBASE, pos, thisName);
     }
-    ParseNode* newCatchBlock(ParseNode* catchName, ParseNode* catchGuard, ParseNode* catchBody) {
-        return new_<TernaryNode>(PNK_CATCH, catchName, catchGuard, catchBody);
-    }
+
     MOZ_MUST_USE bool addPrototypeMutation(ParseNode* literal, uint32_t begin, ParseNode* expr) {
         MOZ_ASSERT(literal->isKind(PNK_OBJECT));
         MOZ_ASSERT(literal->isArity(PN_LIST));
 
         // Object literals with mutated [[Prototype]] are non-constant so that
         // singleton objects will have Object.prototype as their [[Prototype]].
         setListFlag(literal, PNX_NONCONST);
 
         ParseNode* mutation = newUnary(PNK_MUTATEPROTO, begin, expr);
         if (!mutation)
             return false;
-        addList(/* list = */ literal, /* child = */ mutation);
+        literal->append(mutation);
         return true;
     }
 
     MOZ_MUST_USE bool addPropertyDefinition(ParseNode* literal, ParseNode* key, ParseNode* val) {
         MOZ_ASSERT(literal->isKind(PNK_OBJECT));
         MOZ_ASSERT(literal->isArity(PN_LIST));
-        MOZ_ASSERT(isUsableAsObjectPropertyName(key));
+        MOZ_ASSERT(key->isKind(PNK_NUMBER) ||
+                   key->isKind(PNK_OBJECT_PROPERTY_NAME) ||
+                   key->isKind(PNK_STRING) ||
+                   key->isKind(PNK_COMPUTED_NAME));
 
         ParseNode* propdef = newBinary(PNK_COLON, key, val, JSOP_INITPROP);
         if (!propdef)
             return false;
-        addList(/* list = */ literal, /* child = */ propdef);
+        literal->append(propdef);
         return true;
     }
 
     MOZ_MUST_USE bool addShorthand(ParseNode* literal, ParseNode* name, ParseNode* expr) {
         MOZ_ASSERT(literal->isKind(PNK_OBJECT));
         MOZ_ASSERT(literal->isArity(PN_LIST));
         MOZ_ASSERT(name->isKind(PNK_OBJECT_PROPERTY_NAME));
         MOZ_ASSERT(expr->isKind(PNK_NAME));
         MOZ_ASSERT(name->pn_atom == expr->pn_atom);
 
         setListFlag(literal, PNX_NONCONST);
         ParseNode* propdef = newBinary(PNK_SHORTHAND, name, expr, JSOP_INITPROP);
         if (!propdef)
             return false;
-        addList(/* list = */ literal, /* child = */ propdef);
+        literal->append(propdef);
         return true;
     }
 
     MOZ_MUST_USE bool addSpreadProperty(ParseNode* literal, uint32_t begin, ParseNode* inner) {
         MOZ_ASSERT(literal->isKind(PNK_OBJECT));
         MOZ_ASSERT(literal->isArity(PN_LIST));
 
         setListFlag(literal, PNX_NONCONST);
         ParseNode* spread = newSpread(begin, inner);
         if (!spread)
             return false;
-        addList(/* list = */ literal, /* child = */ spread);
+        literal->append(spread);
         return true;
     }
 
     MOZ_MUST_USE bool addObjectMethodDefinition(ParseNode* literal, ParseNode* key, ParseNode* fn,
                                                 AccessorType atype)
     {
+        MOZ_ASSERT(literal->isKind(PNK_OBJECT));
         MOZ_ASSERT(literal->isArity(PN_LIST));
-        literal->pn_xflags |= PNX_NONCONST;
+        MOZ_ASSERT(key->isKind(PNK_NUMBER) ||
+                   key->isKind(PNK_OBJECT_PROPERTY_NAME) ||
+                   key->isKind(PNK_STRING) ||
+                   key->isKind(PNK_COMPUTED_NAME));
 
-        ParseNode* propdef = newObjectMethodOrPropertyDefinition(key, fn, atype);
+        ParseNode* propdef = newBinary(PNK_COLON, key, fn, AccessorTypeToJSOp(atype));
         if (!propdef)
             return false;
 
-        addList(/* list = */ literal, /* child = */ propdef);
+        literal->append(propdef);
+        literal->pn_xflags |= PNX_NONCONST;
         return true;
     }
 
     MOZ_MUST_USE bool addClassMethodDefinition(ParseNode* methodList, ParseNode* key, ParseNode* fn,
                                                AccessorType atype, bool isStatic)
     {
         MOZ_ASSERT(methodList->isKind(PNK_CLASSMETHODLIST));
-        MOZ_ASSERT(isUsableAsObjectPropertyName(key));
+        MOZ_ASSERT(key->isKind(PNK_NUMBER) ||
+                   key->isKind(PNK_OBJECT_PROPERTY_NAME) ||
+                   key->isKind(PNK_STRING) ||
+                   key->isKind(PNK_COMPUTED_NAME));
 
         ParseNode* classMethod = new_<ClassMethod>(key, fn, AccessorTypeToJSOp(atype), isStatic);
         if (!classMethod)
             return false;
-        addList(/* list = */ methodList, /* child = */ classMethod);
+        methodList->append(classMethod);
         return true;
     }
 
     ParseNode* newInitialYieldExpression(uint32_t begin, ParseNode* gen) {
         TokenPos pos(begin, begin + 1);
         return new_<UnaryNode>(PNK_INITIALYIELD, pos, gen);
     }
 
@@ -423,17 +417,17 @@ class FullParseHandler
         while (stmt->isKind(PNK_LABEL))
             stmt = stmt->as<LabeledStatement>().statement();
         return stmt->isKind(PNK_FUNCTION);
     }
 
     void addStatementToList(ParseNode* list, ParseNode* stmt) {
         MOZ_ASSERT(list->isKind(PNK_STATEMENTLIST));
 
-        addList(/* list = */ list, /* child = */ stmt);
+        list->append(stmt);
 
         if (isFunctionStmt(stmt)) {
             // PNX_FUNCDEFS notifies the emitter that the block contains
             // body-level function definitions that should be processed
             // before the rest of nodes.
             list->pn_xflags |= PNX_FUNCDEFS;
         }
     }
@@ -443,38 +437,35 @@ class FullParseHandler
         list->pn_pos.end = pos.end;
     }
 
     void addCaseStatementToList(ParseNode* list, ParseNode* casepn) {
         MOZ_ASSERT(list->isKind(PNK_STATEMENTLIST));
         MOZ_ASSERT(casepn->isKind(PNK_CASE));
         MOZ_ASSERT(casepn->pn_right->isKind(PNK_STATEMENTLIST));
 
-        addList(/* list = */ list, /* child = */ casepn);
+        list->append(casepn);
 
         if (casepn->pn_right->pn_xflags & PNX_FUNCDEFS)
             list->pn_xflags |= PNX_FUNCDEFS;
     }
 
-    MOZ_MUST_USE inline bool addCatchBlock(ParseNode* catchList, ParseNode* lexicalScope,
-                              ParseNode* catchName, ParseNode* catchGuard,
-                              ParseNode* catchBody);
-
     MOZ_MUST_USE bool prependInitialYield(ParseNode* stmtList, ParseNode* genName) {
         MOZ_ASSERT(stmtList->isKind(PNK_STATEMENTLIST));
         MOZ_ASSERT(stmtList->isArity(PN_LIST));
 
         TokenPos yieldPos(stmtList->pn_pos.begin, stmtList->pn_pos.begin + 1);
         ParseNode* makeGen = new_<NullaryNode>(PNK_GENERATOR, yieldPos);
         if (!makeGen)
             return false;
 
         MOZ_ASSERT(genName->getOp() == JSOP_GETNAME);
         genName->setOp(JSOP_SETNAME);
-        ParseNode* genInit = newAssignment(PNK_ASSIGN, /* lhs = */ genName, /* rhs = */ makeGen);
+
+        ParseNode* genInit = newBinary(PNK_ASSIGN, genName, makeGen);
         if (!genInit)
             return false;
 
         ParseNode* initialYield = newInitialYieldExpression(yieldPos.begin, genInit);
         if (!initialYield)
             return false;
 
         stmtList->prepend(initialYield);
@@ -675,61 +666,47 @@ class FullParseHandler
     }
 
     bool isExpressionClosure(ParseNode* node) const {
         return node->isKind(PNK_FUNCTION) &&
                node->pn_funbox->isExprBody() &&
                !node->pn_funbox->isArrow();
     }
 
-    ParseNode* newObjectMethodOrPropertyDefinition(ParseNode* key, ParseNode* fn, AccessorType atype) {
-        MOZ_ASSERT(isUsableAsObjectPropertyName(key));
-
-        return newBinary(PNK_COLON, key, fn, AccessorTypeToJSOp(atype));
-    }
-
-    bool setComprehensionLambdaBody(ParseNode* pn, ParseNode* body) {
-        MOZ_ASSERT(body->isKind(PNK_STATEMENTLIST));
-        ParseNode* paramsBody = newList(PNK_PARAMSBODY, body);
-        if (!paramsBody)
-            return false;
-        setFunctionFormalParametersAndBody(pn, paramsBody);
-        return true;
-    }
     void setFunctionFormalParametersAndBody(ParseNode* funcNode, ParseNode* kid) {
         MOZ_ASSERT_IF(kid, kid->isKind(PNK_PARAMSBODY));
         funcNode->pn_body = kid;
     }
     void setFunctionBox(ParseNode* pn, FunctionBox* funbox) {
         MOZ_ASSERT(pn->isKind(PNK_FUNCTION));
         pn->pn_funbox = funbox;
         funbox->functionNode = pn;
     }
     void addFunctionFormalParameter(ParseNode* pn, ParseNode* argpn) {
-        addList(/* list = */ pn->pn_body, /* child = */ argpn);
+        pn->pn_body->append(argpn);
     }
     void setFunctionBody(ParseNode* fn, ParseNode* body) {
         MOZ_ASSERT(fn->pn_body->isKind(PNK_PARAMSBODY));
-        addList(/* list = */ fn->pn_body, /* child = */ body);
+        fn->pn_body->append(body);
     }
 
     ParseNode* newModule(const TokenPos& pos) {
         return new_<CodeNode>(PNK_MODULE, JSOP_NOP, pos);
     }
 
     ParseNode* newLexicalScope(LexicalScope::Data* bindings, ParseNode* body) {
         return new_<LexicalScopeNode>(bindings, body);
     }
 
     Node newNewExpression(uint32_t begin, ParseNode* ctor) {
         ParseNode* newExpr = new_<ListNode>(PNK_NEW, JSOP_NEW, TokenPos(begin, begin + 1));
         if (!newExpr)
             return nullptr;
 
-        addList(/* list = */ newExpr, /* child = */ ctor);
+        addList(newExpr, ctor);
         return newExpr;
     }
 
     ParseNode* newAssignment(ParseNodeKind kind, ParseNode* lhs, ParseNode* rhs) {
         return newBinary(kind, lhs, rhs);
     }
 
     bool isUnparenthesizedAssignment(Node node) {
@@ -762,23 +739,16 @@ class FullParseHandler
         return kind == PNK_FUNCTION || kind == PNK_VAR || kind == PNK_BREAK || kind == PNK_THROW ||
                (kind == PNK_SEMI && !node->pn_kid);
     }
 
     bool isSuperBase(ParseNode* node) {
         return node->isKind(PNK_SUPERBASE);
     }
 
-    bool isUsableAsObjectPropertyName(ParseNode* node) {
-        return node->isKind(PNK_NUMBER)
-            || node->isKind(PNK_OBJECT_PROPERTY_NAME)
-            || node->isKind(PNK_STRING)
-            || node->isKind(PNK_COMPUTED_NAME);
-    }
-
     inline MOZ_MUST_USE bool finishInitializerAssignment(ParseNode* pn, ParseNode* init);
 
     void setBeginPosition(ParseNode* pn, ParseNode* oth) {
         setBeginPosition(pn, oth->pn_pos.begin);
     }
     void setBeginPosition(ParseNode* pn, uint32_t begin) {
         pn->pn_pos.begin = begin;
         MOZ_ASSERT(pn->pn_pos.begin <= pn->pn_pos.end);
@@ -830,20 +800,17 @@ class FullParseHandler
         return decl->pn_head;
     }
 
     ParseNode* newCommaExpressionList(ParseNode* kid) {
         return new_<ListNode>(PNK_COMMA, JSOP_NOP, kid);
     }
 
     void addList(ParseNode* list, ParseNode* kid) {
-        if (sourceKind_ == SourceKind::Text)
-            list->append(kid);
-        else
-            list->appendWithoutOrderAssumption(kid);
+        list->append(kid);
     }
 
     void setOp(ParseNode* pn, JSOp op) {
         pn->setOp(op);
     }
     void setListFlag(ParseNode* pn, unsigned flag) {
         MOZ_ASSERT(pn->isArity(PN_LIST));
         pn->pn_xflags |= flag;
@@ -908,29 +875,16 @@ class FullParseHandler
     }
     JSAtom* nextLazyClosedOverBinding() {
         MOZ_ASSERT(lazyClosedOverBindingIndex < lazyOuterFunction_->numClosedOverBindings());
         return lazyOuterFunction_->closedOverBindings()[lazyClosedOverBindingIndex++];
     }
 };
 
 inline bool
-FullParseHandler::addCatchBlock(ParseNode* catchList, ParseNode* lexicalScope,
-                                ParseNode* catchName, ParseNode* catchGuard,
-                                ParseNode* catchBody)
-{
-    ParseNode* catchpn = newCatchBlock(catchName, catchGuard, catchBody);
-    if (!catchpn)
-        return false;
-    addList(/* list = */ catchList, /* child = */ lexicalScope);
-    lexicalScope->setScopeBody(catchpn);
-    return true;
-}
-
-inline bool
 FullParseHandler::setLastFunctionFormalParameterDefault(ParseNode* funcpn,
                                                         ParseNode* defaultValue)
 {
     MOZ_ASSERT(funcpn->isKind(PNK_FUNCTION));
     MOZ_ASSERT(funcpn->isArity(PN_CODE));
 
     ParseNode* arg = funcpn->pn_body->last();
     ParseNode* pn = newBinary(PNK_ASSIGN, arg, defaultValue);
deleted file mode 100644
--- a/js/src/frontend/ParseContext-inl.h
+++ /dev/null
@@ -1,96 +0,0 @@
-#ifndef frontend_ParseContext_inl_h
-#define frontend_ParseContext_inl_h
-
-#include "frontend/ParseContext.h"
-
-namespace js {
-namespace frontend {
-
-template <>
-inline bool
-ParseContext::Statement::is<ParseContext::LabelStatement>() const
-{
-    return kind_ == StatementKind::Label;
-}
-
-template <>
-inline bool
-ParseContext::Statement::is<ParseContext::ClassStatement>() const
-{
-    return kind_ == StatementKind::Class;
-}
-
-
-inline JS::Result<Ok, ParseContext::BreakStatementError>
-ParseContext::checkBreakStatement(PropertyName* label)
-{
-    // Labeled 'break' statements target the nearest labeled statements (could
-    // be any kind) with the same label. Unlabeled 'break' statements target
-    // the innermost loop or switch statement.
-    if (label) {
-        auto hasSameLabel = [&label](ParseContext::LabelStatement* stmt) {
-            MOZ_ASSERT(stmt);
-            return stmt->label() == label;
-        };
-
-        if (!findInnermostStatement<ParseContext::LabelStatement>(hasSameLabel))
-            return mozilla::Err(ParseContext::BreakStatementError::LabelNotFound);
-
-    } else {
-        auto isBreakTarget = [](ParseContext::Statement* stmt) {
-            return StatementKindIsUnlabeledBreakTarget(stmt->kind());
-        };
-
-        if (!findInnermostStatement(isBreakTarget))
-            return mozilla::Err(ParseContext::BreakStatementError::ToughBreak);
-    }
-
-    return Ok();
-}
-
-inline JS::Result<Ok, ParseContext::ContinueStatementError>
-ParseContext::checkContinueStatement(PropertyName* label)
-{
-    // Labeled 'continue' statements target the nearest labeled loop
-    // statements with the same label. Unlabeled 'continue' statements target
-    // the innermost loop statement.
-    auto isLoop = [](ParseContext::Statement* stmt) {
-        MOZ_ASSERT(stmt);
-        return StatementKindIsLoop(stmt->kind());
-    };
-
-    if (!label) {
-        // Unlabeled statement: we target the innermost loop, so make sure that
-        // there is an innermost loop.
-        if (!findInnermostStatement(isLoop))
-            return mozilla::Err(ParseContext::ContinueStatementError::NotInALoop);
-        return Ok();
-    }
-
-    // Labeled statement: targest the nearest labeled loop with the same label.
-    ParseContext::Statement* stmt = innermostStatement();
-    bool foundLoop = false; // True if we have encountered at least one loop.
-
-    for (;;) {
-        stmt = ParseContext::Statement::findNearest(stmt, isLoop);
-        if (!stmt)
-            return foundLoop ? mozilla::Err(ParseContext::ContinueStatementError::LabelNotFound)
-                             : mozilla::Err(ParseContext::ContinueStatementError::NotInALoop);
-
-        foundLoop = true;
-
-        // Is it labeled by our label?
-        stmt = stmt->enclosing();
-        while (stmt && stmt->is<ParseContext::LabelStatement>()) {
-            if (stmt->as<ParseContext::LabelStatement>().label() == label)
-                return Ok();
-
-            stmt = stmt->enclosing();
-        }
-    }
-}
-
-}
-}
-
-#endif // frontend_ParseContext_inl_h
--- a/js/src/frontend/ParseContext.h
+++ b/js/src/frontend/ParseContext.h
@@ -2,21 +2,17 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef frontend_ParseContext_h
 #define frontend_ParseContext_h
 
-#include "ds/Nestable.h"
-
-#include "frontend/BytecodeCompiler.h"
 #include "frontend/ErrorReporter.h"
-#include "frontend/SharedContext.h"
 
 namespace js {
 
 namespace frontend {
 
 class ParserBase;
 
 // A data structure for tracking used names per parsing session in order to
@@ -288,20 +284,16 @@ class ParseContext : public Nestable<Par
             if (id_ == UINT32_MAX) {
                 pc->errorReporter_.reportErrorNoOffset(JSMSG_NEED_DIET, js_script_str);
                 return false;
             }
 
             return declared_.acquire(pc->sc()->context);
         }
 
-        bool isEmpty() const {
-            return declared_->all().empty();
-        }
-
         DeclaredNamePtr lookupDeclaredName(JSAtom* name) {
             return declared_->lookup(name);
         }
 
         AddDeclaredNamePtr lookupDeclaredNameForAdd(JSAtom* name) {
             return declared_->lookupForAdd(name);
         }
 
@@ -405,17 +397,16 @@ class ParseContext : public Nestable<Par
 
         inline BindingIter bindings(ParseContext* pc);
     };
 
     class VarScope : public Scope
     {
       public:
         explicit inline VarScope(ParserBase* parser);
-        explicit inline VarScope(JSContext* cx, ParseContext* pc, UsedNameTracker& usedNames);
     };
 
   private:
     // Trace logging of parsing time.
     AutoFrontendTraceLog traceLog_;
 
     // Context shared between parsing and bytecode generation.
     SharedContext* sc_;
@@ -521,17 +512,16 @@ class ParseContext : public Nestable<Par
     }
 
     MOZ_MUST_USE bool init();
 
     SharedContext* sc() {
         return sc_;
     }
 
-    // `true` if we are in the body of a function definition.
     bool isFunctionBox() const {
         return sc_->isFunctionBox();
     }
 
     FunctionBox* functionBox() {
         return sc_->asFunctionBox();
     }
 
@@ -583,32 +573,16 @@ class ParseContext : public Nestable<Par
     AtomVector& positionalFormalParameterNames() {
         return *positionalFormalParameterNames_;
     }
 
     AtomVector& closedOverBindingsForLazy() {
         return *closedOverBindingsForLazy_;
     }
 
-    enum class BreakStatementError {
-        // Unlabeled break must be inside loop or switch.
-        ToughBreak,
-        LabelNotFound,
-    };
-
-    // Return Err(true) if we have encountered at least one loop,
-    // Err(false) otherwise.
-    MOZ_MUST_USE inline JS::Result<Ok, BreakStatementError> checkBreakStatement(PropertyName* label);
-
-    enum class ContinueStatementError {
-        NotInALoop,
-        LabelNotFound,
-    };
-    MOZ_MUST_USE inline JS::Result<Ok, ContinueStatementError> checkContinueStatement(PropertyName* label);
-
     // True if we are at the topmost level of a entire script or function body.
     // For example, while parsing this code we would encounter f1 and f2 at
     // body level, but we would not encounter f3 or f4 at body level:
     //
     //   function f1() { function f2() { } }
     //   if (cond) { function f3() { if (cond) { function f4() { } } } }
     //
     bool atBodyLevel() {
--- a/js/src/frontend/ParseNode.h
+++ b/js/src/frontend/ParseNode.h
@@ -8,37 +8,16 @@
 #define frontend_ParseNode_h
 
 #include "mozilla/Attributes.h"
 
 #include "builtin/ModuleObject.h"
 #include "frontend/TokenStream.h"
 #include "vm/Printer.h"
 
-// A few notes on lifetime of ParseNode trees:
-//
-// - All the `ParseNode` instances MUST BE explicitly allocated in the context's `LifoAlloc`.
-//   This is typically implemented by the `FullParseHandler` or it can be reimplemented with
-//   a custom `new_`.
-//
-// - The tree is bulk-deallocated when the parser is deallocated. Consequently, references
-//   to a subtree MUST NOT exist once the parser has been deallocated.
-//
-// - This bulk-deallocation DOES NOT run destructors.
-//
-// - Instances of `LexicalScope::Data` MUST BE allocated as instances of `ParseNode`, in the same
-//   `LifoAlloc`. They are bulk-deallocated alongside the rest of the tree.
-//
-// - Instances of `JSAtom` used throughout the tree (including instances of `PropertyName`) MUST
-//   be kept alive by the parser. This is done through an instance of `AutoKeepAtoms` held by
-//   the parser.
-//
-// - Once the parser is deallocated, the `JSAtom` instances MAY be garbage-collected.
-
-
 namespace js {
 namespace frontend {
 
 class ParseContext;
 class FullParseHandler;
 class FunctionBox;
 class ObjectBox;
 
@@ -614,17 +593,16 @@ class ParseNode
     /*
      * If |left| is a list of the given kind/left-associative op, append
      * |right| to it and return |left|.  Otherwise return a [left, right] list.
      */
     static ParseNode*
     appendOrCreateList(ParseNodeKind kind, ParseNode* left, ParseNode* right,
                        FullParseHandler* handler, ParseContext* pc);
 
-    // include "ParseNode-inl.h" for these methods.
     inline PropertyName* name() const;
     inline JSAtom* atom() const;
 
     ParseNode* expr() const {
         MOZ_ASSERT(pn_arity == PN_NAME || pn_arity == PN_CODE);
         return pn_expr;
     }
 
@@ -748,22 +726,18 @@ class ParseNode
         pn_pos.end = pn->pn_pos.end;
         pn_head = pn;
         pn_tail = &pn->pn_next;
         pn_count = 1;
         pn_xflags = 0;
     }
 
     void append(ParseNode* pn) {
+        MOZ_ASSERT(pn_arity == PN_LIST);
         MOZ_ASSERT(pn->pn_pos.begin >= pn_pos.begin);
-        appendWithoutOrderAssumption(pn);
-    }
-
-    void appendWithoutOrderAssumption(ParseNode* pn) {
-        MOZ_ASSERT(pn_arity == PN_LIST);
         pn_pos.end = pn->pn_pos.end;
         *pn_tail = pn;
         pn_tail = &pn->pn_next;
         pn_count++;
     }
 
     void prepend(ParseNode* pn) {
         MOZ_ASSERT(pn_arity == PN_LIST);
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -38,17 +38,16 @@
 #include "frontend/TokenStream.h"
 #include "irregexp/RegExpParser.h"
 #include "vm/RegExpObject.h"
 #include "wasm/AsmJS.h"
 
 #include "jsatominlines.h"
 #include "jsscriptinlines.h"
 
-#include "frontend/ParseContext-inl.h"
 #include "frontend/ParseNode-inl.h"
 #include "vm/EnvironmentObject-inl.h"
 
 using namespace js;
 using namespace js::gc;
 
 using mozilla::Maybe;
 using mozilla::Move;
@@ -1715,33 +1714,32 @@ Parser<FullParseHandler, CharT>::checkSt
     if (tt != TOK_EOF) {
         error(JSMSG_UNEXPECTED_TOKEN, "expression", TokenKindToDesc(tt));
         return false;
     }
     return true;
 }
 
 template <typename Scope>
-typename Scope::Data*
+static typename Scope::Data*
 NewEmptyBindingData(JSContext* cx, LifoAlloc& alloc, uint32_t numBindings)
 {
     size_t allocSize = Scope::sizeOfData(numBindings);
     typename Scope::Data* bindings = static_cast<typename Scope::Data*>(alloc.alloc(allocSize));
     if (!bindings) {
         ReportOutOfMemory(cx);
         return nullptr;
     }
     PodZero(bindings);
     return bindings;
 }
 
 Maybe<GlobalScope::Data*>
-NewGlobalScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc)
-{
-
+ParserBase::newGlobalScopeData(ParseContext::Scope& scope)
+{
     Vector<BindingName> funs(context);
     Vector<BindingName> vars(context);
     Vector<BindingName> lets(context);
     Vector<BindingName> consts(context);
 
     bool allBindingsClosedOver = pc->sc()->allBindingsClosedOver();
     for (BindingIter bi = scope.bindings(pc); bi; bi++) {
         BindingName binding(bi.name(), allBindingsClosedOver || bi.closedOver());
@@ -1794,24 +1792,18 @@ NewGlobalScopeData(JSContext* context, P
         bindings->constStart = cursor - start;
         PodCopy(cursor, consts.begin(), consts.length());
         bindings->length = numBindings;
     }
 
     return Some(bindings);
 }
 
-Maybe<GlobalScope::Data*>
-ParserBase::newGlobalScopeData(ParseContext::Scope& scope)
-{
-    return NewGlobalScopeData(context, scope, alloc, pc);
-}
-
 Maybe<ModuleScope::Data*>
-NewModuleScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc)
+ParserBase::newModuleScopeData(ParseContext::Scope& scope)
 {
     Vector<BindingName> imports(context);
     Vector<BindingName> vars(context);
     Vector<BindingName> lets(context);
     Vector<BindingName> consts(context);
 
     bool allBindingsClosedOver = pc->sc()->allBindingsClosedOver();
     for (BindingIter bi = scope.bindings(pc); bi; bi++) {
@@ -1866,24 +1858,18 @@ NewModuleScopeData(JSContext* context, P
         bindings->constStart = cursor - start;
         PodCopy(cursor, consts.begin(), consts.length());
         bindings->length = numBindings;
     }
 
     return Some(bindings);
 }
 
-Maybe<ModuleScope::Data*>
-ParserBase::newModuleScopeData(ParseContext::Scope& scope)
-{
-    return NewModuleScopeData(context, scope, alloc, pc);
-}
-
 Maybe<EvalScope::Data*>
-NewEvalScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc)
+ParserBase::newEvalScopeData(ParseContext::Scope& scope)
 {
     Vector<BindingName> funs(context);
     Vector<BindingName> vars(context);
 
     for (BindingIter bi = scope.bindings(pc); bi; bi++) {
         // Eval scopes only contain 'var' bindings. Make all bindings aliased
         // for now.
         MOZ_ASSERT(bi.kind() == BindingKind::Var);
@@ -1916,24 +1902,18 @@ NewEvalScopeData(JSContext* context, Par
         bindings->varStart = cursor - start;
         PodCopy(cursor, vars.begin(), vars.length());
         bindings->length = numBindings;
     }
 
     return Some(bindings);
 }
 
-Maybe<EvalScope::Data*>
-ParserBase::newEvalScopeData(ParseContext::Scope& scope)
-{
-    return NewEvalScopeData(context, scope, alloc, pc);
-}
-
 Maybe<FunctionScope::Data*>
-NewFunctionScopeData(JSContext* context, ParseContext::Scope& scope, bool hasParameterExprs, LifoAlloc& alloc, ParseContext* pc)
+ParserBase::newFunctionScopeData(ParseContext::Scope& scope, bool hasParameterExprs)
 {
     Vector<BindingName> positionalFormals(context);
     Vector<BindingName> formals(context);
     Vector<BindingName> vars(context);
 
     bool allBindingsClosedOver = pc->sc()->allBindingsClosedOver();
     bool hasDuplicateParams = pc->functionBox()->hasDuplicateParameters;
 
@@ -2016,24 +1996,18 @@ NewFunctionScopeData(JSContext* context,
         bindings->varStart = cursor - start;
         PodCopy(cursor, vars.begin(), vars.length());
         bindings->length = numBindings;
     }
 
     return Some(bindings);
 }
 
-Maybe<FunctionScope::Data*>
-ParserBase::newFunctionScopeData(ParseContext::Scope& scope, bool hasParameterExprs)
-{
-    return NewFunctionScopeData(context, scope, hasParameterExprs, alloc, pc);
-}
-
 Maybe<VarScope::Data*>
-NewVarScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc)
+ParserBase::newVarScopeData(ParseContext::Scope& scope)
 {
     Vector<BindingName> vars(context);
 
     bool allBindingsClosedOver = pc->sc()->allBindingsClosedOver();
 
     for (BindingIter bi = scope.bindings(pc); bi; bi++) {
         BindingName binding(bi.name(), allBindingsClosedOver || bi.closedOver());
         if (!vars.append(binding))
@@ -2054,24 +2028,18 @@ NewVarScopeData(JSContext* context, Pars
 
         PodCopy(cursor, vars.begin(), vars.length());
         bindings->length = numBindings;
     }
 
     return Some(bindings);
 }
 
-Maybe<VarScope::Data*>
-ParserBase::newVarScopeData(ParseContext::Scope& scope)
-{
-    return NewVarScopeData(context, scope, alloc, pc);
-}
-
 Maybe<LexicalScope::Data*>
-NewLexicalScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc)
+ParserBase::newLexicalScopeData(ParseContext::Scope& scope)
 {
     Vector<BindingName> lets(context);
     Vector<BindingName> consts(context);
 
     // Unlike other scopes with bindings which are body-level, it is unknown
     // if pc->sc()->allBindingsClosedOver() is correct at the time of
     // finishing parsing a lexical scope.
     //
@@ -2111,22 +2079,16 @@ NewLexicalScopeData(JSContext* context, 
         bindings->constStart = cursor - start;
         PodCopy(cursor, consts.begin(), consts.length());
         bindings->length = numBindings;
     }
 
     return Some(bindings);
 }
 
-Maybe<LexicalScope::Data*>
-ParserBase::newLexicalScopeData(ParseContext::Scope& scope)
-{
-    return NewLexicalScopeData(context, scope, alloc, pc);
-}
-
 template <typename CharT>
 SyntaxParseHandler::Node
 Parser<SyntaxParseHandler, CharT>::finishLexicalScope(ParseContext::Scope& scope, Node body)
 {
     if (!propagateFreeNamesAndMarkClosedOverBindings(scope))
         return null();
 
     return body;
@@ -6581,26 +6543,54 @@ GeneralParser<ParseHandler, CharT>::cont
 {
     MOZ_ASSERT(anyChars.isCurrentTokenType(TOK_CONTINUE));
     uint32_t begin = pos().begin;
 
     RootedPropertyName label(context);
     if (!matchLabel(yieldHandling, &label))
         return null();
 
-    auto validity = pc->checkContinueStatement(label);
-    if (validity.isErr()) {
-        switch (validity.unwrapErr()) {
-          case ParseContext::ContinueStatementError::NotInALoop:
-            errorAt(begin, JSMSG_BAD_CONTINUE);
-            break;
-          case ParseContext::ContinueStatementError::LabelNotFound:
-            error(JSMSG_LABEL_NOT_FOUND);
-            break;
-        }
+    // Labeled 'continue' statements target the nearest labeled loop
+    // statements with the same label. Unlabeled 'continue' statements target
+    // the innermost loop statement.
+    auto isLoop = [](ParseContext::Statement* stmt) {
+        return StatementKindIsLoop(stmt->kind());
+    };
+
+    if (label) {
+        ParseContext::Statement* stmt = pc->innermostStatement();
+        bool foundLoop = false;
+
+        for (;;) {
+            stmt = ParseContext::Statement::findNearest(stmt, isLoop);
+            if (!stmt) {
+                if (foundLoop)
+                    error(JSMSG_LABEL_NOT_FOUND);
+                else
+                    errorAt(begin, JSMSG_BAD_CONTINUE);
+                return null();
+            }
+
+            foundLoop = true;
+
+            // Is it labeled by our label?
+            bool foundTarget = false;
+            stmt = stmt->enclosing();
+            while (stmt && stmt->is<ParseContext::LabelStatement>()) {
+                if (stmt->as<ParseContext::LabelStatement>().label() == label) {
+                    foundTarget = true;
+                    break;
+                }
+                stmt = stmt->enclosing();
+            }
+            if (foundTarget)
+                break;
+        }
+    } else if (!pc->findInnermostStatement(isLoop)) {
+        error(JSMSG_BAD_CONTINUE);
         return null();
     }
 
     if (!matchOrInsertSemicolon())
         return null();
 
     return handler.newContinueStatement(label, TokenPos(begin, pos().end));
 }
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -44,16 +44,30 @@ public:
     template<typename ParseHandler, typename CharT>
     SourceParseContext(GeneralParser<ParseHandler, CharT>* prs, SharedContext* sc,
                        Directives* newDirectives)
       : ParseContext(prs->context, prs->pc, sc, prs->anyChars, prs->usedNames, newDirectives,
                      mozilla::IsSame<ParseHandler, FullParseHandler>::value)
     { }
 };
 
+template <>
+inline bool
+ParseContext::Statement::is<ParseContext::LabelStatement>() const
+{
+    return kind_ == StatementKind::Label;
+}
+
+template <>
+inline bool
+ParseContext::Statement::is<ParseContext::ClassStatement>() const
+{
+    return kind_ == StatementKind::Class;
+}
+
 template <typename T>
 inline T&
 ParseContext::Statement::as()
 {
     MOZ_ASSERT(is<T>());
     return static_cast<T&>(*this);
 }
 
@@ -252,23 +266,16 @@ ParseContext::Scope::Scope(JSContext* cx
 
 inline
 ParseContext::VarScope::VarScope(ParserBase* parser)
   : Scope(parser)
 {
     useAsVarScope(parser->pc);
 }
 
-inline
-ParseContext::VarScope::VarScope(JSContext* cx, ParseContext* pc, UsedNameTracker& usedNames)
-  : Scope(cx, pc, usedNames)
-{
-    useAsVarScope(pc);
-}
-
 enum class ExpressionClosure { Allowed, Forbidden };
 
 template<class Parser>
 class ParserAnyCharsAccess
 {
   public:
     using TokenStreamSpecific = typename Parser::TokenStream;
     using TokenStreamChars = typename TokenStreamSpecific::CharsBase;
@@ -1277,27 +1284,12 @@ class MOZ_STACK_CLASS AutoAwaitIsKeyword
             parser_->setAwaitHandling(awaitHandling);
     }
 
     ~AutoAwaitIsKeyword() {
         parser_->setAwaitHandling(oldAwaitHandling_);
     }
 };
 
-template <typename Scope>
-extern typename Scope::Data*
-NewEmptyBindingData(JSContext* cx, LifoAlloc& alloc, uint32_t numBindings);
-
-Maybe<GlobalScope::Data*>
-NewGlobalScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc);
-Maybe<EvalScope::Data*>
-NewEvalScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc);
-Maybe<FunctionScope::Data*>
-NewFunctionScopeData(JSContext* context, ParseContext::Scope& scope, bool hasParameterExprs, LifoAlloc& alloc, ParseContext* pc);
-Maybe<VarScope::Data*>
-NewVarScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc);
-Maybe<LexicalScope::Data*>
-NewLexicalScopeData(JSContext* context, ParseContext::Scope& scope, LifoAlloc& alloc, ParseContext* pc);
-
 } /* namespace frontend */
 } /* namespace js */
 
 #endif /* frontend_Parser_h */
--- a/js/src/frontend/SharedContext.h
+++ b/js/src/frontend/SharedContext.h
@@ -10,24 +10,22 @@
 #include "jsatom.h"
 #include "jsopcode.h"
 #include "jspubtd.h"
 #include "jsscript.h"
 #include "jstypes.h"
 
 #include "builtin/ModuleObject.h"
 #include "ds/InlineTable.h"
-#include "frontend/ParseNode.h"
 #include "frontend/TokenStream.h"
 #include "vm/EnvironmentObject.h"
 
 namespace js {
 namespace frontend {
 
-class ParseContext;
 class ParseNode;
 
 enum class StatementKind : uint8_t
 {
     Label,
     Block,
     If,
     Switch,
--- a/js/src/gc/RootMarking.cpp
+++ b/js/src/gc/RootMarking.cpp
@@ -148,22 +148,16 @@ JS_FOR_EACH_TRACEKIND(FINISH_ROOT_LIST)
 inline void
 AutoGCRooter::trace(JSTracer* trc)
 {
     switch (tag_) {
       case PARSER:
         frontend::TraceParser(trc, this);
         return;
 
-#if defined(JS_BUILD_BINAST)
-      case BINPARSER:
-        frontend::TraceBinParser(trc, this);
-        return;
-#endif // defined(JS_BUILD_BINAST)
-
       case VALARRAY: {
         /*
          * We don't know the template size parameter, but we can safely treat it
          * as an AutoValueArray<1> because the length is stored separately.
          */
         AutoValueArray<1>* array = static_cast<AutoValueArray<1>*>(this);
         TraceRootRange(trc, array->length(), array->begin(), "js::AutoValueArray");
         return;
--- a/js/src/irregexp/RegExpEngine.cpp
+++ b/js/src/irregexp/RegExpEngine.cpp
@@ -2318,18 +2318,17 @@ BoyerMoorePositionInfo::SetInterval(cons
     if (interval.to() - interval.from() >= kMapSize - 1) {
         if (map_count_ != kMapSize) {
             map_count_ = kMapSize;
             for (int i = 0; i < kMapSize; i++)
                 map_[i] = true;
         }
         return;
     }
-    MOZ_ASSERT(interval.from() <= interval.to());
-    for (int i = interval.from(); i != interval.to() + 1; i++) {
+    for (int i = interval.from(); i <= interval.to(); i++) {
         int mod_character = (i & kMask);
         if (!map_[mod_character]) {
             map_count_++;
             map_[mod_character] = true;
         }
         if (map_count_ == kMapSize)
             return;
     }
deleted file mode 100644
index 925b6d52d433c088dc5154744a079d04e936aeef..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/StrictEquality-001.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          StrictEquality-001.js
- *  ECMA Section:       11.9.6.js
- *  Description:
- *
- *  Author:             christine@netscape.com
- *  Date:               4 september 1998
- */
-var SECTION = "StrictEquality-001 - 11.9.6";
-var VERSION = "ECMA_2";
-var TITLE   =  "The strict equality operator ( === )";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-
-// 1. If Type(x) is different from Type(y) return false
-
-StrictEquality( true, new Boolean(true), false );
-StrictEquality( new Boolean(), false, false );
-StrictEquality( "", new String(),    false );
-StrictEquality( new String("hi"), "hi", false );
-
-// 2. If Type(x) is not Number go to step 9.
-
-// 3. If x is NaN, return false
-StrictEquality( NaN, NaN,   false );
-StrictEquality( NaN, 0,     false );
-
-// 4. If y is NaN, return false.
-StrictEquality( 0,  NaN,    false );
-
-// 5. if x is the same number value as y, return true
-
-// 6. If x is +0 and y is -0, return true
-
-// 7. If x is -0 and y is +0, return true
-
-// 8. Return false.
-
-
-// 9.  If Type(x) is String, then return true if x and y are exactly
-//  the same sequence of characters ( same length and same characters
-//  in corresponding positions.) Otherwise return false.
-
-//  10. If Type(x) is Boolean, return true if x and y are both true or
-//  both false. otherwise return false.
-
-
-//  Return true if x and y refer to the same object.  Otherwise return
-//  false.
-
-// Return false.
-
-
-test();
-
-function StrictEquality( x, y, expect ) {
-  result = ( x === y );
-
-  new TestCase(
-    SECTION,
-    x +" === " + y,
-    expect,
-    result );
-}
-
deleted file mode 100644
index f94932cbb4a44f278460e80be0fb269addbe2dff..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/apply-001-n.js
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-print("STATUS: f.apply crash test.");
-
-print("BUGNUMBER: 21836");
-
-function f ()
-{
-}
-
-var SECTION = "apply-001-n";
-var VERSION = "ECMA_1";
-startTest();
-var TITLE   = "f.apply(2,2) doesn't crash";
-
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-DESCRIPTION = "f.apply(2,2) doesn't crash";
-EXPECTED = "error";
-
-new TestCase( SECTION,  "f.apply(2,2) doesn't crash",     "error",    eval("f.apply(2,2)") );
-
-test();
-
-
deleted file mode 100644
index a724010a7b3799aefaa8ad782dab6ceca9bd139e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/boolean-001.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          boolean-001.js
-   Description:        Corresponds to ecma/Boolean/15.6.4.2-4-n.js
-
-   The toString function is not generic; it generates
-   a runtime error if its this value is not a Boolean
-   object.  Therefore it cannot be transferred to other
-   kinds of objects for use as a method.
-
-   Author:             christine@netscape.com
-   Date:               june 27, 1997
-*/
-var SECTION = "boolean-001.js";
-var VERSION = "JS1_4";
-var TITLE   = "Boolean.prototype.toString()";
-startTest();
-writeHeaderToLog( SECTION +" "+ TITLE );
-
-var exception = "No exception thrown";
-var result = "Failed";
-
-var TO_STRING = Boolean.prototype.toString;
-
-try {
-  var s = new String("Not a Boolean");
-  s.toString = TO_STRING;
-  s.toString();
-} catch ( e ) {
-  result = "Passed!";
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "Assigning Boolean.prototype.toString to a String object "+
-  "(threw " +exception +")",
-  "Passed!",
-  result );
-
-test();
-
deleted file mode 100644
index a52b8a39dfdd3439994c3e4fee0861d161194ac1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/boolean-002.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          boolean-001.js
-   Description:        Corresponds to ecma/Boolean/15.6.4.3-4-n.js
-
-   15.6.4.3 Boolean.prototype.valueOf()
-   Returns this boolean value.
-
-   The valueOf function is not generic; it generates
-   a runtime error if its this value is not a Boolean
-   object.  Therefore it cannot be transferred to other
-   kinds of objects for use as a method.
-
-   Author:             christine@netscape.com
-   Date:               09 september 1998
-*/
-var SECTION = "boolean-002.js";
-var VERSION = "JS1_4";
-var TITLE   = "Boolean.prototype.valueOf()";
-startTest();
-writeHeaderToLog( SECTION +" "+ TITLE );
-
-
-var exception = "No exception thrown";
-var result = "Failed";
-
-var VALUE_OF = Boolean.prototype.valueOf;
-
-try {
-  var s = new String("Not a Boolean");
-  s.valueOf = VALUE_0F;
-  s.valueOf();
-} catch ( e ) {
-  result = "Passed!";
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "Assigning Boolean.prototype.valueOf to a String object "+
-  "(threw " +exception +")",
-  "Passed!",
-  result );
-
-test();
-
deleted file mode 100644
index c695c8be4ef547bd7005592da25172bb4ad5f837..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/call-1.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          call-1.js
-   Section:            Function.prototype.call
-   Description:
-
-
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "call-1";
-var VERSION = "ECMA_2";
-var TITLE   = "Function.prototype.call";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-new TestCase( SECTION,
-	      "ConvertToString.call(this, this)",
-	      GLOBAL,
-	      ConvertToString.call(this, this));
-
-new TestCase( SECTION,
-	      "ConvertToString.call(Boolean, Boolean.prototype)",
-	      "false",
-	      ConvertToString.call(Boolean, Boolean.prototype));
-
-new TestCase( SECTION,
-	      "ConvertToString.call(Boolean, Boolean.prototype.valueOf())",
-	      "false",
-	      ConvertToString.call(Boolean, Boolean.prototype.valueOf()));
-
-test();
-
-function ConvertToString(obj) {
-  return obj +"";
-}
deleted file mode 100644
index 0fb83e3759f878f95966ec2a96c440197bd6bf63..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/constructor-001.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          RegExp/constructor-001.js
- *  ECMA Section:       15.7.3.3
- *  Description:        Based on ECMA 2 Draft 7 February 1999
- *
- *  Author:             christine@netscape.com
- *  Date:               19 February 1999
- */
-var SECTION = "RegExp/constructor-001";
-var VERSION = "ECMA_2";
-var TITLE   = "new RegExp()";
-
-startTest();
-
-/*
- * for each test case, verify:
- * - verify that [[Class]] property is RegExp
- * - prototype property should be set to RegExp.prototype
- * - source is set to the empty string
- * - global property is set to false
- * - ignoreCase property is set to false
- * - multiline property is set to false
- * - lastIndex property is set to 0
- */
-
-RegExp.prototype.getClassProperty = Object.prototype.toString;
-var re = new RegExp();
-
-AddTestCase(
-  "RegExp.prototype.getClassProperty = Object.prototype.toString; " +
-  "(new RegExp()).getClassProperty()",
-  "[object RegExp]",
-  re.getClassProperty() );
-
-AddTestCase(
-  "(new RegExp()).source",
-  "(?:)",
-  re.source );
-
-AddTestCase(
-  "(new RegExp()).global",
-  false,
-  re.global );
-
-AddTestCase(
-  "(new RegExp()).ignoreCase",
-  false,
-  re.ignoreCase );
-
-AddTestCase(
-  "(new RegExp()).multiline",
-  false,
-  re.multiline );
-
-AddTestCase(
-  "(new RegExp()).lastIndex",
-  0,
-  re.lastIndex );
-
-test()
deleted file mode 100644
index f79e4756def10a0baceafd9b732d10b198773592..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/date-002.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          date-002.js
-   Corresponds To:     15.9.5.23-3-n.js
-   ECMA Section:       15.9.5.23
-   Description:        Date.prototype.setTime
-
-   1.  If the this value is not a Date object, generate a runtime error.
-   2.  Call ToNumber(time).
-   3.  Call TimeClip(Result(1)).
-   4.  Set the [[Value]] property of the this value to Result(2).
-   5.  Return the value of the [[Value]] property of the this value.
-
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "date-002";
-var VERSION = "JS1_4";
-var TITLE   = "Date.prototype.setTime()";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  var MYDATE = new MyDate();
-  result = MYDATE.setTime(0);
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "MYDATE = new MyDate(); MYDATE.setTime(0)" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
-
-function MyDate(value) {
-  this.value = value;
-  this.setTime = Date.prototype.setTime;
-  return this;
-}
deleted file mode 100644
index 206cfa318f41de9cc31b42acb195b2a1bb5ff0f6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/date-003.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          date-003.js
-   Corresponds To      15.9.5.3-1.js
-   ECMA Section:       15.9.5.3-1 Date.prototype.valueOf
-   Description:
-
-   The valueOf function returns a number, which is this time value.
-
-   The valueOf function is not generic; it generates a runtime error if
-   its this value is not a Date object.  Therefore it cannot be transferred
-   to other kinds of objects for use as a method.
-
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "date-003";
-var VERSION = "JS1_4";
-var TITLE   = "Date.prototype.valueOf";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  var OBJ = new MyObject( new Date(0) );
-  result = OBJ.valueOf();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "OBJ = new MyObject( new Date(0)); OBJ.valueOf()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
-
-function MyObject( value ) {
-  this.value = value;
-  this.valueOf = Date.prototype.valueOf;
-//  The following line causes an infinte loop
-//    this.toString = new Function( "return this+\"\";");
-  return this;
-}
deleted file mode 100644
index 75e32116f50ba886aaca695cd325485fd07f71c1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/date-004.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          date-004.js
-   Corresponds To:     15.9.5.4-2-n.js
-   ECMA Section:       15.9.5.4-1 Date.prototype.getTime
-   Description:
-
-   1.  If the this value is not an object whose [[Class]] property is "Date",
-   generate a runtime error.
-   2.  Return this time value.
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "date-004";
-var VERSION = "JS1_4";
-var TITLE   = "Date.prototype.getTime";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  var MYDATE = new MyDate();
-  result = MYDATE.getTime();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "MYDATE = new MyDate(); MYDATE.getTime()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
-
-function MyDate( value ) {
-  this.value = value;
-  this.getTime = Date.prototype.getTime;
-}
deleted file mode 100644
index c606d8345fbfeb7256a42cccf4d6285fda744ecb..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-001.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-001
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *
- *
- *  Author:             christine@netscape.com
- *  Date:               11 August 1998
- */
-var SECTION = "dowhile-002";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while with a labeled continue statement";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-LabeledContinue( 0, 1 );
-LabeledContinue( 1, 1 );
-LabeledContinue( -1, 1 );
-LabeledContinue( 5, 5 );
-
-test();
-
-function LabeledContinue( limit, expect ) {
-  i = 0;
-woohoo:
-  do {
-    i++;
-    continue woohoo;
-  } while ( i < limit );
-
-  new TestCase(
-    SECTION,
-    "do while ( " + i +" < " + limit +" )",
-    expect,
-    i );
-}
deleted file mode 100644
index 9b80e1fcd76b00b0e9aae05ef5531336982e6ed0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-002.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-002
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *  Verify that code after a labeled break is not executed.  Verify that
- *  a labeled break breaks you out of the whole labeled block, and not
- *  just the current iteration statement.
- *
- *  Author:             christine@netscape.com
- *  Date:               11 August 1998
- */
-var SECTION = "dowhile-002";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while with a labeled continue statement";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-LabeledContinue( 0, 1 );
-LabeledContinue( 1, 1 );
-LabeledContinue( -1, 1 );
-LabeledContinue( 5, 5 );
-
-test();
-
-// The labeled statement contains statements after the labeled break.
-// Verify that the statements after the break are not executed.
-
-function LabeledContinue( limit, expect ) {
-  i = 0;
-  result1 = "pass";
-  result2 = "pass";
-
-woohoo: {
-    do {
-      i++;
-      if ( ! (i < limit) ) {
-	break woohoo;
-	result1 = "fail: evaluated statement after a labeled break";
-      }
-    } while ( true );
-
-    result2 = "failed:  broke out of loop, but not out of labeled block";
-  }
-
-  new TestCase(
-    SECTION,
-    "do while ( " + i +" < " + limit +" )",
-    expect,
-    i );
-
-  new TestCase(
-    SECTION,
-    "breaking out of a do... while loop",
-    "pass",
-    result1 );
-
-
-  new TestCase(
-    SECTION,
-    "breaking out of a labeled do...while loop",
-    "pass",
-    result2 );
-}
deleted file mode 100644
index 57436770bd007f90b3e4420eb03ed8e7257e2be7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-003.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-003
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *  Test do while, when the while expression is a JavaScript Number object.
- *
- *
- *  Author:             christine@netscape.com
- *  Date:               11 August 1998
- */
-var SECTION = "dowhile-003";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while with a labeled continue statement";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-DoWhile( new DoWhileObject( 1, 1, 0 ));
-DoWhile( new DoWhileObject( 1000, 1000, 0 ));
-DoWhile( new DoWhileObject( 1001, 1001, 0 ));
-DoWhile( new DoWhileObject( 1002, 1001, 1 ));
-DoWhile( new DoWhileObject( -1, 1001, -1002 ));
-
-test();
-
-function DoWhileObject( value, iterations, endvalue ) {
-  this.value = value;
-  this.iterations = iterations;
-  this.endvalue = endvalue;
-}
-
-function DoWhile( object ) {
-  var i = 0;
-
-  do {
-    object.value =  --object.value;
-    i++;
-    if ( i > 1000 )
-      break;
-  } while( object.value );
-
-  new TestCase(
-    SECTION,
-    "loop iterations",
-    object.iterations,
-    i
-    );
-
-  new TestCase(
-    SECTION,
-    "object.value",
-    object.endvalue,
-    Number( object.value )
-    );
-
-}
deleted file mode 100644
index e2b7f4de99b53c54df059a4e92ca524cd9878d59..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-004.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-004
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *  Test a labeled do...while.  Break out of the loop with no label
- *  should break out of the loop, but not out of the label.
- *
- *  Author:             christine@netscape.com
- *  Date:               11 August 1998
- */
-var SECTION = "dowhile-004";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while with a labeled continue statement";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-DoWhile( 0, 1 );
-DoWhile( 1, 1 );
-DoWhile( -1, 1 );
-DoWhile( 5, 5 );
-
-test();
-
-function DoWhile( limit, expect ) {
-  i = 0;
-  result1 = "pass";
-  result2 = "failed: broke out of labeled statement unexpectedly";
-
-foo: {
-    do {
-      i++;
-      if ( ! (i < limit) ) {
-	break;
-	result1 = "fail: evaluated statement after a labeled break";
-      }
-    } while ( true );
-
-    result2 = "pass";
-  }
-
-  new TestCase(
-    SECTION,
-    "do while ( " + i +" < " + limit +" )",
-    expect,
-    i );
-
-  new TestCase(
-    SECTION,
-    "breaking out of a do... while loop",
-    "pass",
-    result1 );
-
-
-  new TestCase(
-    SECTION,
-    "breaking out of a labeled do...while loop",
-    "pass",
-    result2 );
-}
deleted file mode 100644
index 3e1e3c360f294c87ce6f2ddd74357e174153ce5f..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-005.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-005
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *  Test a labeled do...while.  Break out of the loop with no label
- *  should break out of the loop, but not out of the label.
- *
- *  Currently causes an infinite loop in the monkey.  Uncomment the
- *  print statement below and it works OK.
- *
- *  Author:             christine@netscape.com
- *  Date:               26 August 1998
- */
-var SECTION = "dowhile-005";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while with a labeled continue statement";
-var BUGNUMBER = "316293";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-NestedLabel();
-
-
-test();
-
-function NestedLabel() {
-  i = 0;
-  result1 = "pass";
-  result2 = "fail: did not hit code after inner loop";
-  result3 = "pass";
-
-outer: {
-    do {
-    inner: {
-//                    print( i );
-	break inner;
-	result1 = "fail: did break out of inner label";
-      }
-      result2 = "pass";
-      break outer;
-      print(i);
-    } while ( i++ < 100 );
-
-  }
-
-  result3 = "fail: did not break out of outer label";
-
-  new TestCase(
-    SECTION,
-    "number of loop iterations",
-    0,
-    i );
-
-  new TestCase(
-    SECTION,
-    "break out of inner loop",
-    "pass",
-    result1 );
-
-  new TestCase(
-    SECTION,
-    "break out of outer loop",
-    "pass",
-    result2 );
-}
deleted file mode 100644
index 7ab5fde070571e7caa03a24269f94f48da7076e1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-006.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-006
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *  A general do...while test.
- *
- *  Author:             christine@netscape.com
- *  Date:               26 August 1998
- */
-var SECTION = "dowhile-006";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-DoWhile( new DoWhileObject( false, false, 10 ) );
-DoWhile( new DoWhileObject( true, false, 2 ) );
-DoWhile( new DoWhileObject( false, true, 3 ) );
-DoWhile( new DoWhileObject( true, true, 4 ) );
-
-test();
-
-function looping( object ) {
-  object.iterations--;
-
-  if ( object.iterations <= 0 ) {
-    return false;
-  } else {
-    return true;
-  }
-}
-function DoWhileObject( breakOut, breakIn, iterations, loops ) {
-  this.iterations = iterations;
-  this.loops = loops;
-  this.breakOut = breakOut;
-  this.breakIn  = breakIn;
-  this.looping  = looping;
-}
-function DoWhile( object ) {
-  var result1 = false;
-  var result2 = false;
-
-outie: {
-  innie: {
-      do {
-	if ( object.breakOut )
-	  break outie;
-
-	if ( object.breakIn )
-	  break innie;
-
-      } while ( looping(object) );
-
-      //  statements should be executed if:
-      //  do...while exits normally
-      //  do...while exits abruptly with no label
-
-      result1 = true;
-
-    }
-
-//  statements should be executed if:
-//  do...while breaks out with label "innie"
-//  do...while exits normally
-//  do...while does not break out with "outie"
-
-    result2 = true;
-  }
-
-  new TestCase(
-    SECTION,
-    "hit code after loop in inner loop",
-    ( object.breakIn || object.breakOut ) ? false : true ,
-    result1 );
-
-  new TestCase(
-    SECTION,
-    "hit code after loop in outer loop",
-    ( object.breakOut ) ? false : true,
-    result2 );
-}
deleted file mode 100644
index 6e4eae5cd16fa481ce41886a094ae1193b2930f3..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/dowhile-007.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          dowhile-007
- *  ECMA Section:
- *  Description:        do...while statements
- *
- *  A general do...while test.
- *
- *  Author:             christine@netscape.com
- *  Date:               26 August 1998
- */
-var SECTION = "dowhile-007";
-var VERSION = "ECMA_2";
-var TITLE   = "do...while";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-DoWhile( new DoWhileObject( false, false, false, false ));
-DoWhile( new DoWhileObject( true, false, false, false ));
-DoWhile( new DoWhileObject( true, true, false, false ));
-DoWhile( new DoWhileObject( true, true, true, false ));
-DoWhile( new DoWhileObject( true, true, true, true ));
-DoWhile( new DoWhileObject( false, false, false, true ));
-DoWhile( new DoWhileObject( false, false, true, true ));
-DoWhile( new DoWhileObject( false, true, true, true ));
-DoWhile( new DoWhileObject( false, false, true, false ));
-
-test();
-
-function DoWhileObject( out1, out2, out3, in1 ) {
-  this.breakOutOne = out1;
-  this.breakOutTwo = out2;
-  this.breakOutThree = out3;
-  this.breakIn = in1;
-}
-function DoWhile( object ) {
-  result1 = false;
-  result2 = false;
-  result3 = false;
-  result4 = false;
-
-outie:
-  do {
-    if ( object.breakOutOne ) {
-      break outie;
-    }
-    result1 = true;
-
-  innie:
-    do {
-      if ( object.breakOutTwo ) {
-	break outie;
-      }
-      result2 = true;
-
-      if ( object.breakIn ) {
-	break innie;
-      }
-      result3 = true;
-
-    } while ( false );
-    if ( object.breakOutThree ) {
-      break outie;
-    }
-    result4 = true;
-  } while ( false );
-
-  new TestCase(
-    SECTION,
-    "break one: ",
-    (object.breakOutOne) ? false : true,
-    result1 );
-
-  new TestCase(
-    SECTION,
-    "break two: ",
-    (object.breakOutOne||object.breakOutTwo) ? false : true,
-    result2 );
-
-  new TestCase(
-    SECTION,
-    "break three: ",
-    (object.breakOutOne||object.breakOutTwo||object.breakIn) ? false : true,
-    result3 );
-
-  new TestCase(
-    SECTION,
-    "break four: ",
-    (object.breakOutOne||object.breakOutTwo||object.breakOutThree) ? false: true,
-    result4 );
-}
deleted file mode 100644
index 8ab757348fe2a72cf382c4fdf4aaffb7d1fbe7af..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-001.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-001
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  Call error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-001";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions:  CallError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-Call_1();
-
-test();
-
-function Call_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    Math();
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "Math() [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index 2a03114aa34971b4bab34be4985c222a69e171fa..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-002.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-002
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  Construct error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-002";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: ConstructError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-Construct_1();
-
-test();
-
-function Construct_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    result = new Math();
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "new Math() [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index f7fe5ad49b047e9d21df6a68485602b5fa80e5fc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-003.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-003
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  Target error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-003";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: TargetError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-Target_1();
-
-test();
-
-function Target_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    string = new String("hi");
-    string.toString = Boolean.prototype.toString;
-    string.toString();
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "string = new String(\"hi\");"+
-      "string.toString = Boolean.prototype.toString" +
-      "string.toString() [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index c8b2db4aad276c6a2ce96e58306b214ca8c2a35a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-004.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-004
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  ToObject error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-004";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: ToObjectError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-ToObject_1();
-
-test();
-
-function ToObject_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    result = foo["bar"];
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "foo[\"bar\"] [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index 7bb22fc467a9c75fc8dcdcef3e7ce6f17305f212..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-005.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-005
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  ToObject error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-005";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: ToObjectError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-ToObject_1();
-
-test();
-
-function ToObject_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    result = foo["bar"];
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "foo[\"bar\"] [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index 6413d212c5b6e39c3a490590cb5c06cfdad69b46..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-006.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-006
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  ToPrimitive error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-006";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: TypeError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-ToPrimitive_1();
-
-test();
-
-
-/**
- * Getting the [[DefaultValue]] of any instances of MyObject
- * should result in a runtime error in ToPrimitive.
- */
-
-function MyObject() {
-  this.toString = void 0;
-  this.valueOf = void 0;
-}
-
-function ToPrimitive_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    result = new MyObject() + new MyObject();
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "new MyObject() + new MyObject() [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index 163354107106e1edded8bcad68be50472d9f090d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-007.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-007
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  DefaultValue error.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-007";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions:  TypeError";
-var BUGNUMBER="318250";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-DefaultValue_1();
-
-test();
-
-
-/**
- * Getting the [[DefaultValue]] of any instances of MyObject
- * should result in a runtime error in ToPrimitive.
- */
-
-function MyObject() {
-  this.toString = void 0;
-  this.valueOf = new Object();
-}
-
-function DefaultValue_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    result = new MyObject() + new MyObject();
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "new MyObject() + new MyObject() [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
-
deleted file mode 100644
index 9e6209ca559176801ced6461aa9b9f0e425e4bce..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-008.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-008
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  SyntaxError.
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-008";
-var VERSION = "js1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: SyntaxError";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-Syntax_1();
-
-test();
-
-function Syntax_1() {
-  result = "failed: no exception thrown";
-  exception = null;
-
-  try {
-    result = eval("continue;");
-  } catch ( e ) {
-    result = "passed:  threw exception",
-      exception = e.toString();
-  } finally {
-    new TestCase(
-      SECTION,
-      "eval(\"continue\") [ exception is " + exception +" ]",
-      "passed:  threw exception",
-      result );
-  }
-}
deleted file mode 100644
index d53a931f8fb59f88eca6725b946088ccb6b25fbd..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-009.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          exception-009
- *  ECMA Section:
- *  Description:        Tests for JavaScript Standard Exceptions
- *
- *  Regression test for nested try blocks.
- *
- *  http://scopus.mcom.com/bugsplat/show_bug.cgi?id=312964
- *
- *  Author:             christine@netscape.com
- *  Date:               31 August 1998
- */
-var SECTION = "exception-009";
-var VERSION = "JS1_4";
-var TITLE   = "Tests for JavaScript Standard Exceptions: SyntaxError";
-var BUGNUMBER= "312964";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-try {
-  expect = "passed:  no exception thrown";
-  result = expect;
-  Nested_1();
-} catch ( e ) {
-  result = "failed: threw " + e;
-} finally {
-  new TestCase(
-    SECTION,
-    "nested try",
-    expect,
-    result );
-}
-
-
-test();
-
-function Nested_1() {
-  try {
-    try {
-    } catch (a) {
-    } finally {
-    }
-  } catch (b) {
-  } finally {
-  }
-}
deleted file mode 100644
index d6bb139bdc18614dd026a7afe89baec814b4d603..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-010-n.js
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-var SECTION = "exception-010";
-var VERSION = "ECMA_2";
-startTest();
-var TITLE   = "Don't Crash throwing null";
-
-writeHeaderToLog( SECTION + " "+ TITLE);
-print("Null throw test.");
-print("BUGNUMBER: 21799");
-
-DESCRIPTION = "throw null";
-EXPECTED = "error";
-
-new TestCase( SECTION,  "throw null",     "error",    eval("throw null" ));
-
-test();
-
-print("FAILED!: Should have exited with uncaught exception.");
-
-
deleted file mode 100644
index 8397356dc8f41ffc250635ba4bddcfc1ea417b31..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exception-011-n.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 4 -*-
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-var SECTION = "exception-011";
-var VERSION = "ECMA_2";
-startTest();
-var TITLE   = "Don't Crash throwing undefined";
-
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-print("Undefined throw test.");
-
-DESCRIPTION = "throw undefined";
-EXPECTED = "error";
-
-new TestCase( SECTION,  "throw undefined",  "error", eval("throw (void 0)") );
-
-test();
-
-print("FAILED!: Should have exited with uncaught exception.");
-
-
-
deleted file mode 100644
index bb8d1ab9678f78bbefa6ea0bc9ce0e749117b10a..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/exec-002.js
+++ /dev/null
@@ -1,188 +0,0 @@
-/* -*- tab-width: 2; indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
- *  File Name:          RegExp/exec-002.js
- *  ECMA Section:       15.7.5.3
- *  Description:        Based on ECMA 2 Draft 7 February 1999
- *
- *  Test cases provided by rogerl@netscape.com
- *
- *  Author:             christine@netscape.com
- *  Date:               19 February 1999
- */
-var SECTION = "RegExp/exec-002";
-var VERSION = "ECMA_2";
-var TITLE   = "RegExp.prototype.exec(string)";
-
-startTest();
-
-/*
- * for each test case, verify:
- * - type of object returned
- * - length of the returned array
- * - value of lastIndex
- * - value of index
- * - value of input
- * - value of the array indices
- */
-
-AddRegExpCases(
-  /(a|d|q|)x/i,
-  "bcaDxqy",
-  3,
-  ["Dx", "D"] );
-
-AddRegExpCases(
-  /(a|(e|q))(x|y)/,
-  "bcaddxqy",
-  6,
-  ["qy","q","q","y"] );
-
-
-AddRegExpCases(
-  /a+b+d/,
-  "aabbeeaabbs",
-  0,
-  null );
-
-AddRegExpCases(
-  /a*b/,
-  "aaadaabaaa",
-  4,
-  ["aab"] );
-
-AddRegExpCases(
-  /a*b/,
-  "dddb",
-  3,
-  ["b"] );
-
-AddRegExpCases(
-  /a*b/,
-  "xxx",
-  0,
-  null );
-
-AddRegExpCases(
-  /x\d\dy/,
-  "abcx45ysss235",
-  3,
-  ["x45y"] );
-
-AddRegExpCases(
-  /[^abc]def[abc]+/,
-  "abxdefbb",
-  2,
-  ["xdefbb"] );
-
-AddRegExpCases(
-  /(a*)baa/,
-  "ccdaaabaxaabaa",
-  9,
-  ["aabaa", "aa"] );
-
-AddRegExpCases(
-  /(a*)baa/,
-  "aabaa",
-  0,
-  ["aabaa", "aa"] );
-
-AddRegExpCases(
-  /q(a|b)*q/,
-  "xxqababqyy",
-  2,
-  ["qababq", "b"] );
-
-AddRegExpCases(
-  /(a(.|[^d])c)*/,
-  "adcaxc",
-  0,
-  ["adcaxc", "axc", "x"] );
-
-AddRegExpCases(
-  /(a*)b\1/,
-  "abaaaxaabaayy",
-  0,
-  ["aba", "a"] );
-
-AddRegExpCases(
-  /(a*)b\1/,
-  "abaaaxaabaayy",
-  0,
-  ["aba", "a"] );
-
-AddRegExpCases(
-  /(a*)b\1/,
-  "cccdaaabaxaabaayy",
-  6,
-  ["aba", "a"] );
-
-AddRegExpCases(
-  /(a*)b\1/,
-  "cccdaaabqxaabaayy",
-  7,
-  ["b", ""] );
-
-AddRegExpCases(
-  /"(.|[^"\\\\])*"/,
-        'xx\"makudonarudo\"yy',
-        2,
-        ["\"makudonarudo\"", "o"] );
-
-    AddRegExpCases(
-        /"(.|[^"\\\\])*"/,
-	      "xx\"ma\"yy",
-	      2,
-	      ["\"ma\"", "a"] );
-
-	   test();
-
-	   function AddRegExpCases(
-	     regexp, pattern, index, matches_array ) {
-
-// prevent a runtime error
-
-	     if ( regexp.exec(pattern) == null || matches_array == null ) {
-	       AddTestCase(
-		 regexp + ".exec(" + pattern +")",
-		 matches_array,
-		 regexp.exec(pattern) );
-
-	       return;
-	     }
-	     AddTestCase(
-	       regexp + ".exec(" + pattern +").length",
-	       matches_array.length,
-	       regexp.exec(pattern).length );
-
-	     AddTestCase(
-	       regexp + ".exec(" + pattern +").index",
-	       index,
-	       regexp.exec(pattern).index );
-
-	     AddTestCase(
-	       regexp + ".exec(" + pattern +").input",
-	       pattern,
-	       regexp.exec(pattern).input );
-
-	     AddTestCase(
-	       regexp + ".exec(" + pattern +").toString()",
-	       matches_array.toString(),
-	       regexp.exec(pattern).toString() );
-/*
-  var limit = matches_array.length > regexp.exec(pattern).length
-  ? matches_array.length
-  : regexp.exec(pattern).length;
-
-  for ( var matches = 0; matches < limit; matches++ ) {
-  AddTestCase(
-  regexp + ".exec(" + pattern +")[" + matches +"]",
-  matches_array[matches],
-  regexp.exec(pattern)[matches] );
-  }
-*/
-	   }
deleted file mode 100644
index bbc38b49e83cc5ec1f2c0641e99f6be1bf4db9a8..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-001.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-001.js
-   Corresponds to:     ecma/Expressions/11.12-2-n.js
-   ECMA Section:       11.12
-   Description:
-
-   The grammar for a ConditionalExpression in ECMAScript is a little bit
-   different from that in C and Java, which each allow the second
-   subexpression to be an Expression but restrict the third expression to
-   be a ConditionalExpression.  The motivation for this difference in
-   ECMAScript is to allow an assignment expression to be governed by either
-   arm of a conditional and to eliminate the confusing and fairly useless
-   case of a comma expression as the center expression.
-
-   Author:             christine@netscape.com
-   Date:               09 september 1998
-*/
-var SECTION = "expression-001";
-var VERSION = "JS1_4";
-var TITLE   = "Conditional operator ( ? : )"
-  startTest();
-writeHeaderToLog( SECTION + " " + TITLE );
-
-// the following expression should be an error in JS.
-
-var result = "Failed"
-  var exception = "No exception was thrown";
-
-try {
-  eval("var MY_VAR = true ? \"EXPR1\", \"EXPR2\" : \"EXPR3\"");
-} catch ( e ) {
-  result = "Passed";
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "comma expression in a conditional statement "+
-  "(threw "+ exception +")",
-  "Passed",
-  result );
-
-
-test();
deleted file mode 100644
index a4cf82517a8870c0e15aefd19ea5d46a4e8b34bf..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-002.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expressions-002.js
-   Corresponds to:     ecma/Expressions/11.2.1-3-n.js
-   ECMA Section:       11.2.1 Property Accessors
-   Description:
-
-   Try to access properties of an object whose value is undefined.
-
-   Author:             christine@netscape.com
-   Date:               09 september 1998
-*/
-var SECTION = "expressions-002.js";
-var VERSION = "JS1_4";
-var TITLE   = "Property Accessors";
-writeHeaderToLog( SECTION + " "+TITLE );
-
-startTest();
-
-// go through all Native Function objects, methods, and properties and get their typeof.
-
-var PROPERTY = new Array();
-var p = 0;
-
-// try to access properties of primitive types
-
-OBJECT = new Property(  "undefined",    void 0,   "undefined",   NaN );
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  result = OBJECT.value.valueOf();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-
-new TestCase(
-  SECTION,
-  "Get the value of an object whose value is undefined "+
-  "(threw " + exception +")",
-  expect,
-  result );
-
-test();
-
-function Property( object, value, string, number ) {
-  this.object = object;
-  this.string = String(value);
-  this.number = Number(value);
-  this.valueOf = value;
-}
deleted file mode 100644
index dc2656b14bf3bc14b01d1945d35c943063c2e4d6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-003.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expressions-003.js
-   Corresponds to:     ecma/Expressions/11.2.1-3-n.js
-   ECMA Section:       11.2.1 Property Accessors
-   Description:
-
-   Try to access properties of an object whose value is undefined.
-
-   Author:             christine@netscape.com
-   Date:               09 september 1998
-*/
-var SECTION = "expressions-003.js";
-var VERSION = "JS1_4";
-var TITLE   = "Property Accessors";
-writeHeaderToLog( SECTION + " "+TITLE );
-
-startTest();
-
-// try to access properties of primitive types
-
-OBJECT = new Property(  "undefined",    void 0,   "undefined",   NaN );
-
-var result    = "Failed";
-var exception = "No exception thrown";
-var expect    = "Passed";
-
-try {
-  result = OBJECT.value.toString();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-
-new TestCase(
-  SECTION,
-  "Get the toString value of an object whose value is undefined "+
-  "(threw " + exception +")",
-  expect,
-  result );
-
-test();
-
-function Property( object, value, string, number ) {
-  this.object = object;
-  this.string = String(value);
-  this.number = Number(value);
-  this.value = value;
-}
deleted file mode 100644
index 2a5ba62ca9bb7bbb0d238ede3f9f18bfde38c89b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-004.js
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-004.js
-   Corresponds To:     11.2.1-4-n.js
-   ECMA Section:       11.2.1 Property Accessors
-   Description:
-
-   Author:             christine@netscape.com
-   Date:               09 september 1998
-*/
-var SECTION = "expression-004";
-var VERSION = "JS1_4";
-var TITLE   = "Property Accessors";
-writeHeaderToLog( SECTION + " "+TITLE );
-startTest();
-
-var OBJECT = new Property( "null", null, "null", 0 );
-
-var result    = "Failed";
-var exception = "No exception thrown";
-var expect    = "Passed";
-
-try {
-  result = OBJECT.value.toString();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "Get the toString value of an object whose value is null "+
-  "(threw " + exception +")",
-  expect,
-  result );
-
-test();
-
-function Property( object, value, string, number ) {
-  this.object = object;
-  this.string = String(value);
-  this.number = Number(value);
-  this.value = value;
-}
deleted file mode 100644
index 16c76c4bf70218318d8e3d56d62a1f949fb366c2..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-005.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-005.js
-   Corresponds To:     11.2.2-10-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-
-var SECTION = "expression-005";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var result = "Failed";
-var expect = "Passed";
-var exception = "No exception thrown";
-
-try {
-  result = new Math();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "result= new Math() (threw " + exception + ")",
-  expect,
-  result );
-
-test();
deleted file mode 100644
index d19dd551a8d26becf3efb5d3867e9dc4cc9e56c6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-006.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-006.js
-   Corresponds to:     11.2.2-1-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-
-   http://scopus/bugsplat/show_bug.cgi?id=327765
-
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "expression-006.js";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-var BUGNUMBER="327765";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  var OBJECT = new Object();
-  result = new OBJECT();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "OBJECT = new Object; result = new OBJECT()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
-
deleted file mode 100644
index 39c1bbdedc646eceaf3a19d9e7b7ec56770932c7..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-007.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-007.js
-   Corresponds To:     11.2.2-2-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-
-
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "expression-007";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  UNDEFINED = void 0;
-  result = new UNDEFINED();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "UNDEFINED = void 0; result = new UNDEFINED()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
-
deleted file mode 100644
index f09c68a792ac9181f4be0977fd7a753f1c417fe0..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-008.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-008
-   Corresponds To:     11.2.2-3-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "expression-008";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var NULL = null;
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  result = new NULL();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "NULL = null; result = new NULL()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
deleted file mode 100644
index 392209cb016b9160ae3878ab88d350a07f9f1307..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-009.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-009
-   Corresponds to:     ecma/Expressions/11.2.2-4-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "expression-009";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var STRING = "";
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  result = new STRING();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "STRING = ''; result = new STRING()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
deleted file mode 100644
index 988918403d223d43870d24304b8f5479ef43e1c4..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-010.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-010.js
-   Corresponds To:     11.2.2-5-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "expression-010";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var NUMBER = 0;
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  result = new NUMBER();
-} catch ( e ) {
-  result = expect;
-  exception = e.toString();
-}
-
-new TestCase(
-  SECTION,
-  "NUMBER=0, result = new NUMBER()" +
-  " (threw " + exception +")",
-  expect,
-  result );
-
-test();
-
deleted file mode 100644
index b61edd52d2096810afab769b198edb0674802dc6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
--- a/js/src/jsapi-tests/binast/parser/tester/expression-011.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-
-/**
-   File Name:          expression-011.js
-   Corresponds To:     ecma/Expressions/11.2.2-6-n.js
-   ECMA Section:       11.2.2. The new operator
-   Description:
-   Author:             christine@netscape.com
-   Date:               12 november 1997
-*/
-var SECTION = "expression-011";
-var VERSION = "JS1_4";
-var TITLE   = "The new operator";
-
-startTest();
-writeHeaderToLog( SECTION + " "+ TITLE);
-
-var BOOLEAN  = true;
-
-var result = "Failed";
-var exception = "No exception thrown";
-var expect = "Passed";
-
-try {
-  var OBJECT = new BOOLEAN();
-} catch ( e ) {
-  result = expect;