v / vlib / v2 / ssa / helpers.v
19 lines · 16 sloc · 404 bytes · 09cc0c5133d075ee6dcff29286dce7eb7d4421da
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