Skip to content

Commit

Permalink
flambda-backend: Revert "Semaphore without probes: dummy notes (#142)" (
Browse files Browse the repository at this point in the history
#242)

This reverts commit 8c9bf5e.
  • Loading branch information
gretay-js authored Sep 10, 2021
1 parent c98530f commit bd4ce4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions typing/typecore.ml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ type error =
| Probe_format
| Probe_name_too_long of string
| Probe_name_format of string
| Probe_name_undefined of string
| Probe_is_enabled_format
| Literal_overflow of string
| Unknown_literal of string * char
Expand Down Expand Up @@ -3752,6 +3753,10 @@ and type_expect_
_ } ,
_)}]) ->
check_probe_name name name_loc env;
add_delayed_check
(fun () ->
if not (Env.has_probe name) then
raise(Error(name_loc, env, (Probe_name_undefined name))));
rue {
exp_desc = Texp_probe_is_enabled {name};
exp_loc = loc; exp_extra = [];
Expand Down Expand Up @@ -5601,6 +5606,11 @@ let report_error ~loc env = function
Probe names may only contain alphanumeric characters or \
underscores."
name
| Probe_name_undefined name ->
Location.errorf ~loc
"Undefined probe name `%s' used in %%probe_is_enabled. \
Not found [%%probe \"%s\" ...] in the same compilation unit."
name name
| Probe_format ->
Location.errorf ~loc
"Probe points must consist of a name, as a string \
Expand Down
1 change: 1 addition & 0 deletions typing/typecore.mli
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ type error =
| Probe_format
| Probe_name_too_long of string
| Probe_name_format of string
| Probe_name_undefined of string
(* CR-soon mshinwell: Use an inlined record *)
| Probe_is_enabled_format
| Literal_overflow of string
Expand Down

0 comments on commit bd4ce4a

Please sign in to comment.