@@ -89,13 +89,16 @@ static GlobalVariable *jlfloat32temp_var;
8989static GlobalVariable *jlpgcstack_var;
9090#endif
9191static GlobalVariable *jlexc_var;
92+ static GlobalVariable *jldiverr_var;
93+ static GlobalVariable *jlundeferr_var;
94+ static GlobalVariable *jldomerr_var;
95+ static GlobalVariable *jlovferr_var;
96+ static GlobalVariable *jlinexacterr_var;
9297
9398// important functions
9499static Function *jlnew_func;
95100static Function *jlraise_func;
96101static Function *jlerror_func;
97- static Function *jluniniterror_func;
98- static Function *jldiverror_func;
99102static Function *jltypeerror_func;
100103static Function *jlcheckassign_func;
101104static Function *jldeclareconst_func;
@@ -1906,6 +1909,16 @@ static void init_julia_llvm_env(Module *m)
19061909 jlnull_var = global_to_llvm (" jl_null" , (void *)&jl_null);
19071910 jlexc_var = global_to_llvm (" jl_exception_in_transit" ,
19081911 (void *)&jl_exception_in_transit);
1912+ jldiverr_var = global_to_llvm (" jl_divbyzero_exception" ,
1913+ (void *)&jl_divbyzero_exception);
1914+ jlundeferr_var = global_to_llvm (" jl_undefref_exception" ,
1915+ (void *)&jl_undefref_exception);
1916+ jldomerr_var = global_to_llvm (" jl_domain_exception" ,
1917+ (void *)&jl_domain_exception);
1918+ jlovferr_var = global_to_llvm (" jl_overflow_exception" ,
1919+ (void *)&jl_overflow_exception);
1920+ jlinexacterr_var = global_to_llvm (" jl_inexact_exception" ,
1921+ (void *)&jl_inexact_exception);
19091922 jlfloat32temp_var =
19101923 new GlobalVariable (*jl_Module, T_float32,
19111924 false , GlobalVariable::PrivateLinkage,
@@ -1937,22 +1950,6 @@ static void init_julia_llvm_env(Module *m)
19371950 (void *)&jl_new_struct_uninit);
19381951
19391952 std::vector<Type*> empty_args (0 );
1940- jluniniterror_func =
1941- Function::Create (FunctionType::get (T_void, empty_args, false ),
1942- Function::ExternalLinkage,
1943- " jl_undef_ref_error" , jl_Module);
1944- jluniniterror_func->setDoesNotReturn ();
1945- jl_ExecutionEngine->addGlobalMapping (jluniniterror_func,
1946- (void *)&jl_undef_ref_error);
1947-
1948- jldiverror_func =
1949- Function::Create (FunctionType::get (T_void, empty_args, false ),
1950- Function::ExternalLinkage,
1951- " jl_divide_by_zero_error" , jl_Module);
1952- jldiverror_func->setDoesNotReturn ();
1953- jl_ExecutionEngine->addGlobalMapping (jldiverror_func,
1954- (void *)&jl_divide_by_zero_error);
1955-
19561953 setjmp_func =
19571954 Function::Create (FunctionType::get (T_int32, args1, false ),
19581955 Function::ExternalLinkage, " _setjmp" , jl_Module);
0 commit comments