Skip to content

Commit

Permalink
Merge branch 'weak_ref' of github.com:Princess-org/Princess into weak…
Browse files Browse the repository at this point in the history
…_ref
  • Loading branch information
Victorious3 committed Apr 28, 2024
2 parents ab4631f + b185e56 commit e3ea8f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler.pr
Original file line number Diff line number Diff line change
Expand Up @@ -4293,9 +4293,9 @@ def walk_AlignOf(node: &parser::Node, state: &State) -> Value {
return value
}

def convert_ref_to_int(value: Value, loc: &Value, state: &State) -> Value {
let gep_ret = convert_ref_to_ptr(pointer(value.tpe.tpe if value.tpe.tpe else builtins::int8_), value, loc, state)
return state.ptr_to_int(gep_ret, loc)
def convert_ref_to_int(node: &parser::Node, value: Value, loc: &Value, state: &State) -> Value {
let ptr = convert_ref_to_ptr(pointer(value.tpe.tpe if value.tpe.tpe else builtins::int8_), value, loc, state)
return state.ptr_to_int(ptr, loc)
}

def compare(node: &parser::Node, left: Value, right: Value, state: &State) -> Value {
Expand Down

0 comments on commit e3ea8f0

Please sign in to comment.