Skip to content

Commit 0632093

Browse files
committed
chore: update Escargot
Signed-off-by: Hosung Kim [email protected]
1 parent d404d0d commit 0632093

File tree

17 files changed

+224
-153
lines changed

17 files changed

+224
-153
lines changed

.github/gbs.conf

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[general]
2-
profile = profile.t80std
3-
# profile = profile.t70std
2+
profile = profile.t90std
3+
#profile = profile.t70std
44
#profile = profile.t65std
55
#profile = profile.t60std
66
#profile = profile.t55std
@@ -13,26 +13,23 @@ profile = profile.t80std
1313
user =
1414
passwd =
1515

16-
############## Tizen 8.0 ##############
17-
[profile.t80std]
18-
repos = repo.80base, repo.80std
19-
buildroot = ~/GBS-ROOT/t80std
16+
############## Tizen 9.0 ##############
17+
[profile.t90std]
18+
repos = repo.90base, repo.90std
19+
buildroot = ~/GBS-ROOT/90std
2020

21-
[profile.t80emul]
22-
repos = repo.80emulbase, repo.80emul
23-
buildroot = ~/GBS-ROOT/t80emul
21+
[profile.t90emul]
22+
repos = repo.90base, repo.90emul
23+
buildroot = ~/GBS-ROOT/90emul
2424

25-
[repo.80base]
26-
url=https://download.tizen.org/snapshots/TIZEN/Tizen-8.0/Tizen-8.0-Base/latest/repos/standard/packages/
25+
[repo.90base]
26+
url=https://download.tizen.org/snapshots/TIZEN/Tizen-9.0/Tizen-9.0-Base/latest/repos/standard/packages/
2727

28-
[repo.80std]
29-
url=https://download.tizen.org/snapshots/TIZEN/Tizen-8.0/Tizen-8.0-Unified/latest/repos/standard/packages/
28+
[repo.90std]
29+
url=https://download.tizen.org/snapshots/TIZEN/Tizen-9.0/Tizen-9.0-Unified/latest/repos/standard/packages/
3030

31-
[repo.80emulbase]
32-
url=http://download.tizen.org/snapshots/TIZEN/Tizen-8.0/Tizen-8.0-Base/reference/repos/standard/packages/
33-
34-
[repo.80emul]
35-
url=https://download.tizen.org/snapshots/TIZEN/Tizen-8.0/Tizen-8.0-Unified/latest/repos/emulator/packages/
31+
[repo.90emul]
32+
url=https://download.tizen.org/snapshots/TIZEN/Tizen/Tizen-Unified/latest/repos/emulator/packages/
3633

3734

3835
############## Tizen 7.0 ##############

.github/workflows/actions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
export GYP=deps/node/tools/gyp/gyp
7070
$GYP ./test/cctest.gyp --depth=. -f ninja \
7171
--generator-output=$OUT_PATH -Dasan=$ASAN -Descargot_build_mode=debug \
72-
-Descargot_lib_type=static_lib -Dtarget_arch=$ARCH -Dtarget_os=linux \
72+
-Descargot_lib_type=shared_lib -Dtarget_arch=$ARCH -Dtarget_os=linux \
7373
-Denable_experimental=true -Descargot_threading=1 \
7474
-Descargot_debugger=0
7575
ninja -C $OUT_PATH/out/Debug cctest
@@ -85,7 +85,7 @@ jobs:
8585
strategy:
8686
fail-fast: false
8787
matrix:
88-
profile: [t80std]
88+
profile: [t90std]
8989
steps:
9090
- name: Checkout source
9191
uses: actions/checkout@v2
@@ -115,7 +115,7 @@ jobs:
115115
name: tizen_std_${{ matrix.profile }}
116116
path: /home/runner/GBS-ROOT/${{ matrix.profile }}/local/repos/${{ matrix.profile }}/armv7l/RPMS/
117117
lint:
118-
runs-on: ubuntu-latest
118+
runs-on: ubuntu-22.04
119119
timeout-minutes: 30
120120
strategy:
121121
fail-fast: false

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def setupCLIOptions(parser):
232232
lwnode_optgroup.add_option(
233233
'--escargot-lib-type',
234234
choices=['shared_lib', 'static_lib'],
235-
default='static_lib',
235+
default='shared_lib',
236236
help='shared_lib | static_lib (%default)',
237237
)
238238

deps/escargot

Submodule escargot updated 345 files

deps/node/test/skip_tests.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ test/parallel/test-worker-nexttick-terminate.js
194194
test/parallel/test-worker-process-cwd.js
195195
test/parallel/test-worker-process-env.js
196196
test/parallel/test-worker-sharedarraybuffer-from-worker-thread.js
197+
test/parallel/test-worker-stack-overflow.js # CI 테스트중 간헐적으로 timeout
197198
test/parallel/test-worker-stdio.js # CI 테스트중 간헐적으로 crash. 타이밍 이슈로 추정됨
198199
test/parallel/test-worker-syntax-error-file.js
199200
test/parallel/test-worker-syntax-error.js

escargot.gyp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,11 @@
4141
'output_dir': '<(SHARED_INTERMEDIATE_DIR)/escargot',
4242
'escargot_libs': [
4343
'<(output_dir)/libescargot<(lib_ext)',
44-
'<(output_dir)/third_party/GCutil/libgc-lib.a',
45-
'<(output_dir)/third_party/runtime_icu_binder/libruntime-icu-binder-static.a',
46-
'<(output_dir)/liblibbf.a',
4744
],
4845
'escargot_configs': [
4946
'-DESCARGOT_SMALL_CONFIG=1',
5047
'-DESCARGOT_USE_CUSTOM_LOGGING=ON',
48+
'-DESCARGOT_USE_EXTENDED_API=ON',
5149
'-DESCARGOT_ARCH=<(target_arch)',
5250
'-DESCARGOT_HOST=<(build_host)',
5351
'-DESCARGOT_MODE=<(escargot_build_mode)',
@@ -73,12 +71,14 @@
7371
'-Wl,-rpath,\$$ORIGIN/../<(output_dir)',
7472
'-Wl,-rpath,../lib',
7573
'-Wl,-rpath,\$$ORIGIN',
74+
'-Wl,-rpath,\$$ORIGIN/gen/escargot',
7675
],
7776
'cflags': [ '-pthread' ],
7877
'ldflags': [ '-pthread' ],
7978
'include_dirs': [
8079
'<(escargot_dir)/third_party/GCutil',
8180
'<(escargot_dir)/third_party/GCutil/bdwgc/include',
81+
'<(escargot_dir)/third_party/GCutil/bdwgc/include/gc',
8282
],
8383
'configurations': {
8484
'Debug': {

include/lwnode/lwnode-version.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
#pragma once
1818

1919
#define LWNODE_VERSION_MAJOR 1
20-
#define LWNODE_VERSION_MINOR 0
21-
#define LWNODE_VERSION_PATCH 18
22-
#define LWNODE_VERSION_TAG "v1.0.18"
20+
#define LWNODE_VERSION_MINOR 1
21+
#define LWNODE_VERSION_PATCH 0
22+
#define LWNODE_VERSION_TAG "v1.1.0"

modules/packages/device-api/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ include_directories(
1515
${PROJECT_ROOT_PATH}/deps/escargot/src/api
1616
${PROJECT_ROOT_PATH}/deps/escargot/third_party/GCutil
1717
${PROJECT_ROOT_PATH}/deps/escargot/third_party/GCutil/bdwgc/include
18+
${PROJECT_ROOT_PATH}/deps/escargot/third_party/GCutil/bdwgc/include/gc
1819
${PROJECT_ROOT_PATH}/deps/node/deps/uv/include
1920
${PROJECT_ROOT_PATH}/src
2021
include

src/api-data.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2314,14 +2314,14 @@ void String::ExternalStringResourceBase::operator delete(void* ptr) {
23142314

23152315
Local<Value> Symbol::Description() const {
23162316
auto lwIsolate = IsolateWrap::GetCurrent();
2317-
auto esDescription = CVAL(this)->value()->asSymbol()->description();
2318-
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription.get());
2317+
auto esDescription = CVAL(this)->value()->asSymbol()->descriptionString();
2318+
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription);
23192319
}
23202320

23212321
Local<Value> Private::Name() const {
23222322
auto lwIsolate = IsolateWrap::GetCurrent();
2323-
auto esDescription = CVAL(this)->value()->asSymbol()->description();
2324-
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription.get());
2323+
auto esDescription = CVAL(this)->value()->asSymbol()->descriptionString();
2324+
return Utils::NewLocal<String>(lwIsolate->toV8(), esDescription);
23252325
}
23262326

23272327
template <typename T, typename F>

src/api-environment.cc

Lines changed: 95 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "api.h"
1919
#include "api/engine.h"
2020
#include "api/utils/cast.h"
21+
#include "api/utils/debug.h"
2122
#include "base.h"
2223
#include "init/v8.h"
2324

@@ -691,19 +692,73 @@ double v8::Date::ValueOf() const {
691692
return scope.self()->asDateObject()->primitiveValue();
692693
}
693694

695+
static RegExpObjectRef::RegExpObjectOption ToEsRegExpObjectOption(
696+
v8::RegExp::Flags flags) {
697+
int option = RegExpObjectRef::RegExpObjectOption::None;
698+
699+
if (flags & v8::RegExp::Flags::kGlobal) {
700+
option |= RegExpObjectRef::RegExpObjectOption::Global;
701+
}
702+
if (flags & v8::RegExp::Flags::kIgnoreCase) {
703+
option |= RegExpObjectRef::RegExpObjectOption::IgnoreCase;
704+
}
705+
if (flags & v8::RegExp::Flags::kMultiline) {
706+
option |= RegExpObjectRef::RegExpObjectOption::MultiLine;
707+
}
708+
if (flags & v8::RegExp::Flags::kSticky) {
709+
option |= RegExpObjectRef::RegExpObjectOption::Sticky;
710+
}
711+
if (flags & v8::RegExp::Flags::kUnicode) {
712+
option |= RegExpObjectRef::RegExpObjectOption::Unicode;
713+
}
714+
if (flags & v8::RegExp::Flags::kDotAll) {
715+
option |= RegExpObjectRef::RegExpObjectOption::DotAll;
716+
}
717+
718+
return static_cast<RegExpObjectRef::RegExpObjectOption>(option);
719+
}
720+
721+
static v8::RegExp::Flags ToV8RegExpFlags(
722+
RegExpObjectRef::RegExpObjectOption option) {
723+
int flags = v8::RegExp::Flags::kNone;
724+
725+
if (option & RegExpObjectRef::RegExpObjectOption::Global) {
726+
flags |= v8::RegExp::Flags::kGlobal;
727+
}
728+
if (option & RegExpObjectRef::RegExpObjectOption::IgnoreCase) {
729+
flags |= v8::RegExp::Flags::kIgnoreCase;
730+
}
731+
if (option & RegExpObjectRef::RegExpObjectOption::MultiLine) {
732+
flags |= v8::RegExp::Flags::kMultiline;
733+
}
734+
if (option & RegExpObjectRef::RegExpObjectOption::Sticky) {
735+
flags |= v8::RegExp::Flags::kSticky;
736+
}
737+
if (option & RegExpObjectRef::RegExpObjectOption::Unicode) {
738+
flags |= v8::RegExp::Flags::kUnicode;
739+
}
740+
if (option & RegExpObjectRef::RegExpObjectOption::DotAll) {
741+
flags |= v8::RegExp::Flags::kDotAll;
742+
}
743+
744+
return static_cast<v8::RegExp::Flags>(flags);
745+
}
746+
694747
MaybeLocal<v8::RegExp> v8::RegExp::New(Local<Context> context,
695748
Local<String> pattern,
696749
Flags flags) {
697750
API_ENTER_WITH_CONTEXT(context, MaybeLocal<RegExp>());
698751
auto lwContext = lwIsolate->GetCurrentContext();
699752
auto lwPattern = CVAL(*pattern)->value();
700-
int flagsValue = (int)flags;
753+
RegExpObjectRef::RegExpObjectOption flagsValue =
754+
ToEsRegExpObjectOption(flags);
701755

702756
auto r = Evaluator::execute(
703757
lwContext->get(),
704-
[](ExecutionStateRef* esState, ValueRef* source, int flags) -> ValueRef* {
705-
return RegExpObjectRef::create(
706-
esState, source, (RegExpObjectRef::RegExpObjectOption)flags);
758+
[](ExecutionStateRef* esState,
759+
ValueRef* source,
760+
RegExpObjectRef::RegExpObjectOption flags) -> ValueRef* {
761+
return RegExpObjectRef::create(esState, source, flags);
707762
},
708763
lwPattern,
709764
flagsValue);
@@ -747,7 +802,7 @@ v8::RegExp::Flags v8::RegExp::GetFlags() const {
747802
[](ExecutionStateRef* esState,
748803
RegExpObjectRef* self,
749804
int* flags) -> ValueRef* {
750-
*flags = self->option();
805+
*flags = ToV8RegExpFlags(self->option());
751806
return ValueRef::createNull();
752807
},
753808
self->asRegExpObject(),
@@ -936,34 +991,38 @@ Maybe<bool> Map::Delete(Local<Context> context, Local<Value> key) {
936991
Local<Array> Map::AsArray() const {
937992
API_ENTER_NO_TERMINATION_CHECK(EsScope, nullptr);
938993

939-
EvalResult r = Evaluator::execute(
940-
scope.context(),
941-
[](ExecutionStateRef* esState, MapObjectRef* esSelf) -> ValueRef* {
942-
auto done = StringRef::createFromASCII("done");
943-
auto value = StringRef::createFromASCII("value");
944-
auto zero = ValueRef::create(0);
945-
auto one = ValueRef::create(1);
946-
auto vector = ValueVectorRef::create();
947-
948-
auto itr = esSelf->entries(esState);
949-
for (auto entry = itr->next(esState);
950-
entry->asObject()->get(esState, done)->isFalse();
951-
entry = itr->next(esState)) {
952-
auto keyValueArray =
953-
entry->asObject()->get(esState, value)->asObject();
954-
auto key = keyValueArray->getIndexedProperty(esState, zero);
955-
auto value = keyValueArray->getIndexedProperty(esState, one);
956-
957-
vector->pushBack(key);
958-
vector->pushBack(value);
959-
}
960-
961-
return ArrayObjectRef::create(esState, vector);
962-
},
963-
scope.self()->asMapObject());
964-
LWNODE_CHECK(r.isSuccessful());
965-
966-
return Utils::NewLocal<Array>(scope.v8Isolate(), r.result);
994+
LWNODE_UNIMPLEMENT;
995+
return Utils::NewLocal<Array>(
996+
scope.v8Isolate(), ArrayObjectRefHelper::create(scope.context(), 1));
997+
998+
// EvalResult r = Evaluator::execute(
999+
// scope.context(),
1000+
// [](ExecutionStateRef* esState, MapObjectRef* esSelf) -> ValueRef* {
1001+
// auto done = StringRef::createFromASCII("done");
1002+
// auto value = StringRef::createFromASCII("value");
1003+
// auto zero = ValueRef::create(0);
1004+
// auto one = ValueRef::create(1);
1005+
// auto vector = ValueVectorRef::create();
1006+
1007+
// auto itr = esSelf->entries(esState);
1008+
// for (auto entry = itr->next(esState);
1009+
// entry->asObject()->get(esState, done)->isFalse();
1010+
// entry = itr->next(esState)) {
1011+
// auto keyValueArray =
1012+
// entry->asObject()->get(esState, value)->asObject();
1013+
// auto key = keyValueArray->getIndexedProperty(esState, zero);
1014+
// auto value = keyValueArray->getIndexedProperty(esState, one);
1015+
1016+
// vector->pushBack(key);
1017+
// vector->pushBack(value);
1018+
// }
1019+
1020+
// return ArrayObjectRef::create(esState, vector);
1021+
// },
1022+
// scope.self()->asMapObject());
1023+
// LWNODE_CHECK(r.isSuccessful());
1024+
1025+
// return Utils::NewLocal<Array>(scope.v8Isolate(), r.result);
9671026
}
9681027

9691028
Local<v8::Set> v8::Set::New(Isolate* isolate) {
@@ -2566,21 +2625,12 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
25662625

25672626
auto esString = r.result->asString();
25682627
auto bufferData = esString->stringBufferAccessData();
2569-
std::string str;
2570-
if (bufferData.has8BitContent) {
2571-
length_ = bufferData.length;
2572-
} else {
2573-
str = esString->toStdUTF8String();
2574-
length_ = str.size();
2575-
}
2628+
std::string str = esString->toStdUTF8String();
2629+
length_ = str.size();
25762630

25772631
str_ = new char[length_ + 1];
25782632

2579-
if (bufferData.has8BitContent) {
2580-
strncpy(str_, reinterpret_cast<const char*>(bufferData.buffer), length_);
2581-
} else {
2582-
strncpy(str_, str.data(), length_);
2583-
}
2633+
strncpy(str_, str.data(), length_);
25842634

25852635
str_[length_] = '\0';
25862636
}

0 commit comments

Comments
 (0)