diff --git a/src/julec/obj/cxx/expr.jule b/src/julec/obj/cxx/expr.jule index aaf86b034..905f30391 100644 --- a/src/julec/obj/cxx/expr.jule +++ b/src/julec/obj/cxx/expr.jule @@ -478,6 +478,31 @@ impl ExprCoder { } } + fn push_call_inf(mut self, mut &obj: str, &m: &FnCallExprModel) { + if env::PRODUCTION || (!m.func.anon && !is_builtin_call_has_debuginf(m)) { + obj += "(" + ret + } + if m.func.anon { + match type m.expr { + | &StructSubIdentExprModel: + if (&StructSubIdentExprModel)(m.expr).field.decl.owner.cpp_linked { + obj += "(" + ret + } + fall + |: + obj += ".call" + } + } + obj += "(\"" + obj += self.oc.loc_info(m.token) + obj += "\"" + if m.args.len != 0 { + obj += "," + } + } + fn pure_func_call(mut self, mut &m: &FnCallExprModel): str { let mut obj = self.model_for_call(m.expr) if !m.func.is_builtin() { @@ -493,27 +518,7 @@ impl ExprCoder { } } } - if !env::PRODUCTION && (m.func.anon || is_builtin_call_has_debuginf(m)) { - if m.func.anon { - match type m.expr { - | &StructSubIdentExprModel: - if (&StructSubIdentExprModel)(m.expr).field.decl.owner.cpp_linked { - break - } - fall - |: - obj += ".call" - } - } - obj += "(\"" - obj += self.oc.loc_info(m.token) - obj += "\"" - if m.args.len != 0 { - obj += "," - } - } else { - obj += "(" - } + self.push_call_inf(obj, m) obj += self.args(m.args) obj += ")" diff --git a/src/julec/obj/cxx/object.jule b/src/julec/obj/cxx/object.jule index 66abfff6e..f8a631ef7 100644 --- a/src/julec/obj/cxx/object.jule +++ b/src/julec/obj/cxx/object.jule @@ -85,7 +85,7 @@ impl ObjectCoder { // Returns location information of token as cstr bytes. fn loc_info(self, &t: Token): str { - let mut loc = if t.file == nil { "/jule/builtin" } else { t.file.path() } + let mut loc = t.file.path() // Normalize path if production compilation enabled. if env::PRODUCTION { @@ -100,7 +100,6 @@ impl ObjectCoder { loc = loc[path::dir(self.ir.root).len + 1:] } } - loc += ":" loc += conv::itoa(t.row) loc += ":" diff --git a/std/jule/sema/builtin.jule b/std/jule/sema/builtin.jule index b13eefd55..a521267cd 100644 --- a/std/jule/sema/builtin.jule +++ b/std/jule/sema/builtin.jule @@ -222,6 +222,7 @@ fn builtin_caller_common_plain(mut &e: &Eval, mut &fc: &FnCallExpr, mut &d: &Dat func: f, expr: d.model, args: fcac.arg_models, + token: fc.token, } if f.result == nil { diff --git a/std/jule/sema/eval.jule b/std/jule/sema/eval.jule index 6f15e74b9..a8f3ce849 100644 --- a/std/jule/sema/eval.jule +++ b/std/jule/sema/eval.jule @@ -2006,7 +2006,6 @@ impl Eval { if d == nil { ret } - d.mutable = true } @@ -2040,7 +2039,6 @@ impl Eval { ch = &Scope{} csc.table.vars = append(csc.table.vars, build_error_var(ch, fc)) csc.check(fc.exception, ch) - | &ScopeChecker: let mut sc = (&ScopeChecker)(self.lookup) csc = sc.new_child_checker()