Files
Interpreter/tests/cases/22_multi_instance/EXPECTED.md
T

7 lines
425 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 期望:编译通过;FB 共享体多实例隔离
- Counter 编译为**单一共享函数**fn 0),MAIN 两次 `CALL 0`(c1/c2 各一次,c2 两次调用)
- 调用点 `LOADK r1` 装载**不同实例地址**(值区偏移),字段访问 `LOAD_PTR/STORE_PTR r1+off`
- `count` 是实例字段:c1 每周期 +1、c2 每周期 +2,互不干扰
- 全局 `a = c1.q * 100 + c2.q`:周期 1/2/3 = 102 / 204 / 306