@@ -19,6 +19,10 @@ use zyntax_typed_ast::{
1919 ConstValue , InternedString , Type ,
2020} ;
2121
22+ /// Internal alias used when lowering `compute(...) { ... }` expressions.
23+ /// This must not collide with user code.
24+ const INTERNAL_COMPUTE_ALIAS : & str = "__internal_compute_dispatch" ;
25+
2226/// SSA builder state
2327pub struct SsaBuilder {
2428 /// Current function being built
@@ -1752,11 +1756,9 @@ impl SsaBuilder {
17521756 if name_str == "Some" || name_str == "Ok" || name_str == "Err" {
17531757 return self
17541758 . translate_enum_constructor ( block_id, & name_str, args, & expr. ty ) ;
1755- }
1756-
1757- // Check if this is an external runtime symbol (e.g., "$haxe$trace$int")
1758- // External symbols start with '$' and are resolved at link time
1759- if name_str. starts_with ( '$' ) {
1759+ } else if name_str. starts_with ( '$' ) {
1760+ // Check if this is an external runtime symbol (e.g., "$haxe$trace$int")
1761+ // External symbols start with '$' and are resolved at link time
17601762 ( crate :: hir:: HirCallable :: Symbol ( name_str) , None )
17611763 } else if let Some ( & func_id) = self . function_symbols . get ( func_name) {
17621764 // Direct function call to known function
@@ -1851,7 +1853,7 @@ impl SsaBuilder {
18511853 TypedExpression :: Compute ( compute) => {
18521854 // Lower compute expressions through the existing call pipeline for now.
18531855 // This preserves call-based execution while keeping typed compute structure.
1854- let compute_name = InternedString :: new_global ( "compute" ) ;
1856+ let compute_name = InternedString :: new_global ( INTERNAL_COMPUTE_ALIAS ) ;
18551857 let lowered = zyntax_typed_ast:: typed_ast:: TypedCall {
18561858 callee : Box :: new ( zyntax_typed_ast:: typed_node (
18571859 TypedExpression :: Variable ( compute_name) ,
0 commit comments