-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* implement simple libdyntype * pass validation tests for simple libdyntype --------- Signed-off-by: Xu Jun <[email protected]>
- Loading branch information
1 parent
12f6345
commit 8b0998d
Showing
29 changed files
with
1,837 additions
and
89 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
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 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,8 @@ | ||
# libdyntype with simple implementation | ||
|
||
This folder provides a simplified implementation of libdyntype without dependency to QuickJS, this may be useful especially on some resource constraint devices. | ||
|
||
> Note: this simple implementation of libdyntype doesn't support these features: | ||
> - Use JavaScript builtin object and their methods (such as JSON, JSON.stringify, Map, Map.prototype.get ...) | ||
> - prototype | ||
> - string encoding (all strings are stored as raw binary buffer without any encoding) |
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,34 @@ | ||
/* | ||
* Copyright (C) 2023 Intel Corporation. All rights reserved. | ||
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
*/ | ||
|
||
#include "pure_dynamic.h" | ||
|
||
/* We don't need a context for simple libdyntype implementation, but we return a | ||
* non-zero value to make the system work */ | ||
static dyn_ctx_t g_dynamic_context = (dyn_ctx_t)(uintptr_t)0xffff; | ||
|
||
/******************* Initialization and destroy *****************/ | ||
|
||
dyn_ctx_t | ||
dynamic_context_init() | ||
{ | ||
return g_dynamic_context; | ||
} | ||
|
||
dyn_ctx_t | ||
dynamic_context_init_with_opt(dyn_options_t *options) | ||
{ | ||
return g_dynamic_context; | ||
} | ||
|
||
void | ||
dynamic_context_destroy(dyn_ctx_t ctx) | ||
{} | ||
|
||
dyn_ctx_t | ||
dynamic_get_context() | ||
{ | ||
return g_dynamic_context; | ||
} |
Oops, something went wrong.