mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Fix code generation related to Objective-C related x->y() calls
This commit is contained in:
+4
-1
@@ -8769,7 +8769,10 @@ ExprKind check_selector_call_expr(CheckerContext *c, Operand *o, Ast *node, Type
|
|||||||
Ast *first_arg = x.expr->SelectorExpr.expr;
|
Ast *first_arg = x.expr->SelectorExpr.expr;
|
||||||
GB_ASSERT(first_arg != nullptr);
|
GB_ASSERT(first_arg != nullptr);
|
||||||
|
|
||||||
first_arg->state_flags |= StateFlag_SelectorCallExpr;
|
Entity *e = entity_of_node(se->expr);
|
||||||
|
if (!(e != nullptr && (e->kind == Entity_Procedure || e->kind == Entity_ProcGroup))) {
|
||||||
|
first_arg->state_flags |= StateFlag_SelectorCallExpr;
|
||||||
|
}
|
||||||
|
|
||||||
Type *pt = base_type(x.type);
|
Type *pt = base_type(x.type);
|
||||||
GB_ASSERT(pt->kind == Type_Proc);
|
GB_ASSERT(pt->kind == Type_Proc);
|
||||||
|
|||||||
@@ -2867,9 +2867,9 @@ lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) {
|
|||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ast *pexpr = unparen_expr(ce->proc);
|
Ast *proc_expr = unparen_expr(ce->proc);
|
||||||
if (proc_mode == Addressing_Builtin) {
|
if (proc_mode == Addressing_Builtin) {
|
||||||
Entity *e = entity_of_node(pexpr);
|
Entity *e = entity_of_node(proc_expr);
|
||||||
BuiltinProcId id = BuiltinProc_Invalid;
|
BuiltinProcId id = BuiltinProc_Invalid;
|
||||||
if (e != nullptr) {
|
if (e != nullptr) {
|
||||||
id = cast(BuiltinProcId)e->Builtin.id;
|
id = cast(BuiltinProcId)e->Builtin.id;
|
||||||
@@ -2881,7 +2881,6 @@ lbValue lb_build_call_expr_internal(lbProcedure *p, Ast *expr) {
|
|||||||
|
|
||||||
// NOTE(bill): Regular call
|
// NOTE(bill): Regular call
|
||||||
lbValue value = {};
|
lbValue value = {};
|
||||||
Ast *proc_expr = unparen_expr(ce->proc);
|
|
||||||
|
|
||||||
Entity *proc_entity = entity_of_node(proc_expr);
|
Entity *proc_entity = entity_of_node(proc_expr);
|
||||||
if (proc_entity != nullptr) {
|
if (proc_entity != nullptr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user