Permalink
Browse files

Fix brokenness masked by (safety 0)

  • Loading branch information...
1 parent 60a98fe commit 311ced577b6edf6d2ac0727d9faf33e1615d0cce @marijnh marijnh committed Aug 1, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −2 deflib.lisp
  2. +2 −2 jsos.lisp
View
5 deflib.lisp
@@ -189,6 +189,7 @@
(let ((proto-obj (init-obj (funcspec-proto-spec spec))))
(push (list* "prototype" proto-obj +slot-noenum+) props)
proto-obj)))
+ (new-cls (make-scls () new-proto))
(vals (make-array (max 2 (length props))))
(cls (make-scls (loop :for off :from 0 :for (name value . flags) :in props
:do (setf (svref vals off) (init-val value))
@@ -197,8 +198,8 @@
(cond (fill (setf (obj-vals fill) vals (obj-cls fill) cls))
((funcspec-p spec)
(let ((built (if (funcspec-make-new spec)
- (make-cfobj cls (funcspec-call spec) new-proto (funcspec-make-new spec) vals)
- (make-fobj cls (funcspec-call spec) new-proto vals))))
+ (make-cfobj cls (funcspec-call spec) new-cls (funcspec-make-new spec) vals)
+ (make-fobj cls (funcspec-call spec) new-cls vals))))
(when new-proto
(ensure-slot new-proto "constructor" built +slot-noenum+))
built))
View
4 jsos.lisp
@@ -56,8 +56,8 @@
make-new)
(defstruct (gobj (:constructor make-gobj (cls vals proto-vec class-vec)) (:include obj))
proto-vec class-vec proto-list required)
-(defstruct (aobj (:constructor make-aobj (cls arr)) (:include obj))
- arr)
+(defstruct (aobj (:constructor make-aobj (cls &optional arr)) (:include obj))
+ (arr (empty-fvector 0)))
(defstruct (reobj (:constructor make-reobj (cls proc scanner global)) (:include fobj))
scanner global)
#+js-dates

0 comments on commit 311ced5

Please sign in to comment.