vxx2 / vlib / v2_toberemoved / ssa / helpers.v
19 lines · 16 sloc · 404 bytes · c0624b274a458fe3e487d89ae9554c2e8c25bdb6
Raw
1// Copyright (c) 2026 Alexander Medvednikov. All rights reserved.
2// Use of this source code is governed by an MIT license
3// that can be found in the LICENSE file.
4
5module ssa
6
7fn map_get_type_id(m map[string]TypeID, key string) ?TypeID {
8 if key in m {
9 return m[key]
10 }
11 return none
12}
13
14fn map_get_value_id(m map[string]ValueID, key string) ?ValueID {
15 if key in m {
16 return m[key]
17 }
18 return none
19}
20