Skip to content

Commit 99bac72

Browse files
committed
---
yaml --- r: 371 b: refs/heads/master c: 1b41d7b h: refs/heads/master i: 369: 3cd1c2a 367: a1bd656 v: v3
1 parent b2470eb commit 99bac72

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 025b1e4133eb89e53cfb5b1e876917182b965418
2+
refs/heads/master: 1b41d7be1ab43594982361f58e49e2d399ccbfb4

trunk/src/boot/me/semant.ml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ type ctxt =
169169
ctxt_required_lib_num: (required_lib, int) Hashtbl.t;
170170

171171
ctxt_main_fn_fixup: fixup option;
172-
ctxt_main_name: string option;
172+
ctxt_main_name: Ast.name option;
173173
}
174174
;;
175175

@@ -254,10 +254,7 @@ let new_ctxt sess abi crate =
254254
None -> None
255255
| Some n -> Some (new_fixup (string_of_name n)));
256256

257-
ctxt_main_name =
258-
(match crate.Ast.crate_main with
259-
None -> None
260-
| Some n -> Some (string_of_name n));
257+
ctxt_main_name = crate.Ast.crate_main;
261258
}
262259
;;
263260

trunk/src/boot/me/trans.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5313,7 +5313,7 @@ let fixup_assigning_visitor
53135313

53145314
| Ast.MOD_ITEM_fn _ ->
53155315
begin
5316-
let path = path_name () in
5316+
let path = path_to_name path in
53175317
let fixup =
53185318
if (not cx.ctxt_sess.Session.sess_library_mode)
53195319
&& (Some path) = cx.ctxt_main_name
@@ -5322,7 +5322,7 @@ let fixup_assigning_visitor
53225322
None -> bug () "missing main fixup in trans"
53235323
| Some fix -> fix
53245324
else
5325-
new_fixup path
5325+
new_fixup (path_name())
53265326
in
53275327
htab_put cx.ctxt_fn_fixups i.id fixup;
53285328
end
@@ -5390,7 +5390,9 @@ let process_crate
53905390
begin
53915391
match cx.ctxt_main_name with
53925392
None -> ()
5393-
| Some m -> log cx "with main fn %s" m
5393+
| Some m ->
5394+
log cx "with main fn %a"
5395+
Ast.sprintf_name m
53945396
end;
53955397
run_passes cx "trans" path passes
53965398
cx.ctxt_sess.Session.sess_log_trans log crate;

0 commit comments

Comments
 (0)