diff --git a/CAP/gap/CategoryMorphisms.gi b/CAP/gap/CategoryMorphisms.gi index 727588a8de..10e919866b 100644 --- a/CAP/gap/CategoryMorphisms.gi +++ b/CAP/gap/CategoryMorphisms.gi @@ -258,7 +258,7 @@ InstallMethod( RandomMorphism, InstallGlobalFunction( ObjectifyMorphismForCAPWithAttributes, function( arg_list... ) - local category, morphism, objectified_morphism; + local category, objectified_morphism; category := arg_list[ 2 ]; @@ -275,8 +275,8 @@ InstallGlobalFunction( ObjectifyMorphismForCAPWithAttributes, objectified_morphism := CallFuncList( ObjectifyWithAttributes, arg_list ); if category!.predicate_logic then - INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Source", [ objectified_morphism ], Source( morphism ), category ); - INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Range", [ objectified_morphism ], Range( morphism ), category ); + INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Source", [ objectified_morphism ], Source( objectified_morphism ), category ); + INSTALL_TODO_FOR_LOGICAL_THEOREMS( "Range", [ objectified_morphism ], Range( objectified_morphism ), category ); fi; return objectified_morphism; diff --git a/CompilerForCAP/PackageInfo.g b/CompilerForCAP/PackageInfo.g index 84f6af96d0..e3d3264db9 100644 --- a/CompilerForCAP/PackageInfo.g +++ b/CompilerForCAP/PackageInfo.g @@ -11,7 +11,7 @@ SetPackageInfo( rec( PackageName := "CompilerForCAP", Subtitle := "This package allows to \"compile\" the code of CAP categories.", Version := Maximum( [ - "2020.06.17", ## Fabian's version + "2020.07.06", ## Fabian's version ## this line prevents merge conflicts ] ), Date := ~.Version{[ 1 .. 10 ]}, diff --git a/CompilerForCAP/gap/ResolveGlobalVariables.gi b/CompilerForCAP/gap/ResolveGlobalVariables.gi index 523a95bc5c..9f9f3fad5e 100644 --- a/CompilerForCAP/gap/ResolveGlobalVariables.gi +++ b/CompilerForCAP/gap/ResolveGlobalVariables.gi @@ -9,15 +9,16 @@ InstallGlobalFunction( "CapJitResolvedGlobalVariables", function( tree ) if IsRecord( tree ) and not ( IsBound( tree.CAP_JIT_NOT_RESOLVABLE ) and tree.CAP_JIT_NOT_RESOLVABLE ) then - if tree.type = "EXPR_REF_GVAR" then + # do not resolve the global variable "Julia" since we otherwise lose information about the Julia module and operation + if tree.type = "EXPR_REF_GVAR" and tree.gvar <> "Julia" then value := ValueGlobal( tree.gvar ); - elif tree.type = "EXPR_ELM_COMOBJ_NAME" and tree.comobj.type = "EXPR_REF_GVAR" then + elif tree.type = "EXPR_ELM_COMOBJ_NAME" and tree.comobj.type = "EXPR_REF_GVAR" and tree.comobj.gvar <> "Julia" then value := ValueGlobal( tree.comobj.gvar )!.(tree.name); - elif tree.type = "EXPR_ELM_REC_NAME" and tree.record.type = "EXPR_REF_GVAR" then + elif tree.type = "EXPR_ELM_REC_NAME" and tree.record.type = "EXPR_REF_GVAR" and tree.record.gvar <> "Julia" then value := ValueGlobal( tree.record.gvar ).(tree.name); diff --git a/CompilerForCAP/gap/ResolveOperations.gi b/CompilerForCAP/gap/ResolveOperations.gi index 1981015ebe..e7b32a2eb3 100644 --- a/CompilerForCAP/gap/ResolveOperations.gi +++ b/CompilerForCAP/gap/ResolveOperations.gi @@ -111,7 +111,7 @@ InstallGlobalFunction( CapJitResolvedOperations, function( tree, jit_args ) if Length( filter_list ) = Length( arguments ) and ForAll( [ 1 .. Length( filter_list ) ], i -> replaced_filter_list[i](arguments[i]) ) then # do not infer category from other_object et al. - positions := PositionsProperty( filter_list, x -> x in [ "object", "morphism", "twocell", "list_of_objects", "list_of_morphisms" ] ); + positions := PositionsProperty( filter_list, x -> x in [ "category", "object", "morphism", "twocell", "list_of_objects", "list_of_morphisms" ] ); category := CapJitGetCapCategoryFromArguments( arguments{ positions } ); if category = fail then @@ -185,7 +185,7 @@ InstallGlobalFunction( CapJitResolvedOperations, function( tree, jit_args ) if not IsKernelFunction( method ) then - resolved_tree := ENHANCED_SYNTAX_TREE( method ); + resolved_tree := ENHANCED_SYNTAX_TREE( method, true ); if Length( resolved_tree.stats.statements ) >= 1 and resolved_tree.stats.statements[1].type = "STAT_PRAGMA" and resolved_tree.stats.statements[1].value = "% CAP_JIT_RESOLVE_FUNCTION" then