diff --git a/compiler/libqmlcompil/qmlAstCons.ml b/compiler/libqmlcompil/qmlAstCons.ml index b0519c56..0e054ea3 100644 --- a/compiler/libqmlcompil/qmlAstCons.ml +++ b/compiler/libqmlcompil/qmlAstCons.ml @@ -1,5 +1,5 @@ (* - Copyright © 2011 MLstate + Copyright © 2011, 2012 MLstate This file is part of Opa. @@ -981,6 +981,8 @@ struct let dot ?(label=Annot.next_label nopos) e f = Q.Dot (label, e, f) let extendrecord ?(label=Annot.next_label nopos) f e n = Q.ExtendRecord (label, f, e, n) let bypass ?(label=Annot.next_label nopos) s = Q.Bypass (label, s) + let restricted_bypass ?label ~pass s = + directive (`restricted_bypass pass) [bypass ?label s] [] let coerce ?(label=Annot.next_label nopos) e t = Q.Coerce (label, e, t) end diff --git a/compiler/libqmlcompil/qmlAstCons.mli b/compiler/libqmlcompil/qmlAstCons.mli index 5dac3d7f..31419cf2 100644 --- a/compiler/libqmlcompil/qmlAstCons.mli +++ b/compiler/libqmlcompil/qmlAstCons.mli @@ -1,5 +1,5 @@ (* - Copyright © 2011 MLstate + Copyright © 2011, 2012 MLstate This file is part of Opa. @@ -500,6 +500,7 @@ sig val dot : ?label:Annot.label -> QmlAst.expr -> string -> QmlAst.expr val extendrecord : ?label:Annot.label -> string -> QmlAst.expr -> QmlAst.expr -> QmlAst.expr val bypass : ?label:Annot.label -> BslKey.t -> QmlAst.expr + val restricted_bypass : ?label:Annot.label -> pass:string -> BslKey.t -> QmlAst.expr val coerce : ?label:Annot.label -> QmlAst.expr -> QmlAst.ty -> QmlAst.expr end