-
Notifications
You must be signed in to change notification settings - Fork 47
/
ChangeLog
624 lines (510 loc) · 18.4 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
Dev Version:
- Perlito Closure extends java.util.function.UnaryOperator, BinaryOperator:
sub ($) { ... } # UnaryOperator<PerlObject>
sub ($, $) { ... } # BinaryOperator<PerlObject>
-- fix: `__LINE__` returns the full path
-- fix: `a =>=> b =>` is not a syntax error
-- fix: `(,)` is a syntax error
-- add core module POSIX with floor(), ceil(), and most of strftime()
-- add non-core module Mo.pm
-- add lib.pm
- Parser:
-- implemented several bareword special cases, added tests
- Java:
-- named capture in regex accepts duplicate names
-- unpack 'A', 'H', 'W', 'x',
- JavaScript:
-- fix assignment to array dereference
-- fix $var[0] =~ s///
9.028 cpan:Perlito5 2018-09-03
- fix a problem compiling the example from Perlito5 COOKBOOK section
9.027 cpan:Perlito5 2018-09-03
- fix Grammar::CORE in CPAN, the grammar was not precompiled
- Java:
-- CORE functions:
formline()
form() initial implementation
sprintf() argument "%vd"
- JavaScript:
-- CORE functions:
delete(@h{@keys})
sprintf() argument "%vd"
vec()
- Core compiler:
-- 'form' compiler
-- add Perlito5/Runtime/Formline.pm for CORE::formline() implementation
-- add core module: feature.pm, warnings.pm
9.026 cpan:Perlito5 2018-06-13
- remove CPAN tests that depend on specific Perl versions
9.025 cpan:Perlito5 2018-05-31
- remove CPAN tests that depend on specific Perl versions
- add modules:
-- Class::XSAccessor pure-perl replacement
-- Test::More - work in progress
- Java:
-- open() mode ">&" and "<&" emulation
9.024 cpan:Perlito5 2018-05-28
- remove CPAN tests that depend on specific Perl versions
- Java:
-- fix syntax error in "or" operation
-- fix "Inf" in emitter
9.023 cpan:Perlito5 2018-05-24
- Parser:
-- some "goto" forms are transformed, so they work in JavaScript and Java backends.
-- fix chomp(), chop()
-- fix fat-arrow in argument lists
-- fix indirect object
-- indented heredoc with <<~"tag"
-- use $^H and %^H
-- set Perl version to 5.026
-- add core modules:
Env
Benchmark, Memoize
DirHandle, File::Spec, File::Basename,
Text::Abbrev, Text::ParseWords
Time::Local, Time::localtime, Time::gmtime
Getopt::Std, Getopt::Long
Tie::Hash, Tie::Scalar, Tie::Array, warnings::register,
Fcntl, Symbol, Term::ANSIColor,
FindBin
IO, IO::Handle, IO::Seekable, IO::File,
Class::Struct, Perl::OSType
integer, if, parent, subs, mro
-- syntax fixes for hash vs. block, and ${var->{index}}
-- CORE:: prefix (CORE::print, CORE::tr)
-- CORE::GLOBAL special namespace
-- CORE functions can be overridden
-- stacked operators in "-X" file test
-- remove "." from @INC
-- decode source code "magic number" for UTF-8, UTF-16LE, UTF-16BE
-- "hexfloat" literals
-- new operators '|.', '|.=', '&.', '&.=', '^.', '^.=', '~.'
-- "\N{U+263D}", "\N{YIN YANG}" string escape sequence
- JavaScript:
-- fix some special cases with "$#" sigil
- Java:
-- javax.script API registers "Perl5" interpreter
example at misc/Java/Script.java
-- "jrunscript" support
$ jrunscript -cp .:perlito5.jar -l Perl5
-- global variable lookup is cached
-- fix $^O, returns the the operating system name
-- "require", "require VERSION"
-- "opendir", "readdir", "closedir", "select", "binmode"
-- "vec"
-- "localtime", "gmtime"
-- tied hash
-- tied array
-- overload implemented for about half of the operators
-- strict refs
-- srand() returns true, warns on overflow
-- fix read-only values
-- "$\", "$;", "$^T"
-- caller() now works "natively", decoding the Java stack trace
-- symbol tables like %:: and typeglobs support
-- file tests: "-e", "-l", "-r", "-w", "-x"
-- lvalue ternary "?:", "vec", "substr"
-- regex modifier /xx /r
-- regex %+ named captures
-- regex named captures can have underscore in the name
-- SUPER method call
-- add core modules:
Cwd, Sys::Hostname
9.022 cpan:Perlito5 2017-05-xx
- Parser:
-- Implemented compile-time scratchpad, used in BEGIN blocks.
-- "Use" is no longer an AST node, because all "use" statements
are executed at compile-time
- JavaScript:
-- fix "range" special cases
-- regex /s /x modifiers
-- variable redeclaration
-- fixed a performance problem in eval-string
- Java:
-- eval-string
-- __DATA__ and <DATA> filehandle
-- TIESCALAR, AUTOLOAD
-- "Encode.pm" encode_utf8, decode_utf8
-- "Scalar::Util", "List::Util" ports.
-- BEGIN block fixes - "Exporter" works.
-- INIT and END blocks
-- "$$" variable (process id)
-- mkdir(), rmdir()
-- pack (a..X, @ and . with number working)
-- unpack (a,A,Z with number working)
-- splice()
-- optimize "for (0..1000000)"
-- s///e, tr//
-- glob deref - *{ $name }{CODE}->()
-- regex comments with "(?#text)"
-- regex modifiers /e /g /c
-- support for all primitive data types
0.047 cpan:v6 2016-07-28
- hide internal classes from CPAN index
9.021 cpan:Perlito5 2016-05-10
- JavaScript:
-- state variables by Yati Sagade
- Java:
-- state variables by Yati Sagade
-- open(), close(), readline(), read(), sysread(), getc()
-- regex variables $1, $2, $&, pos()
9.020 cpan:Perlito5 2016-05-02
- Parser:
-- "->@*" support
-- new namespaces for modules that require backend-specific implementations:
lib/Perlito5X/Java/ and lib/Perlito5X/JavaScript/
and configuration modules:
lib/Perlito5/Java/Lib.pm and lib/Perlito5/JavaScript/Lib.pm
- Java:
-- '&subr', '&subr()', '\&subr' idioms
-- '*name = \&subr' idiom
-- sprintf(), printf(), fc()
-- increment/decrement operations on native types
-- support for primitive data types, work in progress: "byte", "short"
9.019 cpan:Perlito5 2016-04-10
- Java:
-- pure-typed expressions, see: misc/benchmark/benchmark_typed.pl
-- support for primitive data types, work in progress: "long", "int"
see: misc/benchmark/benchmark_typed_primitive.pl
9.018 cpan:Perlito5 2016-03-02
- Docs:
-- new documentation file "README-howto-release.md"
- Java:
-- API to extend Java classes using Perl: new keywords "implements", "throws"
-- native "undef" is "null"
-- regex character class fixup - avoid double escape
-- hex(),crypt(),rindex() by Bas Appelo
-- oct() by Imran Mohammad
-- delete, exists fixes for non hash context
-- chomp() and chop() converted from JS to Java
-- Java example: new socket based client server game using Perl, by Imran Mohammad
misc/Java/GameClient.pl, misc/Java/GameServer.pl
-- read/write argument list - $_[0]++
9.017 cpan:Perlito5 2016-01-19
- Tests:
-- Travis-ci integration https://travis-ci.org/fglock/Perlito added by fredericorecsky
- Java:
-- closure fixes: captured variables in for-loop; context
-- implement return followed by comma-separated list
-- new API to call Perl from Java
-- new API to extend Java classes using Perl
-- new API to access Java value types
-- internal integer number representation is now "long"
-- bless() and initial method call implementation (work in progress) by Bruno Czekay
-- generated code has a smaller diff between runs - github bug #39
-- regex: implemented string match in list context
-- regex: space in character classes is significant when /x is active - bug #40
-- regex: string replace preserves escape character - bug #41
9.016 cpan:Perlito5 2015-12-21
- Docs:
-- review cookbook entry "Obtaining a Perl compiler script that runs in the browser"
- Parser:
-- error message for: "Identifier too long" (Perl limit is 251 characters)
-- new error handler Perlito5::Compiler::error()
- JavaScript:
-- implemented 1-argument bless() - github bug #35
-- fix autovivification in exists()
- Java:
-- a "method call without parenthesis" will access a Java class/instance variable: my Int $val = Sample->VAL;
-- closure fix: variables used in method calls are captured
-- new example: misc/Java/TestConcurrent.pl
9.015 cpan:Perlito5 2015-12-01
- Docs:
-- cookbook entry "Obtaining a Perl compiler script that runs in the browser"
- Parser:
-- error messages for: Scalar/Array/Number/String found where operator expected
-- improved error message for missing comma
- JavaScript:
-- console.log() is the default "print"
-- reverse() bugfix, add tests
- Command line "perlito5"
-- better switch handling: -Cperl5 / -C perl5 / -C'perl5'
-- compile-only switch '-c'
-- multiple '-e' switches
-- '-E' switches
-- show %ENV, @INC in '-V'
-- set $0
-- execute UNITCHECK blocks
9.014 cpan:Perlito5 2015-11-24
- Parser:
-- AUTOLOAD and DESTROY don't need a 'sub' prefix.
-- ${...} and @{...} are "do-block"-ish
-- $x->{s} doesn't try to parse "s///"
-- set ${^GLOBAL_PHASE}
- JavaScript:
-- implement '-p' operator in nodejs
- Command line "perlito5"
-- read source code from STDIN or pipe if there is no -e or filename
-- execute CHECK, INIT and END blocks
9.013 cpan:Perlito5 2015-11-07
- no changes; "pause.perl.org" reupload
9.012 cpan:Perlito5 2015-11-06
- Docs:
-- started "Cookbook" section in Perlito5.pm POD
with instructions to generate perlito5.js
9.011 cpan:Perlito5 2015-11-06
- fix command line option "expand_use"
9.010 cpan:Perlito5 2015-11-06
- fix MANIFEST.SKIP
9.009 cpan:Perlito5 2015-11-05
- Build:
-- add bin/perlito5 to script_files section, add dist_abstract
-- requires perl 5.014 because older versions don't have 'feature.pm',
which breaks tests
- Parser:
-- update CORE prototypes to Perl v5.22 - use (+) instead of (\\[@%])
- Perl5-to-JavaScript compiler:
-- implement (+) prototype
9.008 cpan:Perlito5 2015-11-04
- Makefile - add bin/perlito5 to EXE_FILES section
- add LICENSE.md
- Perl5-to-JavaScript compiler:
-- default "print" function tries harder to find a native print
-- fixed context in readline() - that is, "$x = <$fh>" vs. "@x = <$fh>"
9.007 cpan:Perlito5 2015-10-30
- add Build.PL
9.006 cpan:Perlito5 2015-10-30
* Perlito5 (Perl 5 compiler):
- fix handling of native data parameters
9.004 cpan:Perlito5 2015-10-30
* Perlito5 (Perl 5 compiler):
- fix CPAN files [rt.cpan.org #108111]
- main Java class is "Main"
- fix Perl5 emitter $/ variable
9.003 cpan:Perlito5 2015-10-21
* Perlito5 (Perl 5 compiler):
- fix CPAN index
9.002 cpan:Perlito5 2015-10-21
* Perlito5 (Perl 5 compiler):
- fix CPAN index
9.001 cpan:Perlito5 2015-10-21
* Perlito5 (Perl 5 compiler):
- command line: -Cast-json
- fix CPAN distro
9.000 cpan:Perlito5 2015-10-20
* Perlito5 (Perl 5 compiler):
- first CPAN distro
dev 2015-08-17
* Perlito5 (Perl 5 compiler):
- more than 1700 tests
- Parser:
-- emit the same error messages as 'perl' in more places
-- expanded support for prototypes, regex, v-strings
-- track variable redeclarations and variable scopes
-- add the variable type to AST nodes ("real sigil")
-- "Perlito5X" namespace re-implements CPAN modules that are not possible (or not easy)
to support directly in Perlito - such as Data::Dumper.
Some modules are inlined in the parser - such as "vars" and "constant".
-- add "<<>>" (Perl 5.22)
-- support for "__LINE__", "__FILE__", and tracking the current line number
-- more pod implementation details, such as "=encoding"
-- fix return value for if/unless modifiers
-- command line - implement "-n", "-p", "-M", "-m", fixed "-I"
-- use a smaller grammar-grammar
-- use a faster calling convention in grammar
-- shorter AST node names
- Perl5-to-JavaScript compiler:
-- file operators (nodejs)
-- create regex variables $1, $2, ...
-- implement regex /e and /ee modifier
-- /usr/bin/node displays the message's text and a backtrace (Shlomi Fish)
-- initial overload implementation
-- flip-flop operator, split, tr
- Perl5-to-Java compiler:
-- statements: while() and if()
-- containers: hash, array, scalar; autovivification
-- lexical and global variables
-- Java data types: String, long, double, boolean
-- Perl data types: closures, references
-- initial implementation of regexes
-- native Java objects and classes using: package Perl::Package { import => "java.class" }
-- typed lexicals - mapped to imported Java classes: my Perl::Package $java_variable
-- Java::inline
* Perlito6 (Perl 6 compiler):
-- no significant changes
-- Go backend no longer works
-- Python bootstrap still works
-- instructions in "README-perlito6" need some update (replace "d8" with "node")
dev 2014-05-30
* Perlito5 (Perl 5 compiler):
- more than 1000 tests!
- Perl5-to-Perl6 compiler
- 'perlito5.org' web page moved to github
- implement 5.20 "prototype" attribute
- implement 5.20 "hash slices"
- implement 5.16 "__SUB__"
- 'use vars', 'use constant'
- bugfixes:
-- allow special variables in "for" loop
-- implement "\( @a )" in p5-js
-- 'local' now works with subscripted variables
-- implement '$;'
-- many more
dev 2012-04-12
* Perlito5 (Perl 5 compiler):
-- namespace Perlito5X contains versions of CPAN modules adapted for perlito
-- option "-B" is now the default; this executes immediately: perlito5 -e 'say "ok"'
-- option "-MO=Deparse":
$ node perlito5.js -Isrc5/lib -MO=Deparse -e ' while (1) { say "works" } '
-- environment variable PERL5LIB=src5/lib now works
- parser:
-- autoquote hash-keys fix
-- string interpolation in m//
-- accept underlines inside numbers
- javascript backend:
-- AUTOLOAD
-- tie() - TIEARRAY, STORE, FETCH
-- string increment
-- negative index in array
-- more file and process operations: chdir, unlink, close, exit
-- control functions: next, last, redo, break
-- more functions: rand, printf, sprintf
-- "continue" blocks
-- GLOB references
- perl5 backend:
-- requires v5.10
* Perlito6 (Perl 6 compiler):
-- updated method hyper syntax to use >>. instead of .>>
9.0 2012-04-11
* Perlito5 (Perl 5 compiler):
- parser:
-- there is now an internal "grammar API"; new words can be added to the grammar from inside perl5 modules;
The non-standard "token" grammar was moved to a module
-- here-docs
-- new Perl5-in-Perl6 backend (experimental)
-- new option -Bjs/-Bperl5
-- new option -Cast-perl5
-- added option -I
Note: -I./src5/lib is required to compile the compiler and also to run some of the tests
-- runs some tests from the perl5 test suite (pmurias++)
-- implemented prototypes (function signatures)
-- "use", import/unimport; "use strict"/"no strict"
- perl5 backend:
-- use native data structures and ops
- javascript backend:
-- works on node-js (pmurias++)
-- @ISA and inheritance
-- %ENV, @ARGV
-- simple regexes (using javascript native regex)
-- symbol tables/typeglobs
-- references
-- "local", "our"; goto &sub
-- wantarray; each; __PACKAGE__
-- native javascript can be accessed with JS::inline('string')
-- reduced generated code size; emitted code is more optimized and better formatted
-- cleanup unused modules from the browser backend
- javascript backend regressions:
-- the d8 shell (v8 javascript) doesn't support some file system functions needed by the compiler
-- perlito5 calling convention is incompatible with native javascript
The last commit using native javascript calls is "e1e3316b"
* Perlito6 (Perl 6 compiler):
- compiler namespace moved from Perlito to Perlito6
8.0 2011-12-24
- added new compiler for Perl version 5.
* Perlito Perl 5:
- command line "perlito5.pl"
- supported backends: Perl 5, JavaScript
- source code in src5/ directory
* Perlito Perl 6:
- command line renamed to "perlito6.pl"
- supported backends: Perl 5, Python 2.6, JavaScript
- new experimental backend: Java
- fixed META.yml for "v6.pm" CPAN distribution (thanks Aevar)
- fixed unicode IO, added unicode tests
- add some formatting to Perl5 and JavaScript output
- methods: map, grep
- operators: x
- source code moved to src6/ directory
Regressions:
- removed '-B' command line flag (since 7.0)
- backends pending upgrade to the new AST: Common Lisp, Ruby 1.9, Eval
- backends no longer supported in this version: Go, Parrot, Rakudo, Clojure
7.0 2011-04-20
- supported backends: Perl 5, Python 2.6, JavaScript
- added "perlito" command-line compiler and shell
- new distribution "v6.pm" (Perlito in Perl 5)
This replaces Pugs::Compiler::Perl5 as the v6.pm compiler in CPAN.
- correct operator precedence
- interpolation of variables and code in strings
- 'unless' and statement modifiers
- several fixes in List, Hash, Array, Block, Bool, Str, Mu
- operators: numeric autoincrements, defined-or, range
Regressions:
- removed '-B' command line flag
- backends pending upgrade to the new AST: Go, Common Lisp, Ruby 1.9, Eval
- backends not supported in this version: Parrot, Rakudo, Clojure
6.0 2010-07-27
- Ruby backend bootstrap.
- more tests
5.0 2010-07-19
- Python backend bootstrap.
- use variable assignment instead of binding - that is, use '=' instead of ':='
- 'use' - all backends can now use Test.pm
- 'elsif'
- 'loop'
- regex quantifiers
- Lisp backend now bootstraps with the 'util/mp6.pl' compiler
4.1 2010-03-24
- floating point numbers
- 'while' loop
4.0 2010-03-20
- Go backend bootstrap.
The Go backend was updated to the latest Go language spec.
- Perl5 backend optimized; 30% faster
- More library functions, added to all backends
- New 'Eval.pm' module - implements a MiniPerl6 interpreter in MiniPerl6.
This should add some debugging capabilities later on.
- New test suite. See README on how to use 'prove' for each backend.
- New compiler options to create binary executables
- Currently the stable backends are: Perl5, JavaScript, JVM, Lisp, Go.
See README for bootstrapping instructions for all backends.
- Removed support for features that are not standard Perl6.
3.0 2010-01-21
- Go language backend; using Go: http://golang.org
- Java-class backend; using Rhino: http://www.mozilla.org/rhino
- util/mp6.pl - compiler command line script written in MiniPerl6
- new repository at http://github.com/fglock/Perlito
- new web page at http://www.perlito.org created by nferraz (Nelson Ferraz)
2.0 2009-10-09
- JavaScript (Firefox, V8) bootstrap
- simplified 'make' inside tokens
1.0 2009-08-28
- Lisp (SBCL) bootstrap
- Changed accessors to lvalue
[intermission]
- Perl5 emitter: fixed Array inside signature: method ( $a, [ $b, $c ] ) ...
- Perl5 emitter: implemented "warn"
0.003 2006-12-12
- All tests converted to TAP format
- Parrot backend:
- added Parrot emitter and 'mp6-parrot' script
- passes several tests
- 'Match' class written in MP6
- Perl5 backend:
- parameter binding with complex data structures
0.002 2006-11-18
- fixed array expansion in 'for @x {...}'
- fixed grammar compilation in MiniPerl6::Grammar and MiniPerl6::Grammar::Regex
- type annotations my Int $x
- autoquote hash keys { a => 42 }
- pair syntax sugar { :$a }
- deep array binding [ $a, [ $b, $c ] ] := [ 1, [ 2, 3 ] ]
0.001 2006-11-17
- MiniPerl6::Perl5::Emitter and MiniPerl6::Emitter::Token compile ok
echo 'class Main { say "hello, World" }' | perl -Ilib5 mp6-perl5-boot.pl | perl -Ilib5
2006-11-14
- all files parsed
- added Perl5 build script
2006-11-11
- parses MiniPerl6/Emitter.pm
2006-11-10
- parses mp6.pl
2006-11-06
- implemented MP6::G::Regex::rule()
- /<%hash>/
- /const|const/
- /<subrule>/
- /<'xyz'>/
- /\n/
2006-11-01
- initial language draft (on paper)