@@ -47,51 +47,16 @@ module EvalBase = struct
47
47
48
48
let eval_compilation_unit cu =
49
49
try
50
- Symtable. get_global_value
51
- (cu |> Compilation_unit. to_global_ident_for_bytecode)
52
- with Symtable. Error (Undefined_global name ) ->
53
- raise (Undefined_global name)
50
+ Symtable. get_global_value (Symtable.Global. of_compilation_unit cu)
51
+ with Symtable. Error (Undefined_global global ) ->
52
+ raise (Undefined_global (Symtable.Global. name global))
54
53
55
54
let eval_ident id =
56
- <<<<<<< HEAD
57
55
let name = Translmod. toplevel_name id in
58
56
try
59
57
String.Map. find name ! toplevel_value_bindings
60
58
with Not_found ->
61
59
raise (Undefined_global name)
62
- ||||||| 121 bedcfd2
63
- if Ident. persistent id || Ident. global id then begin
64
- try
65
- Symtable. get_global_value id
66
- with Symtable. Error (Undefined_global name ) ->
67
- raise (Undefined_global name)
68
- end else begin
69
- let name = Translmod. toplevel_name id in
70
- try
71
- String.Map. find name ! toplevel_value_bindings
72
- with Not_found ->
73
- raise (Undefined_global name)
74
- end
75
- =======
76
- if Ident. global id then begin
77
- let name = Ident. name id in
78
- let global =
79
- if Ident. persistent id
80
- then Symtable.Global. Glob_compunit (Cmo_format. Compunit name)
81
- else Symtable.Global. Glob_predef (Cmo_format. Predef_exn name)
82
- in
83
- try
84
- Symtable. get_global_value global
85
- with Symtable. Error (Undefined_global _ ) ->
86
- raise (Undefined_global name)
87
- end else begin
88
- let name = Translmod. toplevel_name id in
89
- try
90
- String.Map. find name ! toplevel_value_bindings
91
- with Not_found ->
92
- raise (Undefined_global name)
93
- end
94
- >>>>>>> 5.2 .0
95
60
96
61
end
97
62
@@ -304,8 +269,11 @@ and really_load_file recursive ppf name filename ic =
304
269
| Reloc_getcompunit cu
305
270
when not (Symtable. is_global_defined
306
271
(Symtable.Global. Glob_compunit cu)) ->
307
- let file = (Symtable.Compunit. name cu) ^ " .cmo" in
308
- begin match Load_path. find_normalized file with
272
+ let file =
273
+ (Compilation_unit.Name. to_string (Compilation_unit. name cu))
274
+ ^ " .cmo"
275
+ in
276
+ begin match Load_path. find_uncap file with
309
277
| exception Not_found -> ()
310
278
| file ->
311
279
if not (load_file recursive ppf file) then raise Load_failed
0 commit comments