Apply clang-format for more src files and update spec test script (#775)

Apply clang-format for core/iwasm/include, core/iwasm/common and
core/iwasm/aot files.

Update spec cases test script:
- Checkout latest commit of https://github.com/WebAssembly/spec
- Checkout main branch but not master of https://github.com/WebAssembly/threads
- Update wabt to latest version

And update source debugging document.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2021-10-08 17:47:11 +08:00
committed by GitHub
parent 6415e1b006
commit 52b6c73d9c
37 changed files with 2835 additions and 2875 deletions

View File

@ -12,14 +12,14 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* Copyright (C) 2021 Ant Group. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
#include "bh_log.h"
#include "bh_platform.h"
#include "wasm_runtime.h"
#include "../../interpreter/wasm_runtime.h"
#include <stdio.h>
#include <assert.h>
@ -35,11 +35,13 @@
extern "C" {
#endif
typedef enum {
/* clang-format off */
typedef enum JITAction {
JIT_NOACTION = 0,
JIT_REGISTER_FN,
JIT_UNREGISTER_FN
} JITAction;
/* clang-format on */
typedef struct JITCodeEntry {
struct JITCodeEntry *next_;
@ -78,7 +80,8 @@ void __attribute__((noinline)) __jit_debug_register_code()
JITDescriptor __jit_debug_descriptor = { 1, JIT_NOACTION, NULL, NULL };
#else
extern void __jit_debug_register_code();
extern void
__jit_debug_register_code();
extern JITDescriptor __jit_debug_descriptor;
#endif
@ -168,8 +171,7 @@ jit_debug_engine_init()
return true;
}
if (!(jit_debug_engine =
wasm_runtime_malloc(sizeof(WASMJITDebugEngine)))) {
if (!(jit_debug_engine = wasm_runtime_malloc(sizeof(WASMJITDebugEngine)))) {
LOG_ERROR("WASM JIT Debug Engine error: failed to allocate memory");
return false;
}