Get rid of bytecodes for list literals.
Just compile them to: new List .add(...) .add(...) ... Gets rid of some code in the interpreter loop, which is always good. Also addresses the old limitation where a list literal could only have 255 elements.
This commit is contained in:
@@ -148,11 +148,6 @@ typedef enum
|
||||
// stack.
|
||||
CODE_RETURN,
|
||||
|
||||
// Create a new list with [arg] elements. The top [arg] values on the stack
|
||||
// are the elements in forward order. Removes the elements and then pushes
|
||||
// the new list.
|
||||
CODE_LIST,
|
||||
|
||||
// Creates a closure for the function stored at [arg] in the constant table.
|
||||
//
|
||||
// Following the function argument is a number of arguments, two for each
|
||||
|
||||
Reference in New Issue
Block a user