From 7b207535e3b4c738439ec48fada5661580e04689 Mon Sep 17 00:00:00 2001 From: HyukWoo Park Date: Wed, 7 Jun 2023 10:32:34 +0900 Subject: [PATCH] Fix minor defect Signed-off-by: HyukWoo Park --- .github/workflows/es-actions.yml | 1 + src/api/EscargotPublic.cpp | 1 - src/api/EscargotPublic.h | 1 + src/builtins/BuiltinAtomics.cpp | 2 -- src/heap/Heap.cpp | 2 -- src/interpreter/ByteCodeInterpreter.cpp | 2 +- src/runtime/ExecutionState.cpp | 6 ++++++ third_party/libbf/libbf.c | 1 - 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/es-actions.yml b/.github/workflows/es-actions.yml index a435f7674..18e40dd29 100644 --- a/.github/workflows/es-actions.yml +++ b/.github/workflows/es-actions.yml @@ -174,6 +174,7 @@ jobs: CC=clang CXX=clang++ cmake -H. -Bout/release -DESCARGOT_ARCH=aarch64 -DESCARGOT_HOST=linux -DESCARGOT_MODE=release -DESCARGOT_TEMPORAL=ON -DESCARGOT_TCO=ON -DESCARGOT_TEST=ON -DESCARGOT_OUTPUT=shell -GNinja ninja -Cout/release python3 ./tools/run-tests.py --engine="./out/release/escargot" new-es + test-on-windows-clang-cl: runs-on: windows-2022 strategy: diff --git a/src/api/EscargotPublic.cpp b/src/api/EscargotPublic.cpp index c57f41057..1d2a58f0b 100644 --- a/src/api/EscargotPublic.cpp +++ b/src/api/EscargotPublic.cpp @@ -18,7 +18,6 @@ */ #include "Escargot.h" -#include // size_t #include "EscargotPublic.h" #include "parser/ast/Node.h" #include "parser/Script.h" diff --git a/src/api/EscargotPublic.h b/src/api/EscargotPublic.h index 3a8362a98..6b7b81224 100644 --- a/src/api/EscargotPublic.h +++ b/src/api/EscargotPublic.h @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/src/builtins/BuiltinAtomics.cpp b/src/builtins/BuiltinAtomics.cpp index deebf3be1..74a604604 100644 --- a/src/builtins/BuiltinAtomics.cpp +++ b/src/builtins/BuiltinAtomics.cpp @@ -494,10 +494,8 @@ static Value doWait(ExecutionState& state, bool isAsync, const Value& typedArray } return Value(state.context()->staticStrings().lazyTimedOut().string()); } - return Value(); } - static Value builtinAtomicsWait(ExecutionState& state, Value thisValue, size_t argc, Value* argv, Optional newTarget) { return doWait(state, false, argv[0], argv[1], argv[2], argv[3]); diff --git a/src/heap/Heap.cpp b/src/heap/Heap.cpp index 3ffc4b6aa..1d2214d75 100644 --- a/src/heap/Heap.cpp +++ b/src/heap/Heap.cpp @@ -22,8 +22,6 @@ #include "Heap.h" #include "LeakChecker.h" -#include - namespace Escargot { void Heap::initialize() diff --git a/src/interpreter/ByteCodeInterpreter.cpp b/src/interpreter/ByteCodeInterpreter.cpp index e3dc82d86..14b50a69a 100644 --- a/src/interpreter/ByteCodeInterpreter.cpp +++ b/src/interpreter/ByteCodeInterpreter.cpp @@ -3012,7 +3012,7 @@ NEVER_INLINE Value InterpreterSlowPath::tryOperation(ExecutionState*& state, siz Debugger::updateStopState(state->context()->debugger(), state, newState); #endif /* ESCARGOT_DEBUGGER */ - if (!LIKELY(inPauserResumeProcess)) { + if (LIKELY(!inPauserResumeProcess)) { if (!state->ensureRareData()->m_controlFlowRecord) { state->ensureRareData()->m_controlFlowRecord = new ControlFlowRecordVector(); } diff --git a/src/runtime/ExecutionState.cpp b/src/runtime/ExecutionState.cpp index a898d60d5..f91b068b9 100644 --- a/src/runtime/ExecutionState.cpp +++ b/src/runtime/ExecutionState.cpp @@ -41,6 +41,9 @@ ExecutionState::ExecutionState() , m_onTry(false) , m_onCatch(false) , m_onFinally(false) +#if defined(ENABLE_TCO) + , m_initTCO(false) +#endif , m_argc(0) , m_argv(nullptr) { @@ -67,6 +70,9 @@ ExecutionState::ExecutionState(Context* context) , m_onTry(false) , m_onCatch(false) , m_onFinally(false) +#if defined(ENABLE_TCO) + , m_initTCO(false) +#endif , m_argc(0) , m_argv(nullptr) { diff --git a/third_party/libbf/libbf.c b/third_party/libbf/libbf.c index a54398645..a45882d44 100644 --- a/third_party/libbf/libbf.c +++ b/third_party/libbf/libbf.c @@ -23,7 +23,6 @@ */ #include #include -#include #include #include #include