Bug 1622530 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

2 steps:
  1. jsparagus imports bytecode-related enum/constant from C++ headers, and compare cached source when building
  2. move the bytecode-related enum/constant to Rust side, C++ code uses generated headers (not in this bug)

bytecode-related enum/constant contains:
  * `JSOp`
  * `SrcNoteType`
  * `ScopeKind`
  * `JSTryNoteKind`
  * `JOF_*`
  * `JSMSG_*`

and the following needs to be moved to new header
  * `JSTryNoteKind` (currently in `js/src/vm/JSScript.h`)
  * `JOF_*` (currently in `js/src/vm/BytecodeUtil.h`)

moving them to its own header helps:
  * reduce false positive when comparing cached source
  * transition from step 1 to step 2
2 steps:
  1. jsparagus imports bytecode-related enum/constant from C++ headers, and compare cached source when building
  2. move the bytecode-related enum/constant to Rust side, C++ code uses generated headers (not in this bug)

bytecode-related enum/constant contains:
  * `JSOp`
  * `SrcNoteType`
  * `ScopeKind`
  * `JSTryNoteKind`
  * `JOF_*`
  * `JSMSG_*` (`JSOp::ThrowMsg`)
  * `GeneratorResumeKind` (`JSOp::InitialYield` etc)
  * `FunctionPrefixKind` (`JSOp::SetFunName`)
  * `JS::SymbolCode` (`JSOp::Symbol`)
  * `AsyncFunctionResolveKind` (`JSOp::AsyncResolve`)
  * `CheckIsObjectKind` (`JSOp::CheckIsObj`)
  * `CheckIsCallableKind` (`JSOp::CheckIsCallable`)
  * `JSProto_Function` (`JSOp::BuiltinProto`, this op needs to be `JOF_BYTE` I think)

and the following needs to be moved to new header
  * `JSTryNoteKind` (currently in `js/src/vm/JSScript.h`)
  * `JOF_*` (currently in `js/src/vm/BytecodeUtil.h`)
  * `GeneratorResumeKind` (currently in `js/src/vm/GeneratorObject.h`)
  * `FunctionPrefixKind` (currently in `js/src/vm/JSFunction.h`)
  * `AsyncFunctionResolveKind` (currently in `js/src/vm/AsyncFunction.h`)
  * `CheckIsObjectKind` (currently in `js/src/vm/Interpreter.h`)
  * `CheckIsCallableKind` (currently in `js/src/vm/Interpreter.h`)

moving them to its own header helps:
  * reduce false positive when comparing cached source
  * transition from step 1 to step 2
2 steps:
  1. jsparagus imports bytecode-related enum/constant from C++ headers, and compare cached source when building
  2. move the bytecode-related enum/constant to Rust side, C++ code uses generated headers (not in this bug)

bytecode-related enum/constant contains:
  * `JSOp`
  * `SrcNoteType`
  * `ScopeKind`
  * `JSTryNoteKind`
  * `JOF_*`
  * `JSMSG_*` (`JSOp::ThrowMsg`)
  * `GeneratorResumeKind` (`JSOp::ResumeKind` etc)
  * `FunctionPrefixKind` (`JSOp::SetFunName`)
  * `JS::SymbolCode` (`JSOp::Symbol`)
  * `AsyncFunctionResolveKind` (`JSOp::AsyncResolve`)
  * `CheckIsObjectKind` (`JSOp::CheckIsObj`)
  * `CheckIsCallableKind` (`JSOp::CheckIsCallable`)
  * `JSProto_Function` (`JSOp::BuiltinProto`, this op needs to be `JOF_BYTE` I think)

and the following needs to be moved to new header
  * `JSTryNoteKind` (currently in `js/src/vm/JSScript.h`)
  * `JOF_*` (currently in `js/src/vm/BytecodeUtil.h`)
  * `GeneratorResumeKind` (currently in `js/src/vm/GeneratorObject.h`)
  * `FunctionPrefixKind` (currently in `js/src/vm/JSFunction.h`)
  * `AsyncFunctionResolveKind` (currently in `js/src/vm/AsyncFunction.h`)
  * `CheckIsObjectKind` (currently in `js/src/vm/Interpreter.h`)
  * `CheckIsCallableKind` (currently in `js/src/vm/Interpreter.h`)

moving them to its own header helps:
  * reduce false positive when comparing cached source
  * transition from step 1 to step 2

Back to Bug 1622530 Comment 0