diff options
author | Maxime Dénès <mail@maximedenes.fr> | 2014-04-07 15:45:33 -0400 |
---|---|---|
committer | Maxime Dénès <mail@maximedenes.fr> | 2014-04-09 01:05:48 -0400 |
commit | 2e8c02d5644e8e8e446ab6dfd832322276e44f89 (patch) | |
tree | 9f7564ac88d210611cbd5fa5cf2de8efad038e36 /kernel/retroknowledge.ml | |
parent | a91518d0b07b9a2cd7d9381044c20365771ec382 (diff) |
Machine arithmetic operations for native compiler.
This completes the port of the native compiler to retroknowledge.
However, some testing and optimizations are still to be done.
Diffstat (limited to 'kernel/retroknowledge.ml')
-rw-r--r-- | kernel/retroknowledge.ml | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/kernel/retroknowledge.ml b/kernel/retroknowledge.ml index f4b57d085..466380f2d 100644 --- a/kernel/retroknowledge.ml +++ b/kernel/retroknowledge.ml @@ -130,9 +130,8 @@ type reactive_end = {(*information required by the compiler of the VM *) vm_decompile_const : (int -> Term.constr) option; native_compiling : - (bool->Cbytecodes.comp_env->constr array -> - int->Cbytecodes.bytecodes->Cbytecodes.bytecodes) - option; + (bool -> Nativeinstr.prefix -> Nativeinstr.lambda array -> + Nativeinstr.lambda) option; native_constant_static : (bool -> constr array -> Nativeinstr.lambda) option; @@ -142,9 +141,8 @@ type reactive_end = {(*information required by the compiler of the VM *) Nativeinstr.lambda array -> Nativeinstr.lambda) option; native_before_match : (bool -> Nativeinstr.prefix -> constructor -> - Nativeinstr.lambda -> Nativeinstr.lambda) option; + Nativeinstr.lambda -> Nativeinstr.lambda) option - native_decompile_const : (int -> Term.constr) option } @@ -186,7 +184,6 @@ let empty_reactive_end = native_constant_static = None; native_constant_dynamic = None; native_before_match = None; - native_decompile_const = None } @@ -270,12 +267,6 @@ let get_native_before_match_info knowledge key = | None -> raise Not_found | Some f -> f knowledge.flags.fastcomputation -let get_native_decompile_constant_info knowledge key = - match (Reactive.find key knowledge.reactive).native_decompile_const - with - | None -> raise Not_found - | Some f -> f - (* functions manipulating reactive knowledge *) let add_vm_compiling_info knowledge value nfo = {knowledge with reactive = @@ -376,16 +367,5 @@ let add_native_before_match_info knowledge value nfo = knowledge.reactive } -let add_native_decompile_constant_info knowledge value nfo = - {knowledge with reactive = - try - Reactive.add value - {(Reactive.find value (knowledge.reactive)) with native_decompile_const = Some nfo} - knowledge.reactive - with Not_found -> - Reactive.add value {empty_reactive_end with native_decompile_const = Some nfo} - knowledge.reactive - } - let clear_info knowledge value = {knowledge with reactive = Reactive.remove value knowledge.reactive} |