Skip to content

Commit

Permalink
Update Walrus module
Browse files Browse the repository at this point in the history
* fix build error

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
  • Loading branch information
clover2123 authored and ksh8281 committed Apr 5, 2024
1 parent 5a52380 commit 28451a7
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/es-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- name: Install Packages
run: |
brew update
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- name: Install Packages
run: |
sudo apt-get update
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
sdk: "10.0.20348.0"
- name: Build ${{ matrix.arch.cpu }} Release
run: |
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch.cpu }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=NO -DESCARGOT_WASM=ON -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=release -DCMAKE_C_FLAGS="${{ matrix.arch.flag }}" -DCMAKE_CXX_FLAGS="${{ matrix.arch.flag }}"
CMake -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION:STRING="10.0" -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.arch.cpu }} -Bout/ -DESCARGOT_OUTPUT=shell -DESCARGOT_LIBICU_SUPPORT=ON -DESCARGOT_LIBICU_SUPPORT_WITH_DLOPEN=NO -DESCARGOT_THREADING=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -G Ninja -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_BUILD_TYPE=release -DCMAKE_C_FLAGS="${{ matrix.arch.flag }}" -DCMAKE_CXX_FLAGS="${{ matrix.arch.flag }}"
CMake --build out/ --config Release
- name: Run octane
run: |
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
git config --global core.eol lf
- uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- uses: szenius/set-timezone@v1.2
with:
timezoneWindows: "Pacific Standard Time"
Expand Down Expand Up @@ -559,7 +559,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: true
submodules: recursive
- name: Install Packages
run: |
sudo apt-get update
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ PROJECT (ESCARGOT)

# CONFIGURATION
SET (CMAKE_VERBOSE_MAKEFILE true)
# so(dll)s are should placed on CMAKE_BINARY_DIR
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

MESSAGE(STATUS "CMAKE_SYSTEM_NAME: " ${CMAKE_SYSTEM_NAME})
Expand Down
1 change: 1 addition & 0 deletions build/escargot.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ IF (ESCARGOT_WASM)
SET (WALRUS_ARCH ${ESCARGOT_ARCH})
SET (WALRUS_MODE ${ESCARGOT_MODE})
SET (WALRUS_OUTPUT "shared_lib")
SET (WALRUS_WASI OFF) # WASI should be OFF

IF (${ESCARGOT_MODE} STREQUAL "release")
SET (WALRUS_CXXFLAGS ${WALRUS_CXXFLAGS} ${ESCARGOT_CXXFLAGS_RELEASE})
Expand Down
9 changes: 9 additions & 0 deletions src/api/EscargotPublic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2348,6 +2348,15 @@ bool ObjectRef::setPrototype(ExecutionStateRef* state, ValueRef* value)
return toImpl(this)->setPrototype(*toImpl(state), toImpl(value));
}

bool ObjectRef::setObjectPrototype(ExecutionStateRef* state, ValueRef* value)
{
// explicitly call Object::setPrototype
// could be used for initialization of __proto__to avoid ImmutablePrototypeObject::setPrototype
// should not be ProxyObject because ProxyObject has it's own setPrototype method
ASSERT(!toImpl(this)->isProxyObject());
return toImpl(this)->Object::setPrototype(*toImpl(state), toImpl(value));
}

StringRef* ObjectRef::constructorName(ExecutionStateRef* state)
{
return toRef(toImpl(this)->constructorName(*toImpl(state)));
Expand Down
1 change: 1 addition & 0 deletions src/api/EscargotPublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -1399,6 +1399,7 @@ class ESCARGOT_EXPORT ObjectRef : public PointerValueRef {
ValueRef* getPrototype(ExecutionStateRef* state);
OptionalRef<ObjectRef> getPrototypeObject(ExecutionStateRef* state); // if __proto__ is not object(undefined or null), this function returns nullptr instead of orginal value.
bool setPrototype(ExecutionStateRef* state, ValueRef* value);
bool setObjectPrototype(ExecutionStateRef* state, ValueRef* value); // explicitly call Object::setPrototype

StringRef* constructorName(ExecutionStateRef* state);

Expand Down
2 changes: 1 addition & 1 deletion third_party/walrus
Submodule walrus updated 214 files

0 comments on commit 28451a7

Please sign in to comment.