Files
openharmony_ci 210a49a342 !10951 merge fix_sendable_class_decorator into master
Fix sendable class with class decorator

Created-by: huyunhui1
Commit-by: huyunhui1
Merged-by: openharmony_ci
Description: ### 关联的Issue
https://gitcode.com/openharmony/arkcompiler_ets_frontend/issues/11644

### 提交类型
- [x] bugfix

### 问题现象和分析/Reason
当sendable class与class decorator同时存在时,ts transformer生成的alias变量被放在普通的lexical env中而非sendable env中,导致class内部方法使用ldlexvar而非ldsendableclass引用class自身,破坏了sendable语义。

### 修改方案/Description
当sendable class和class decorator同时存在时,ts transformer中生成的修饰对象也视为sendable对象,放在sendable env中。具体做法是将ClassDefinition节点绑定到alias声明上,使NeedSetInSendableEnv返回true。

### 测试结果
1. es2abc测试用例 - 已通过
2. 64位RK编译 - 已通过
3. 不涉及兼容性和指令格式修改

### 是否已执行L0用例
已验证,新增测试用例 sendable-class-class-decorator.ts

See merge request: openharmony/arkcompiler_ets_frontend!10951
2026-06-27 15:58:48 +08:00
..
2026-05-12 21:13:00 +08:00
2026-05-09 15:37:14 +08:00
2026-05-09 15:37:14 +08:00
2026-02-11 16:24:45 +08:00
2026-02-13 17:31:05 +08:00
2026-02-11 16:24:45 +08:00
2026-02-13 17:31:05 +08:00
2025-11-30 12:18:35 +08:00
2026-03-02 20:24:51 +08:00

Es2panda

All in one JavaScript/TypeScript parser and compiler.

Usage

es2panda [OPTIONS] [input file] -- [arguments]

Optional arguments

  • --debug-info: Compile with debug info
  • --dump-assembly: Dump pandasm
  • --dump-ast: Dump the parsed AST
  • --dump-debug-info: Dump debug info
  • --dump-size-stat: Dump binary size statistics
  • --extension: Parse the input as the given extension (options: js | ts | as)
  • --module: Parse the input as module
  • --opt-level: Compiler optimization level (options: 0 | 1 | 2)
  • --output: Compiler binary output (.abc)
  • --parse-only: Parse the input only
  • --strict: Parse the input in strict mode

Tail arguments

  • input: input file

Running the tests

pip install tqdm
python3 test/runner.py [OPTIONS] [build_directory]

Optional arguments

  • --regression: Run regression tests
  • --test262: Run test262
  • --no-progress: Don't show progress bar

Tail arguments

  • build_directory: Path to panda build directory

Skip list

Skip list for the runtime: test/test262skiplist.txt, test/test262skiplist-long.txt.