summaryrefslogtreecommitdiff
path: root/asmcomp/closure.ml
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2007-02-09 13:31:15 +0000
committerDamien Doligez <damien.doligez-inria.fr>2007-02-09 13:31:15 +0000
commitf700284aac3f9bcafa29b40e4cedeadd6703d782 (patch)
tree463f0f8e3165cc294c17cb1677870947741a2ce6 /asmcomp/closure.ml
parente1757faddcd080cc6a1d71a2aebd999399c5ab17 (diff)
downloadocaml-f700284aac3f9bcafa29b40e4cedeadd6703d782.tar.gz
fusion des changements 3.09.3 -> release309_merge310
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7849 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/closure.ml')
-rw-r--r--asmcomp/closure.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/asmcomp/closure.ml b/asmcomp/closure.ml
index 34a2a5a65f..15dc67986b 100644
--- a/asmcomp/closure.ml
+++ b/asmcomp/closure.ml
@@ -96,6 +96,7 @@ let prim_size prim args =
| Psetfield(f, isptr) -> if isptr then 4 else 1
| Pfloatfield f -> 1
| Psetfloatfield f -> 1
+ | Pduprecord _ -> 10 + List.length args
| Pccall p -> (if p.prim_alloc then 10 else 4) + List.length args
| Praise -> 4
| Pstringlength -> 5
@@ -177,7 +178,7 @@ let lambda_smaller lam threshold =
let rec is_pure_clambda = function
Uvar v -> true
| Uconst cst -> true
- | Uprim((Psetglobal _ | Psetfield _ | Psetfloatfield _ |
+ | Uprim((Psetglobal _ | Psetfield _ | Psetfloatfield _ | Pduprecord _ |
Pccall _ | Praise | Poffsetref _ | Pstringsetu | Pstringsets |
Parraysetu _ | Parraysets _ | Pbigarrayset _), _, _) -> false
| Uprim(p, args, _) -> List.for_all is_pure_clambda args
@@ -375,7 +376,7 @@ let bind_params params args body =
let rec is_pure = function
Lvar v -> true
| Lconst cst -> true
- | Lprim((Psetglobal _ | Psetfield _ | Psetfloatfield _ |
+ | Lprim((Psetglobal _ | Psetfield _ | Psetfloatfield _ | Pduprecord _ |
Pccall _ | Praise | Poffsetref _ | Pstringsetu | Pstringsets |
Parraysetu _ | Parraysets _), _) -> false
| Lprim(p, args) -> List.for_all is_pure args