LLVM Stage 1#60
Merged
Merged
Conversation
| if not _llvm_targets_initialized: | ||
| llvm.initialize_all_targets() | ||
| llvm.initialize_all_asmprinters() | ||
| _llvm_targets_initialized = True |
Comment on lines
+19
to
+33
| from fpy.types import ( | ||
| INTERNAL_STRING, | ||
| LOG_SEVERITY, | ||
| NOTHING, | ||
| TIME, | ||
| TIME_BASE, | ||
| BOOL, | ||
| U8, | ||
| U16, | ||
| U32, | ||
| I64, | ||
| F64, | ||
| FpyValue, | ||
| FpyType, | ||
| ) |
| from fpy.types import U32 | ||
|
|
||
| from fpy.model import DirectiveErrorCode | ||
| import fpy.test_helpers as test_helpers |
| exit(1) | ||
| if error_code != 0: | ||
| print("Sequence exited with error code " + str(error_code)) | ||
| exit(error_code) |
| assert run_seq_wasm(f"assert 1 == 2{suffix}\n") == expected | ||
|
|
||
|
|
||
| class TestWasmExit: |
|
|
||
| from fpy.error import BackendError | ||
| from fpy.model import DirectiveErrorCode | ||
| from fpy.state import CompileState |
| ) | ||
| from fpy.bytecode.directives import ErrorCodeType | ||
| from fpy.types import FpyValue, is_instance_compat | ||
| from fpy.visitors import STOP_DESCENT, Emitter, TopDownVisitor |
| ends the whole sequence from any call depth (code 0 is a normal exit, | ||
| nonzero a fault). | ||
| """ | ||
| from fpy.codegen_llvm import emit_host_exit |
| from fpy.dictionary import json_default_to_fpy_value, load_dictionary | ||
| from fpy.error import CompileError, DictionaryError | ||
| from fpy.ir import Ir, IrLabel | ||
| from fpy.macros import MACROS |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Description
--emitoption for switching between fpybin, fpyasm, wasm, wat and llvm-ir--wasmflag to switch between running on Python model backend and WASM backend for testsexitbuiltin takes an I32, all error codes are in I32 nowMisc changes