mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-17 21:21:04 +00:00
Add @(require_results) where missing
This commit is contained in:
@@ -66,6 +66,7 @@ decode :: proc(
|
||||
}
|
||||
|
||||
|
||||
@(require_results)
|
||||
decode_one :: proc(
|
||||
data: []u8,
|
||||
relocs: []Relocation,
|
||||
@@ -230,7 +231,7 @@ decode_one :: proc(
|
||||
|
||||
// Which index space the IDX immediate in operand slot `which` addresses, by
|
||||
// mnemonic. Mirrors how the builders in instructions.odin tag each operand.
|
||||
@(private="file")
|
||||
@(private="file", require_results)
|
||||
idx_kind_for :: #force_inline proc "contextless" (m: Mnemonic, which: int) -> Index_Kind {
|
||||
#partial switch m {
|
||||
case .BR, .BR_IF: return .LABEL
|
||||
@@ -247,7 +248,7 @@ idx_kind_for :: #force_inline proc "contextless" (m: Mnemonic, which: int) -> In
|
||||
return .NONE
|
||||
}
|
||||
|
||||
@(private="file")
|
||||
@(private="file", require_results)
|
||||
reloc_label_at :: #force_inline proc "contextless" (relocs: []Relocation, offset: u32) -> (label_id: u32, found: bool) {
|
||||
for r in relocs {
|
||||
if r.offset == offset {
|
||||
|
||||
@@ -132,6 +132,7 @@ write_uleb_padded5 :: #force_inline proc "contextless" (code: []u8, offset: ^u32
|
||||
}
|
||||
}
|
||||
|
||||
@(require_results)
|
||||
uleb_size :: #force_inline proc "contextless" (value: u64) -> u32 {
|
||||
v := value
|
||||
n: u32 = 1
|
||||
@@ -141,6 +142,7 @@ uleb_size :: #force_inline proc "contextless" (value: u64) -> u32 {
|
||||
return n
|
||||
}
|
||||
|
||||
@(require_results)
|
||||
sleb_size :: #force_inline proc "contextless" (value: i64) -> u32 {
|
||||
v := value
|
||||
n: u32 = 0
|
||||
|
||||
@@ -41,6 +41,7 @@ Print_Options :: isa.Print_Options
|
||||
Print_Result :: isa.Print_Result
|
||||
DEFAULT_PRINT_OPTIONS :: isa.DEFAULT_PRINT_OPTIONS
|
||||
|
||||
@(require_results)
|
||||
mnemonic_to_string :: proc(m: Mnemonic, lowercase: bool = true, allocator := context.temp_allocator) -> string {
|
||||
sb := strings.builder_make(allocator)
|
||||
write_mnemonic(&sb, m, !lowercase)
|
||||
|
||||
Reference in New Issue
Block a user