-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-33154 Refactor WebAssembly Support
Added list / set support Signed-off-by: Gordon Smith <[email protected]>
- Loading branch information
1 parent
70ccefc
commit 75808aa
Showing
42 changed files
with
2,379 additions
and
472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ref/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_subdirectory(src) | ||
add_subdirectory(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
project(component-model-cpp) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
set(SRC | ||
boolean.cpp | ||
boolean.hpp | ||
context.hpp | ||
context.cpp | ||
float.hpp | ||
float.cpp | ||
integer.hpp | ||
integer.cpp | ||
list.hpp | ||
list.cpp | ||
load.hpp | ||
load.cpp | ||
string.hpp | ||
string.cpp | ||
traits.hpp | ||
traits.cpp | ||
util.hpp | ||
util.cpp | ||
) | ||
|
||
add_library(${PROJECT_NAME} STATIC | ||
${SRC} | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
) | ||
|
||
target_compile_definitions(${PROJECT_NAME} | ||
PRIVATE CMCPP_EXPORTS | ||
) | ||
target_compile_options(${PROJECT_NAME} PUBLIC "$<$<COMPILE_LANG_AND_ID:CXX,MSVC>:/permissive->") | ||
|
||
target_include_directories( | ||
${PROJECT_NAME} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include/${PROJECT_NAME}-${PROJECT_VERSION}> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "boolean.hpp" | ||
#include "integer.hpp" | ||
#include "util.hpp" | ||
|
||
namespace cmcpp | ||
{ | ||
namespace boolean | ||
{ | ||
void store(CallContext &cx, const bool_t &v, offset ptr) | ||
{ | ||
integer::store<uint8_t>(cx, v, ptr); | ||
} | ||
|
||
bool_t load(const CallContext &cx, uint32_t ptr) | ||
{ | ||
return convert_int_to_bool(integer::load<uint8_t>(cx, ptr)); | ||
} | ||
} | ||
} |
Oops, something went wrong.