From 013b2a39cba8e39711841f48b90ca16cb9c4f007 Mon Sep 17 00:00:00 2001 From: ctw-ian Date: Thu, 29 Dec 2022 16:17:47 +0800 Subject: [PATCH] Support taskpool infrastructure 1. add FunctionKind::CONCURRENT_FUNCTION 2. add a new ins to store lexical env Issue:I67SPL Signed-off-by: ctw-ian Change-Id: I1dec7efc7772b6a5c909a9d015ed0bb97eb513f0 --- isa/BUILD.gn | 6 +----- isa/isa.yaml | 7 ++++++- libpandafile/file_items.h | 7 ++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/isa/BUILD.gn b/isa/BUILD.gn index 52bb0060e7..6ef9bdd10c 100644 --- a/isa/BUILD.gn +++ b/isa/BUILD.gn @@ -13,11 +13,7 @@ import("//arkcompiler/runtime_core/ark_config.gni") -isa_paths = [ - rebase_path("$ark_root/isa/isa.yaml", root_build_dir), - # rebase_path("$ark_root/../ets_runtime/ecmascript/ecma_isa.yaml", - # root_build_dir), -] +isa_paths = [ rebase_path("$ark_root/isa/isa.yaml", root_build_dir) ] foreach(plugin, enabled_plugins) { print("add isa plugin: $plugin") diff --git a/isa/isa.yaml b/isa/isa.yaml index c04ea066ed..d187418c9b 100644 --- a/isa/isa.yaml +++ b/isa/isa.yaml @@ -251,7 +251,7 @@ isa_information: last_opcode_idx: 0xd5 last_throw_prefixed_opcode_idx: 0x08 last_wide_prefixed_opcode_idx: 0x13 - last_deprecated_prefixed_opcode_idx: 0x2e + last_deprecated_prefixed_opcode_idx: 0x2f prefixes: - name: throw @@ -1398,6 +1398,11 @@ groups: opcode_idx: [0x2e] format: [pref_op_v1_8_v2_8] prefix: deprecated + - sig: deprecated.stlexenv + acc: none + opcode_idx: [0x2f] + format: [pref_op_none] + prefix: deprecated - title: Load accumulator from string constant pool description: > diff --git a/libpandafile/file_items.h b/libpandafile/file_items.h index 9b68d50320..a5b737c460 100644 --- a/libpandafile/file_items.h +++ b/libpandafile/file_items.h @@ -78,7 +78,8 @@ enum class FunctionKind : uint8_t { GENERATOR_FUNCTION = 0x3, ASYNC_FUNCTION = 0x4, ASYNC_GENERATOR_FUNCTION = 0x5, - ASYNC_NC_FUNCTION = 0x6 + ASYNC_NC_FUNCTION = 0x6, + CONCURRENT_FUNCTION = 0x7 }; bool IsDynamicLanguage(panda::panda_file::SourceLang lang); @@ -757,13 +758,13 @@ public: void SetFunctionKind(FunctionKind kind) { access_flags_ &= (~FUNCTION_KIND_MASK); - access_flags_ |= (static_cast(kind) << FLAG_WIDTH); + access_flags_ |= (static_cast(kind) << FLAG_WIDTH); } void SetHeaderIndex(uint16_t idx) { access_flags_ &= (FUNCTION_KIND_MASK | FLAG_MASK); - access_flags_ |= (idx << (FUNTION_KIND_WIDTH + FLAG_WIDTH)); + access_flags_ |= (static_cast(idx) << (FUNTION_KIND_WIDTH + FLAG_WIDTH)); } ~BaseMethodItem() override = default; -- Gitee