Revert experimental changes

These crash the earley benchmark
This commit is contained in:
Justin Ethier 2018-11-09 15:41:55 -05:00
parent 915ae74fe1
commit 70b1ac2e57

View file

@ -589,7 +589,7 @@
(cond (cond
((and (prim:mutates? (car exp)) ((and (prim:mutates? (car exp))
;; loop3-dev WIP step #1 - do not immediately reject these prims ;; loop3-dev WIP step #1 - do not immediately reject these prims
(not (member (car exp) '(vector-set!))) ;; TODO: experimental ;(not (member (car exp) '(vector-set!))) ;; TODO: experimental
) )
(let ((e (cadr exp))) (let ((e (cadr exp)))
(when (ref? e) (when (ref? e)
@ -1297,14 +1297,14 @@
(inline-ok? e ivars args arg-used return))) (inline-ok? e ivars args arg-used return)))
(reverse (cdr exp)))) (reverse (cdr exp))))
;; loop3-dev WIP step #2 - some args can be safely ignored ;; loop3-dev WIP step #2 - some args can be safely ignored
((and (prim? (car exp)) ;((and (prim? (car exp))
(prim:mutates? (car exp)) ; (prim:mutates? (car exp))
(member (car exp) '(vector-set!)) ; (member (car exp) '(vector-set!))
) ; )
;; with vector-set, only arg 1 (the vector) is actually mutated ; ;; with vector-set, only arg 1 (the vector) is actually mutated
;; TODO: is this always true? do we have problems with self-recursive vecs?? ; ;; TODO: is this always true? do we have problems with self-recursive vecs??
(inline-ok? (cadr exp) ivars args arg-used return) ; (inline-ok? (cadr exp) ivars args arg-used return)
) ;)
(else (else
(for-each (for-each
(lambda (e) (lambda (e)