aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/loc.ml
diff options
context:
space:
mode:
authorGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2015-12-31 17:00:42 +0100
committerGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2015-12-31 17:00:42 +0100
commitd3bc575c498ae09ad1003405d17a9d5cfbcf3cbf (patch)
tree0e4073818b6de4b44e4282bdabf5ab7fb7191072 /lib/loc.ml
parentb2eaecf0e748e3c286e1ef337f72cee6d3475162 (diff)
Do not dump a glob reference when its location is ghost. (Fix bug #4469)
This patch also causes the code to finish a bit faster in the NoGlob case by not preparing a string for dump_string. It also optimizes Dumpglob.is_ghost by only checking whether the end position is zero. Note that no ghost locations were part of the glob files of the standard library before the patch. Note also that the html documentation of the standard library is bitwise identical before and after the patch.
Diffstat (limited to 'lib/loc.ml')
-rw-r--r--lib/loc.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/loc.ml b/lib/loc.ml
index b62677d48..9043bee07 100644
--- a/lib/loc.ml
+++ b/lib/loc.ml
@@ -31,7 +31,7 @@ let ghost = {
fname = ""; line_nb = -1; bol_pos = 0; line_nb_last = -1; bol_pos_last = 0;
bp = 0; ep = 0; }
-let is_ghost loc = Pervasives.(=) loc ghost (** FIXME *)
+let is_ghost loc = loc.ep = 0
let merge loc1 loc2 =
if loc1.bp < loc2.bp then