feat: add List.new(_) and List.filled(_,_) constructors with size and default value

Add two new list constructors to the Wren VM: `List.new(size)` creates a list of given size with null elements, and `List.filled(size, value)` creates a list with all elements initialized to a specified default value. Includes corresponding C primitives `list_newWithSize` and `list_newWithSizeDefault`, registration in `wrenInitializeCore`, and a test file verifying both constructors produce correct counts and element values. Also adds Max Ferguson to AUTHORS.
This commit is contained in:
Bob Nystrom
2016-08-04 05:34:08 +00:00
3 changed files with 46 additions and 0 deletions
+1
View File
@@ -17,3 +17,4 @@ Starbeamrainbowlabs <contact@starbeamrainbowlabs.com>
Alexander Roper <minirop@gmail.com>
Will Speak <will@willspeak.me>
Damien Radtke <damienradtke@gmail.com>
Max Ferguson <maxxferguson@gmail.com>