Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bad use of signatures - parcel flattening works!
  • Loading branch information
sorear committed Jul 20, 2010
1 parent 8e5549c commit 6d2ff7d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions setting
Expand Up @@ -390,18 +390,19 @@ PRE-INIT {
}

# boxes a List<Variable>. SCHLIEMEL WAS HERE
# we can't use sigs on push and unshift because $x loses the flat bit
my class LLArray {
method push($x) { Q:CgOp { (prog
[rawcall (unbox List<Variable> (@ (l self))) Add (l $x)] [l self]) } }
method push { Q:CgOp { (prog
[rawcall (unbox List<Variable> (@ (pos 0))) Add (pos 1)] [pos 0]) } }
method shift() { Q:CgOp { (prog
[lextypes $f Variable $lv List<Variable>]
[l $lv (unbox List<Variable> (@ (l self)))]
[l $f (getindex (int 0) (l $lv))]
[rawcall (l $lv) RemoveAt (int 0)]
[l $f]) } }
method unshift($x) { Q:CgOp { (prog
[rawcall (unbox List<Variable> (@ (l self))) Insert (int 0) (l $x)]
[l self]) } }
method unshift { Q:CgOp { (prog
[rawcall (unbox List<Variable> (@ (pos 0))) Insert (int 0) (pos 1)]
[pos 0]) } }
method first-flattens() { Q:CgOp {
(box Bool (getfield islist (getfield lv (getindex (int 0)
(unbox List<Variable> (@ (l self))))))) } }
Expand Down

0 comments on commit 6d2ff7d

Please sign in to comment.