diff --git a/ecmascript/common.h b/ecmascript/common.h index c22714e7c3..7eb60703ea 100644 --- a/ecmascript/common.h +++ b/ecmascript/common.h @@ -156,13 +156,13 @@ using Address = uintptr_t; #ifdef PANDA_TARGET_32 #define STATIC_ASSERT_EQ_ARCH32(a, b) static_assert(a == b) #else -#define STATIC_ASSERT_EQ_ARCH32(a, b) +#define STATIC_ASSERT_EQ_ARCH32(a, b) static_assert(true) #endif #ifdef PANDA_TARGET_64 #define STATIC_ASSERT_EQ_ARCH64(a, b) static_assert(a == b) #else -#define STATIC_ASSERT_EQ_ARCH64(a, b) +#define STATIC_ASSERT_EQ_ARCH64(a, b) static_assert(true) #endif #if defined(PANDA_TARGET_WINDOWS) || defined(PANDA_TARGET_MACOS) || defined(PANDA_TARGET_IOS) @@ -172,7 +172,7 @@ using Address = uintptr_t; #endif #define STATIC_ASSERT_EQ_ARCH(expect, valueArch32, valueArch64) \ - STATIC_ASSERT_EQ_ARCH32(expect, valueArch32) \ + STATIC_ASSERT_EQ_ARCH32(expect, valueArch32); \ STATIC_ASSERT_EQ_ARCH64(expect, valueArch64) } // namespace ecmascript } // namespace panda diff --git a/ecmascript/compiler/object_access_helper.cpp b/ecmascript/compiler/object_access_helper.cpp index c83c3d53ab..36da6aa8f1 100644 --- a/ecmascript/compiler/object_access_helper.cpp +++ b/ecmascript/compiler/object_access_helper.cpp @@ -14,6 +14,8 @@ */ #include "ecmascript/compiler/object_access_helper.h" + +#include "ecmascript/js_hclass-inl.h" #include "ecmascript/ts_types/ts_type.h" namespace panda::ecmascript::kungfu { diff --git a/ecmascript/compiler/ts_class_analysis.cpp b/ecmascript/compiler/ts_class_analysis.cpp index 8b4109d735..fde44da773 100644 --- a/ecmascript/compiler/ts_class_analysis.cpp +++ b/ecmascript/compiler/ts_class_analysis.cpp @@ -14,6 +14,9 @@ */ #include "ecmascript/compiler/ts_class_analysis.h" + +#include "ecmascript/js_hclass-inl.h" +#include "ecmascript/layout_info.h" #include "ecmascript/ts_types/ts_type_accessor.h" namespace panda::ecmascript::kungfu { diff --git a/ecmascript/compiler/ts_hclass_generator.cpp b/ecmascript/compiler/ts_hclass_generator.cpp index 3d292e9371..a8c08a1b2f 100644 --- a/ecmascript/compiler/ts_hclass_generator.cpp +++ b/ecmascript/compiler/ts_hclass_generator.cpp @@ -15,8 +15,10 @@ #include "ecmascript/compiler/ts_hclass_generator.h" #include "ecmascript/global_env_constants-inl.h" -#include "ecmascript/subtyping_operator.h" +#include "ecmascript/layout_info.h" +#include "ecmascript/js_function.h" #include "ecmascript/jspandafile/class_info_extractor.h" +#include "ecmascript/subtyping_operator.h" namespace panda::ecmascript::kungfu { using ClassInfoExtractor = panda::ecmascript::ClassInfoExtractor; diff --git a/ecmascript/compiler/type_inference/pgo_type_infer_helper.cpp b/ecmascript/compiler/type_inference/pgo_type_infer_helper.cpp index 356ef156f8..9e1664d2d8 100644 --- a/ecmascript/compiler/type_inference/pgo_type_infer_helper.cpp +++ b/ecmascript/compiler/type_inference/pgo_type_infer_helper.cpp @@ -14,6 +14,8 @@ */ #include "ecmascript/compiler/type_inference/pgo_type_infer_helper.h" + +#include "ecmascript/js_hclass-inl.h" #include "ecmascript/ts_types/ts_type_accessor.h" namespace panda::ecmascript::kungfu { diff --git a/ecmascript/debugger/js_debugger_interface.h b/ecmascript/debugger/js_debugger_interface.h index 386124d5f0..faa8f5b992 100644 --- a/ecmascript/debugger/js_debugger_interface.h +++ b/ecmascript/debugger/js_debugger_interface.h @@ -21,7 +21,10 @@ #include "ecmascript/napi/include/jsnapi.h" #include "ecmascript/debugger/js_pt_location.h" -namespace panda::ecmascript::tooling { +namespace panda::ecmascript { +class Method; + +namespace tooling { struct JSPtStepRange { uint32_t startBcOffset {0}; uint32_t endBcOffset {0}; @@ -139,6 +142,7 @@ public: NO_COPY_SEMANTIC(JSDebugInterface); NO_MOVE_SEMANTIC(JSDebugInterface); }; -} // namespace panda::ecmascript::tooling +} // namespace tooling +} // namespace panda::ecmascript #endif // ECMASCRIPT_DEBUGGER_JS_DEBUG_INTERFACE_H diff --git a/ecmascript/jspandafile/accessor/module_data_accessor.cpp b/ecmascript/jspandafile/accessor/module_data_accessor.cpp index da6ec423d4..78994b21a5 100644 --- a/ecmascript/jspandafile/accessor/module_data_accessor.cpp +++ b/ecmascript/jspandafile/accessor/module_data_accessor.cpp @@ -16,6 +16,7 @@ #include "ecmascript/jspandafile/accessor/module_data_accessor.h" #include "ecmascript/global_env_constants-inl.h" #include "ecmascript/jspandafile/js_pandafile_manager.h" +#include "ecmascript/tagged_array-inl.h" namespace panda::ecmascript { ModuleDataAccessor::ModuleDataAccessor(const JSPandaFile *pandaFile, EntityId moduleDataId) diff --git a/ecmascript/jspandafile/js_pandafile.h b/ecmascript/jspandafile/js_pandafile.h index e354fcfbc8..d4314ad305 100644 --- a/ecmascript/jspandafile/js_pandafile.h +++ b/ecmascript/jspandafile/js_pandafile.h @@ -17,7 +17,6 @@ #define ECMASCRIPT_JSPANDAFILE_JS_PANDAFILE_H #include "ecmascript/common.h" -#include "ecmascript/js_function.h" #include "ecmascript/jspandafile/constpool_value.h" #include "ecmascript/jspandafile/method_literal.h" #include "ecmascript/mem/c_containers.h" diff --git a/ecmascript/mem/heap.cpp b/ecmascript/mem/heap.cpp index 40b7b29a84..4143600b3c 100644 --- a/ecmascript/mem/heap.cpp +++ b/ecmascript/mem/heap.cpp @@ -15,6 +15,9 @@ #include "ecmascript/mem/heap-inl.h" +#include +#include + #include "ecmascript/ecma_vm.h" #include "ecmascript/free_object.h" #include "ecmascript/js_finalization_registry.h" @@ -1242,7 +1245,7 @@ bool Heap::AsyncClearTask::Run([[maybe_unused]] uint32_t threadIndex) bool Heap::FinishColdStartTask::Run([[maybe_unused]] uint32_t threadIndex) { - usleep(2000000); // 2000000 means 2s + std::this_thread::sleep_for(std::chrono::microseconds(2000000)); // 2000000 means 2s heap_->NotifyFinishColdStart(false); return true; } diff --git a/ecmascript/patch/quick_fix_manager.cpp b/ecmascript/patch/quick_fix_manager.cpp index 52bd6427dd..db8cded76c 100644 --- a/ecmascript/patch/quick_fix_manager.cpp +++ b/ecmascript/patch/quick_fix_manager.cpp @@ -14,10 +14,13 @@ */ #include "ecmascript/patch/quick_fix_manager.h" +#include "ecmascript/mem/barriers-inl.h" #include "ecmascript/global_env_constants-inl.h" #include "ecmascript/jspandafile/js_pandafile_manager.h" +#include "ecmascript/js_tagged_value-inl.h" #include "ecmascript/mem/c_string.h" #include "ecmascript/napi/include/jsnapi.h" +#include "ecmascript/object_factory.h" namespace panda::ecmascript { QuickFixManager::~QuickFixManager()