diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-08 21:07:53 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-08 21:07:53 +0200 |
| commit | 2d8d0dd8515a4598d6e027f28818614c117ae0c4 (patch) | |
| tree | cf038003add5ddda2ef71395fe78a801c8a2abb0 /core/encoding/xml/tokenizer.odin | |
| parent | 1a20b78633038614635da99b5e634015d4ce7d6e (diff) | |
fix `@(optimization_mode)` usage in builtin collections
Diffstat (limited to 'core/encoding/xml/tokenizer.odin')
| -rw-r--r-- | core/encoding/xml/tokenizer.odin | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/encoding/xml/tokenizer.odin b/core/encoding/xml/tokenizer.odin index 2d06038b7..a2bbaf28e 100644 --- a/core/encoding/xml/tokenizer.odin +++ b/core/encoding/xml/tokenizer.odin @@ -126,7 +126,7 @@ error :: proc(t: ^Tokenizer, offset: int, msg: string, args: ..any) { t.error_count += 1 } -@(optimization_mode="speed") +@(optimization_mode="favor_size") advance_rune :: proc(t: ^Tokenizer) { #no_bounds_check { /* @@ -170,7 +170,7 @@ peek_byte :: proc(t: ^Tokenizer, offset := 0) -> byte { return 0 } -@(optimization_mode="speed") +@(optimization_mode="favor_size") skip_whitespace :: proc(t: ^Tokenizer) { for { switch t.ch { @@ -182,7 +182,7 @@ skip_whitespace :: proc(t: ^Tokenizer) { } } -@(optimization_mode="speed") +@(optimization_mode="favor_size") is_letter :: proc(r: rune) -> bool { if r < utf8.RUNE_SELF { switch r { @@ -296,7 +296,7 @@ skip_cdata :: proc(t: ^Tokenizer) -> (err: Error) { return } -@(optimization_mode="speed") +@(optimization_mode="favor_size") scan_string :: proc(t: ^Tokenizer, offset: int, close: rune = '<', consume_close := false, multiline := true) -> (value: string, err: Error) { err = .None @@ -414,4 +414,4 @@ scan :: proc(t: ^Tokenizer, multiline_string := false) -> Token { lit = string(t.src[offset : t.offset]) } return Token{kind, lit, pos} -}
\ No newline at end of file +} |