#include <cstdlib>
#include <cstddef>
-#include <cstdint> // HOTFIX(daeyeon) suppress build errors on gcc-13
+#include <cstdint>
#include <cstring>
#include <string>
#include <vector>
+++ /dev/null
---- src/interp/interp-wasm-c-api.cc
-+++ src/interp/interp-wasm-c-api.cc
-@@ -626,6 +626,11 @@ own wasm_store_t* wasm_store_new(wasm_engine_t* engine) {
- return new wasm_store_t(s_features);
- }
-
-+void wasm_store_gc(wasm_store_t* store) {
-+ assert(store);
-+ store->I.Collect();
-+}
-+
- // wasm_module
-
- own wasm_module_t* wasm_module_new(wasm_store_t* store,
-@@ -760,6 +765,20 @@ void wasm_instance_exports(const wasm_instance_t* instance,
- }
- }
-
-+uint32_t wasm_instance_func_index(const wasm_instance_t* instance,
-+ const wasm_func_t* func) {
-+ auto&& funcs = instance->As<Instance>()->funcs();
-+
-+ assert(funcs.size() < wasm_limits_max_default);
-+ for (size_t i = 0; i < funcs.size(); ++i) {
-+ if (funcs[i] == func->I.ref()) {
-+ return i;
-+ }
-+ }
-+
-+ return wasm_limits_max_default;
-+}
-+
- // wasm_functype
-
- own wasm_functype_t* wasm_functype_new(own wasm_valtype_vec_t* params,
-@@ -1170,6 +1189,16 @@ void wasm_val_vec_delete(own wasm_val_vec_t* vec) {
- } \
- delete[] vec->data; \
- vec->size = 0; \
-+ } \
-+ void wasm_##name##_vec_delete_with_size(wasm_##name##_vec_t* vec, \
-+ size_t size) { \
-+ assert(size <= vec->size); \
-+ TRACE0(); \
-+ for (size_t i = 0; i < size; ++i) { \
-+ delete vec->data[i]; \
-+ } \
-+ delete[] vec->data; \
-+ vec->size = 0; \
- }
-
- WASM_IMPL_VEC_OWN(frame);
->Uint32Value(context)
.ToChecked();
if (type == ScriptType::kScript) {
- contextify::ContextifyScript* wrap = env->id_to_script_map.find(id)->second;
- object = wrap->object();
+ auto it = env->id_to_function_map.find(id);
+ CHECK_NE(it, env->id_to_function_map.end());
+ object = it->second->object();
} else if (type == ScriptType::kModule) {
ModuleWrap* wrap = ModuleWrap::GetFromID(env, id);
object = wrap->object();
int bits, base_id = EVP_PKEY_base_id(pkey.get());
if (base_id == EVP_PKEY_DSA) {
- DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get());
+ const DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get());
// Both r and s are computed mod q, so their width is limited by that of q.
bits = BN_num_bits(DSA_get0_q(dsa_key));
} else if (base_id == EVP_PKEY_EC) {
- EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
+ const EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key);
bits = EC_GROUP_order_bits(ec_group);
} else {
std::vector<BaseObjectPtr<BaseObject>> nested_transferables;
if (!host_objects_[i]->NestedTransferables().To(&nested_transferables))
return Nothing<bool>();
- for (auto nested_transferable : nested_transferables) {
+ for (auto& nested_transferable : nested_transferables) {
if (std::find(host_objects_.begin(),
host_objects_.end(),
nested_transferable) == host_objects_.end()) {
BuildRequires: nghttp2-devel
BuildRequires: pkgconfig(libcares)
-%if (0%{?tizen_version_major} >= 6)
+%if (0%{?tizen_version_major} >= 8)
+BuildRequires: pkgconfig(openssl3)
+%endif
+
+%if (0%{?tizen_version_major} == 7 || 0%{?tizen_version_major} == 6)
BuildRequires: pkgconfig(openssl1.1)
-%else
- %if (0%{?tizen_version_major} == 5) && (0%{?tizen_version_minor} == 5)
+%endif
+
+%if (0%{?tizen_version_major} == 5)
+%if (0%{?tizen_version_minor} >= 5)
BuildRequires: pkgconfig(openssl1.1)
- %else
+%else
+BuildRequires: pkgconfig(openssl)
+%endif
+%endif
+
+%if (0%{?tizen_version_major} < 5)
BuildRequires: pkgconfig(openssl)
- %endif
%endif
%if 0%{?asan} == 1
}
auto vector = ValueVectorRef::create();
- for (auto tokens : result.m_matchResults) {
- for (auto token : tokens) {
+ for (auto& tokens : result.m_matchResults) {
+ for (auto& token : tokens) {
auto match = subject->substring(token.m_start, token.m_end);
vector->pushBack(match);
}
std::abort();
}
void HandleScope::operator delete(void*, size_t) {
- std::abort();
+ LWNODE_UNIMPLEMENT;
}
void HandleScope::operator delete[](void*, size_t) {
- std::abort();
+ LWNODE_UNIMPLEMENT;
}
int HandleScope::NumberOfHandles(Isolate* isolate) {
std::string optionValues = userOption.substr(userOption.find_first_of('=') +
1); // +1 for skipping '='
auto tokens = strSplit(optionValues, ',');
- for (auto token : tokens) {
+ for (auto& token : tokens) {
flag->addValue(token);
}
}
void StdOut::flush(std::stringstream& stream,
std::shared_ptr<Output::Config> config) {
- fprintf(stdout, "%s", stream.str().c_str());
+ fprintf(stderr, "%s", stream.str().c_str());
}
// --- Option ---
# note: this uses `black` for formatting.
-from __future__ import print_function
-
import os
import subprocess
import sys
with open(file, "r") as f:
original = f.readlines()
- formatted = subprocess.check_output([clang_format, "-style=file", file])
+ formatted = subprocess.check_output(
+ [clang_format, "-style=file", file], encoding="utf-8"
+ )
if update:
with open(file, "w") as f:
--- /dev/null
+diff --git raw/src/api/EscargotPublic.h fix/src/api/EscargotPublic.h
+index 3a8362a9..6fc888d1 100644
+--- raw/src/api/EscargotPublic.h
++++ fix/src/api/EscargotPublic.h
+@@ -30,6 +30,7 @@
+
+ #include <cstdlib>
+ #include <cstddef>
++#include <cstdint>
+ #include <cstring>
+ #include <string>
+ #include <vector>
pushd deps/escargot
git submodule update --init third_party
+# Patch update code for escargot
+find ../../tools/patch -type f -name "*escargot*.patch" \
+ -exec patch -p1 --forward -r /dev/null -i {} \;
+
# Patch update code for wasm
pushd third_party/wasm/wabt
patch -p0 --forward -r /dev/null -i ../../../tools/test/wasm-js/wabt_patch