diff --git a/build_ts_js.py b/build_ts_js.py index 20ec59ea404a098151b4e3cefa3c8008cea72b05..cc7e81a44e10af9a3ef281d7946b468c87c0fdac 100755 --- a/build_ts_js.py +++ b/build_ts_js.py @@ -47,7 +47,7 @@ if __name__ == '__main__': node-v12.18.4-linux-x64/bin/node' if not os.path.exists(NODE_PATH): raise Exception('NO souch file or directory') - TSC_PATH = '../../../../ark/ts2abc/ts2panda/node_modules/\ + TSC_PATH = '../../../../arkcompiler/ets_frontend/ts2panda/node_modules/\ typescript/bin/tsc' CMD_INST = [NODE_PATH, TSC_PATH] run_command(CMD_INST) diff --git a/container/BUILD.gn b/container/BUILD.gn index 5c652433dcf3220bf58af9714494f115d8674872..1807d3dc52d2d26cc92c3ecc95e9bb77e2039849 100644 --- a/container/BUILD.gn +++ b/container/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//ark/ts2abc/ts2panda/ts2abc_config.gni") +import("//arkcompiler/ets_frontend/ts2panda/ts2abc_config.gni") import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") import("//foundation/arkui/ace_engine/ace_config.gni") @@ -67,7 +67,8 @@ template("container_lib") { # compile .js to .abc. action("gen_" + name + "_abc") { visibility = [ ":*" ] - script = "//ark/ts2abc/ts2panda/scripts/generate_js_bytecode.py" + script = + "//arkcompiler/ets_frontend/ts2panda/scripts/generate_js_bytecode.py" args = [ "--src-js", @@ -84,7 +85,7 @@ template("container_lib") { ] deps = [ ":build_js_ts", - "//ark/ts2abc/ts2panda:ark_ts2abc_build", + "//arkcompiler/ets_frontend/ts2panda:ark_ts2abc_build", ] inputs = [ target_out_dir + "/js_" + name + ".js" ] diff --git a/container/build_ts_js.py b/container/build_ts_js.py index 20abe9edb6245061dc3a47aa237599c07f7c2a1c..8200dc59f770083f166068c1bf9f1ed3b7a026bb 100755 --- a/container/build_ts_js.py +++ b/container/build_ts_js.py @@ -40,7 +40,7 @@ if __name__ == '__main__': NODE_PATH = '../../../../prebuilts/build-tools/common/nodejs/\ node-v12.18.4-linux-x64/bin/node' - TSC_PATH = '../../../../ark/ts2abc/ts2panda/node_modules/typescript/bin/tsc' + TSC_PATH = '../../../../arkcompiler/ets_frontend/ts2panda/node_modules/typescript/bin/tsc' cmd = [NODE_PATH, TSC_PATH] run_command(cmd) diff --git a/util/BUILD.gn b/util/BUILD.gn index db5005530f8b447177815dddaca6fdcdf61220e7..dffba0e0b67dcd0261b77f7b6e17c6266b5cc16a 100755 --- a/util/BUILD.gn +++ b/util/BUILD.gn @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//ark/ts2abc/ts2panda/ts2abc_config.gni") +import("//arkcompiler/ets_frontend/ts2panda/ts2abc_config.gni") import("//build/ohos.gni") import("//build/ohos/ace/ace.gni") import("//foundation/arkui/ace_engine/ace_config.gni") @@ -43,7 +43,7 @@ gen_js_obj("util_js") { # compile .js to .abc. action("gen_util_abc") { visibility = [ ":*" ] - script = "//ark/ts2abc/ts2panda/scripts/generate_js_bytecode.py" + script = "//arkcompiler/ets_frontend/ts2panda/scripts/generate_js_bytecode.py" args = [ "--src-js", @@ -60,7 +60,7 @@ action("gen_util_abc") { ] deps = [ ":build_ts_js", - "//ark/ts2abc/ts2panda:ark_ts2abc_build", + "//arkcompiler/ets_frontend/ts2panda:ark_ts2abc_build", ] inputs = [ target_out_dir + "/util_js.js" ] diff --git a/util/js_base64.cpp b/util/js_base64.cpp index 5443144248ada7204fc2ff61474941a8a05b4555..70ef65553adf26716a65cfd97f9b11f5c767a756 100755 --- a/util/js_base64.cpp +++ b/util/js_base64.cpp @@ -456,8 +456,6 @@ namespace OHOS::Util { inputDecode = static_cast(resultData) + byteOffset; CreateDecodePromise(env, inputDecode, length); } - delete[] inputString; - inputString = nullptr; return stdDecodeInfo_->promise; } void Base64::CreateDecodePromise(napi_env env, char *inputDecode, size_t length) diff --git a/util/js_textdecoder.cpp b/util/js_textdecoder.cpp index 6bb026deb20f7980c52c2be2d54e18e9b5a890af..2ef93dfaaaf23bf8cebf0f5aa8dc2adf1afd5af6 100755 --- a/util/js_textdecoder.cpp +++ b/util/js_textdecoder.cpp @@ -42,7 +42,6 @@ namespace OHOS::Util { } } label_ = i32Flag; - SetHwIcuDirectory(); bool fatal = (i32Flag & static_cast(ConverterFlags::FATAL_FLG)) == static_cast(ConverterFlags::FATAL_FLG); diff --git a/util/native_module_util.cpp b/util/native_module_util.cpp index b866bf7534a8933810483eff83bbd17d334c5758..16a9f6c791347098e761c8b7ef227475746a8810 100755 --- a/util/native_module_util.cpp +++ b/util/native_module_util.cpp @@ -392,7 +392,7 @@ namespace OHOS::Util { return retVal; } - static bool CheckEncodingFormat(std::string &encoding) + static bool CheckEncodingFormat(const std::string &encoding) { const std::string conventFormat("utf8-t,UTF-8,gbk,GBK,GB2312,gb2312,GB18030,gb18030"); if (conventFormat.find(encoding.c_str()) != conventFormat.npos) {