Skip to content

Commit

Permalink
temp upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
yokofly committed Sep 26, 2023
1 parent 351ac1c commit e147658
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 86 deletions.
80 changes: 0 additions & 80 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,86 +100,6 @@ set(enable-fpic
$<$<CXX_COMPILER_ID:GNU>:-fPIC>
)

#
# d8
#

add_executable(
d8
$<${is-posix}:v8/src/d8/d8-posix.cc>
$<${is-win}:v8/src/d8/d8-windows.cc>
v8/src/d8/async-hooks-wrapper.cc
v8/src/d8/d8-console.cc
v8/src/d8/d8-js.cc
v8/src/d8/d8-test.cc
v8/src/d8/d8-platforms.cc
v8/src/d8/d8.cc
)

target_compile_definitions(d8 PRIVATE $<${is-msvc}:_HAS_EXCEPTIONS=0>)
target_compile_options(d8 PRIVATE ${disable-exceptions})
if(enable-fPIC)
target_compile_options(d8 PRIVATE ${enable-fpic})
endif()

target_include_directories(d8
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/v8/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/v8>
)

target_link_libraries(d8
PRIVATE
v8_base_without_compiler
v8_compiler
v8_snapshot
v8_inspector
v8_libplatform
)

# add shell and hello-world
add_executable(
shell
v8/samples/shell.cc
)
target_include_directories(shell
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/v8/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/v8>
)
target_link_libraries(shell
PRIVATE
v8_base_without_compiler
v8_compiler
v8_snapshot
v8_inspector
v8_libplatform
)

add_executable(
hello-world
v8/samples/hello-world.cc
)
target_include_directories(hello-world
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/v8/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/v8>
)
target_link_libraries(hello-world
PRIVATE
v8_base_without_compiler
v8_compiler
v8_snapshot
v8_inspector
v8_libplatform
)

# more granular library support
add_library(v8-i18n-support OBJECT)
set_property(TARGET v8-i18n-support PROPERTY EXCLUDE_FROM_ALL ON)
Expand Down
13 changes: 7 additions & 6 deletions generated/builtins-generated/bytecodes-builtins-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ namespace internal {
V(DefineKeyedOwnPropertyHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kDefineKeyedOwnProperty) \
V(StaInArrayLiteralHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kStaInArrayLiteral) \
V(DefineKeyedOwnPropertyInLiteralHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kDefineKeyedOwnPropertyInLiteral) \
V(CollectTypeProfileHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCollectTypeProfile) \
V(AddHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kAdd) \
V(SubHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kSub) \
V(MulHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kMul) \
Expand Down Expand Up @@ -102,6 +101,7 @@ namespace internal {
V(DeletePropertyStrictHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kDeletePropertyStrict) \
V(DeletePropertySloppyHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kDeletePropertySloppy) \
V(GetSuperConstructorHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kGetSuperConstructor) \
V(FindNonDefaultConstructorOrConstructHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kFindNonDefaultConstructorOrConstruct) \
V(CallAnyReceiverHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCallAnyReceiver) \
V(CallPropertyHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCallProperty) \
V(CallProperty0Handler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCallProperty0) \
Expand Down Expand Up @@ -131,6 +131,7 @@ namespace internal {
V(ToNumericHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kToNumeric) \
V(ToObjectHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kToObject) \
V(ToStringHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kToString) \
V(ToBooleanHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kToBoolean) \
V(CreateRegExpLiteralHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCreateRegExpLiteral) \
V(CreateArrayLiteralHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCreateArrayLiteral) \
V(CreateArrayFromIterableHandler, interpreter::OperandScale::kSingle, interpreter::Bytecode::kCreateArrayFromIterable) \
Expand Down Expand Up @@ -235,7 +236,6 @@ namespace internal {
V(DefineKeyedOwnPropertyWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kDefineKeyedOwnProperty) \
V(StaInArrayLiteralWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kStaInArrayLiteral) \
V(DefineKeyedOwnPropertyInLiteralWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kDefineKeyedOwnPropertyInLiteral) \
V(CollectTypeProfileWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kCollectTypeProfile) \
V(AddWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kAdd) \
V(SubWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kSub) \
V(MulWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kMul) \
Expand Down Expand Up @@ -267,6 +267,7 @@ namespace internal {
V(DeletePropertyStrictWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kDeletePropertyStrict) \
V(DeletePropertySloppyWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kDeletePropertySloppy) \
V(GetSuperConstructorWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kGetSuperConstructor) \
V(FindNonDefaultConstructorOrConstructWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kFindNonDefaultConstructorOrConstruct) \
V(CallAnyReceiverWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kCallAnyReceiver) \
V(CallPropertyWideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kCallProperty) \
V(CallProperty0WideHandler, interpreter::OperandScale::kDouble, interpreter::Bytecode::kCallProperty0) \
Expand Down Expand Up @@ -385,7 +386,6 @@ namespace internal {
V(DefineKeyedOwnPropertyExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kDefineKeyedOwnProperty) \
V(StaInArrayLiteralExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kStaInArrayLiteral) \
V(DefineKeyedOwnPropertyInLiteralExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kDefineKeyedOwnPropertyInLiteral) \
V(CollectTypeProfileExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kCollectTypeProfile) \
V(AddExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kAdd) \
V(SubExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kSub) \
V(MulExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kMul) \
Expand Down Expand Up @@ -417,6 +417,7 @@ namespace internal {
V(DeletePropertyStrictExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kDeletePropertyStrict) \
V(DeletePropertySloppyExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kDeletePropertySloppy) \
V(GetSuperConstructorExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kGetSuperConstructor) \
V(FindNonDefaultConstructorOrConstructExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kFindNonDefaultConstructorOrConstruct) \
V(CallAnyReceiverExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kCallAnyReceiver) \
V(CallPropertyExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kCallProperty) \
V(CallProperty0ExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kCallProperty0) \
Expand Down Expand Up @@ -495,15 +496,15 @@ namespace internal {
V(IncBlockCounterExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kIncBlockCounter) \
V(AbortExtraWideHandler, interpreter::OperandScale::kQuadruple, interpreter::Bytecode::kAbort)

constexpr int kNumberOfBytecodeHandlers = 183;
constexpr int kNumberOfBytecodeHandlers = 184;
constexpr int kNumberOfWideBytecodeHandlers = 150;

constexpr uint8_t kIllegalBytecodeHandlerEncoding = 255;

// Mapping from Bytecode to a dense form with all the illegal
// wide Bytecodes removed. Used to index into the builtins table.
constexpr uint8_t kWideBytecodeToBuiltinsMapping[198] = {
255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 255, 7, 255, 255, 255, 255, 255, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 255, 255, 255, 255, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 255, 255, 255, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 255, 101, 102, 255, 103, 104, 255, 105, 106, 107, 108, 109, 110, 111, 112, 255, 255, 255, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 255, 255, 255, 255, 142, 255, 255, 143, 144, 145, 146, 147, 255, 148, 149, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, };
constexpr uint8_t kWideBytecodeToBuiltinsMapping[199] = {
255, 255, 255, 255, 255, 0, 1, 2, 3, 4, 5, 6, 255, 7, 255, 255, 255, 255, 255, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 255, 255, 255, 255, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 255, 255, 255, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 255, 255, 101, 102, 255, 103, 104, 255, 105, 106, 107, 108, 109, 110, 111, 112, 255, 255, 255, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 255, 255, 255, 255, 142, 255, 255, 143, 144, 145, 146, 147, 255, 148, 149, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, };

} // namespace internal
} // namespace v8
Expand Down

0 comments on commit e147658

Please sign in to comment.