|
@@ -6414,6 +6414,7 @@ re_scan:
|
|
|
uint8 value_type;
|
|
uint8 value_type;
|
|
|
BlockType block_type;
|
|
BlockType block_type;
|
|
|
|
|
|
|
|
|
|
+ p_org = p - 1;
|
|
|
value_type = read_uint8(p);
|
|
value_type = read_uint8(p);
|
|
|
if (is_byte_a_type(value_type)) {
|
|
if (is_byte_a_type(value_type)) {
|
|
|
/* If the first byte is one of these special values:
|
|
/* If the first byte is one of these special values:
|
|
@@ -6441,9 +6442,9 @@ re_scan:
|
|
|
* the block quickly.
|
|
* the block quickly.
|
|
|
*/
|
|
*/
|
|
|
#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
- record_fast_op(module, p - 2, *(p - 2));
|
|
|
|
|
|
|
+ record_fast_op(module, p_org, *p_org);
|
|
|
#endif
|
|
#endif
|
|
|
- *(p - 2) = EXT_OP_BLOCK + (opcode - WASM_OP_BLOCK);
|
|
|
|
|
|
|
+ *p_org = EXT_OP_BLOCK + (opcode - WASM_OP_BLOCK);
|
|
|
#endif
|
|
#endif
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -7309,33 +7310,22 @@ re_scan:
|
|
|
operand_offset = local_offset;
|
|
operand_offset = local_offset;
|
|
|
PUSH_OFFSET_TYPE(local_type);
|
|
PUSH_OFFSET_TYPE(local_type);
|
|
|
#else
|
|
#else
|
|
|
-#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
|
|
|
|
|
|
+#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0) \
|
|
|
|
|
+ && (WASM_ENABLE_DEBUG_INTERP == 0)
|
|
|
if (local_offset < 0x80) {
|
|
if (local_offset < 0x80) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = EXT_OP_GET_LOCAL_FAST;
|
|
*p_org++ = EXT_OP_GET_LOCAL_FAST;
|
|
|
if (is_32bit_type(local_type)) {
|
|
if (is_32bit_type(local_type)) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = (uint8)local_offset;
|
|
*p_org++ = (uint8)local_offset;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = (uint8)(local_offset | 0x80);
|
|
*p_org++ = (uint8)(local_offset | 0x80);
|
|
|
}
|
|
}
|
|
|
while (p_org < p) {
|
|
while (p_org < p) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = WASM_OP_NOP;
|
|
*p_org++ = WASM_OP_NOP;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif /* end of WASM_ENABLE_FAST_INTERP != 0 */
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -7384,33 +7374,22 @@ re_scan:
|
|
|
POP_OFFSET_TYPE(local_type);
|
|
POP_OFFSET_TYPE(local_type);
|
|
|
}
|
|
}
|
|
|
#else
|
|
#else
|
|
|
-#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
|
|
|
|
|
|
+#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0) \
|
|
|
|
|
+ && (WASM_ENABLE_DEBUG_INTERP == 0)
|
|
|
if (local_offset < 0x80) {
|
|
if (local_offset < 0x80) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = EXT_OP_SET_LOCAL_FAST;
|
|
*p_org++ = EXT_OP_SET_LOCAL_FAST;
|
|
|
if (is_32bit_type(local_type)) {
|
|
if (is_32bit_type(local_type)) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = (uint8)local_offset;
|
|
*p_org++ = (uint8)local_offset;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = (uint8)(local_offset | 0x80);
|
|
*p_org++ = (uint8)(local_offset | 0x80);
|
|
|
}
|
|
}
|
|
|
while (p_org < p) {
|
|
while (p_org < p) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = WASM_OP_NOP;
|
|
*p_org++ = WASM_OP_NOP;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif /* end of WASM_ENABLE_FAST_INTERP != 0 */
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -7455,33 +7434,22 @@ re_scan:
|
|
|
*(loader_ctx->frame_offset
|
|
*(loader_ctx->frame_offset
|
|
|
- wasm_value_type_cell_num(local_type)));
|
|
- wasm_value_type_cell_num(local_type)));
|
|
|
#else
|
|
#else
|
|
|
-#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
|
|
|
|
|
|
+#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0) \
|
|
|
|
|
+ && (WASM_ENABLE_DEBUG_INTERP == 0)
|
|
|
if (local_offset < 0x80) {
|
|
if (local_offset < 0x80) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = EXT_OP_TEE_LOCAL_FAST;
|
|
*p_org++ = EXT_OP_TEE_LOCAL_FAST;
|
|
|
if (is_32bit_type(local_type)) {
|
|
if (is_32bit_type(local_type)) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = (uint8)local_offset;
|
|
*p_org++ = (uint8)local_offset;
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = (uint8)(local_offset | 0x80);
|
|
*p_org++ = (uint8)(local_offset | 0x80);
|
|
|
}
|
|
}
|
|
|
while (p_org < p) {
|
|
while (p_org < p) {
|
|
|
-#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
|
- record_fast_op(module, p_org, *p_org);
|
|
|
|
|
-#endif
|
|
|
|
|
*p_org++ = WASM_OP_NOP;
|
|
*p_org++ = WASM_OP_NOP;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
#endif
|
|
#endif
|
|
|
-#endif
|
|
|
|
|
|
|
+#endif /* end of WASM_ENABLE_FAST_INTERP != 0 */
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -7505,7 +7473,6 @@ re_scan:
|
|
|
PUSH_TYPE(global_type);
|
|
PUSH_TYPE(global_type);
|
|
|
|
|
|
|
|
#if WASM_ENABLE_FAST_INTERP == 0
|
|
#if WASM_ENABLE_FAST_INTERP == 0
|
|
|
-#if (WASM_ENABLE_WAMR_COMPILER == 0) && (WASM_ENABLE_JIT == 0)
|
|
|
|
|
if (global_type == VALUE_TYPE_I64
|
|
if (global_type == VALUE_TYPE_I64
|
|
|
|| global_type == VALUE_TYPE_F64) {
|
|
|| global_type == VALUE_TYPE_F64) {
|
|
|
#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
@@ -7513,7 +7480,6 @@ re_scan:
|
|
|
#endif
|
|
#endif
|
|
|
*p_org = WASM_OP_GET_GLOBAL_64;
|
|
*p_org = WASM_OP_GET_GLOBAL_64;
|
|
|
}
|
|
}
|
|
|
-#endif
|
|
|
|
|
#else /* else of WASM_ENABLE_FAST_INTERP */
|
|
#else /* else of WASM_ENABLE_FAST_INTERP */
|
|
|
if (global_type == VALUE_TYPE_I64
|
|
if (global_type == VALUE_TYPE_I64
|
|
|
|| global_type == VALUE_TYPE_F64) {
|
|
|| global_type == VALUE_TYPE_F64) {
|