Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[cleanup] blender: remove dead code related to db blender

  • Loading branch information...
commit c77c9c44a6da71eb7652eec77b765375e62844a5 1 parent 1a910b2
Mathieu Barbin authored
View
11 libqmlcompil/dbGen/dbGenByPass.ml
@@ -168,18 +168,8 @@ struct
let distributed = use_distributed_db
end
-module I_Fun : I with type env = ExprIdent.t -> ExprIdent.t =
-struct
- type env = ExprIdent.t -> ExprIdent.t
- let empty = fun i -> i
- let conv env id = env id
- let distributed = use_distributed_db
-end
-
-
module BSLDbGen = MakeS ( QmlInterface ) ( I_Unit )
module BSLDbGenAlpha = MakeS ( QmlInterface ) ( I_Alpha )
-module BSLDbGenFun = MakeS ( QmlInterface ) ( I_Fun )
module DbOpaInterface =
struct
@@ -200,4 +190,3 @@ struct
end
module BSLDbGenAlphaOpa = MakeS ( DbOpaInterface ) ( I_Alpha )
-module BSLDbGenFunOpa = MakeS ( DbOpaInterface ) ( I_Fun )
View
127 libqmlcompil/qmlBlender.ml
@@ -15,20 +15,9 @@
You should have received a copy of the GNU Affero General Public License
along with OPA. If not, see <http://www.gnu.org/licenses/>.
*)
-(*
- Authors
- 2009, Louis Gesbert <Louis.Gesbert@mlstate.com>
- 2009, Mathieu Barbin <Mathieu.Barbin@mlstate.com>
-*)
-(* depends *)
-module String = BaseString
-module List = BaseList
+(* deprecated structure still used everywhere in passes, s3passes *)
-(* shorthands *)
-module QT = QmlTypes
-
-(** The type returned by DbGenBlender, from scratch *)
type qml_milkshake =
{
(** contains gamma, schema, annotmap, etc.. *)
@@ -37,117 +26,3 @@ type qml_milkshake =
(** code of the program *)
code : QmlAst.code;
}
-
-module HighTyper = QmlTyper.DynamicallyChangeableTyper.HighTyper
-
- (* ------------------------------------------------------------ *)
- (* Initial Blender Part 1 (just to register type definitions) *)
- (* ------------------------------------------------------------ *)
- let blend_initial_part1 env code =
-
- (* 1°: sorting things out *)
- let code_defs, code_dbfiles, code_dbdefs, code =
- (* verbose "I-1) Sorting top-level nodes"; *)
- let sort_user = QmlAstSort.add QmlAstSort.empty code in
- let code_defs = QmlAstSort.Get.new_type sort_user
- and code_dbfiles = QmlAstSort.Get.database sort_user
- and code_dbdefs = QmlAstSort.Get.new_db_value sort_user
- and user_code = QmlAstSort.Get.new_val sort_user
- in code_defs, code_dbfiles, code_dbdefs, user_code
- in
-
- assert (code_dbfiles = []);
- assert (code_dbdefs = []);
-
- (* pre-2: dependency analysis on type definitions *)
- QT.check_no_duplicate_type_defs code_defs;
-
- (* 2°: getting type definitions into Gamma *)
- let env =
- (* verbose "I-2) registering type definitions"; *)
- HighTyper.fold env code_defs
- (* at this point, local type definitions are in the global
- environnement, but abstract, and when the typer encounters the
- corresponding LetTypeIn, it will have the effect of an "open" *)
- in
- { env = env; code = code }
-
- (* ------------------------------------------------------------ *)
- (* Initial Blender Part 2 (DB, type all code) *)
- (* ------------------------------------------------------------ *)
-
- (* Does the first part of the job: alphaconv, preprocess & type *)
- let blend_initial_part2 milkshake =
-
- let { env ; code } = milkshake in
-
- (* 5°: alpha-conversion *)
- let code =
- let alpha = QmlAlphaConv.next () in
- (* verbose "I-5) alpha-converting the code"; *)
- let _, code = QmlAlphaConv.code alpha code in
- code
- in
-
- (* 6°: typing *)
- let env =
- (* verbose "I-6) typing"; *)
- HighTyper.fold env code
- in
-
- (* 6bis: typing has been done, we can set the unsafe option of the typer to consider local types as concrete *)
- let env = { env with QT.options = { env.QT.options with QT.concrete_abstract = true } } in
-
- { env ; code }
-
- (* ------------------------------------------------------------ *)
- (* Initial Blender *)
- (* ------------------------------------------------------------ *)
-
- (* Does the first part of the job: alphaconv, preprocess & type *)
- let full_blend ( env : QmlTyper.env ) ( code : QmlAst.code ) : qml_milkshake =
-
- (* verbose ~time:false "-- Initial Blender starting --"; *)
-
- let milkshake =
-
- (* 1-2°: sorting, and getting type definitions into gamma *)
- let milkshake = blend_initial_part1 env code in
-
- (* 4-7°: DB, alpha, typing *)
- let milkshake = blend_initial_part2 milkshake in
-
- milkshake
-
- in
- (* verbose "-- Initial Blender ending --"; *)
-
- milkshake
-
-(** Sugar of interface, for a class of rewriters *)
-module Sugar :
-sig
- (** Tranform the code according to the function passed as argument
- This is used by qlm2ocaml by the different passes *)
- val process_code :
- process_code:(QT.gamma ->
- QmlAst.annotmap ->
- QmlAst.code ->
- (QT.gamma * QmlAst.annotmap) * QmlAst.code) ->
- qml_milkshake ->
- qml_milkshake
-end =
-struct
- let process_code ~process_code milk =
- let gamma = milk.env.QT.gamma in
- let annotmap = milk.env.QT.annotmap in
- let code = milk.code in
- let (gamma, annotmap), code = process_code gamma annotmap code in
- {
- env = { milk.env with
- gamma = gamma ;
- QT.annotmap = annotmap ;
- } ;
- code ;
- }
-end
View
3  libqmlcompil/qmlDbGen.mli
@@ -185,11 +185,8 @@ module DbGenByPass : sig
module MakeS ( N : DbGenByPass.SourceInterface ) (I : DbGenByPass.I) : S with type ValInitial.env = I.env
module I_Unit : DbGenByPass.I
module I_Alpha : DbGenByPass.I
- module I_Fun : DbGenByPass.I
module BSLDbGen : S
module BSLDbGenAlpha : S
- module BSLDbGenFun : S
- module BSLDbGenFunOpa : S with type ValInitial.env = Ident.t -> Ident.t
module BSLDbGenAlphaOpa : S with type ValInitial.env = QmlAlphaConv.t option
end
Please sign in to comment.
Something went wrong with that request. Please try again.