diff --git a/test_ecma_bcopt/test_bytecode_optimizer_for_js.js b/test_ecma_bcopt/test_bytecode_optimizer_for_js.js new file mode 100755 index 0000000000000000000000000000000000000000..b09c563761b94973ecf90dd5f5f68f1f2b0ce734 --- /dev/null +++ b/test_ecma_bcopt/test_bytecode_optimizer_for_js.js @@ -0,0 +1,3 @@ +let a = [1]; +a[0] = 2; + diff --git a/test_ecma_bcopt/test_bytecode_optimizer_for_js.txt b/test_ecma_bcopt/test_bytecode_optimizer_for_js.txt new file mode 100755 index 0000000000000000000000000000000000000000..68a79ec1e82b065356e2b799fd26d928e9a1b3be --- /dev/null +++ b/test_ecma_bcopt/test_bytecode_optimizer_for_js.txt @@ -0,0 +1,35 @@ +# +# source binary: test_bytecode_optimizer_for_js.abc +# + +.language ECMAScript + +# ==================== +# LITERALS + + +# ==================== +# RECORDS + +.record _ESTypeAnnotation + +.record _ESModuleMode { + u8 isModule +} + +.record _ESCallTypeAnnotation + +# ==================== +# METHODS + +.function any func_main_0_any_any_any_any_(any a0, any a1, any a2) { + ecma.ldlexenvdyn + ecma.createarraywithbuffer 0x0 + ecma.stlettoglobalrecord "a" + ecma.tryldglobalbyname "a" + sta.dyn v0 + ldai.dyn 0x2 + ecma.stobjbyindex v0, 0x0 + ecma.returnundefined +} +