Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 30 Jul 2015 08:37:37 +0100] rev 510
Tests refactoring - use generated test cases to make sure all posibilities are tested.
Do not generate resource for all combinations, use PPCSetUpBeforeTearDownAfterResource
instead that delegates parser compilation to the testcase itself (it calls it's #setUpBefore
method).
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 31 Jul 2015 08:22:18 +0100] rev 509
Inline child of an action node only is its unnamed sequence node.
Named nodes should not be inlined as they should make a method.
There's little point in inlining non-sequence nodes, so don't enforce
inlining on those. Some (JK :-) may prefer them non-inlined (for
debugging purposes)
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 31 Jul 2015 08:16:54 +0100] rev 508
Temporarily disabled #acceptsEpsilon test in PPCTokenizingCodeGenerator>>visitChoiceNode:
JK should have a look and come up with proper solution.
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 28 Jul 2015 07:16:10 +0100] rev 507
Workaround for stc bug.
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 27 Jul 2015 16:28:48 +0100] rev 506
Added static analysis of blocks when inlining. Allow inlining only when block is functional
...i.e., does not access any shared state (in instance or class variables). If the block does
a self-send, the sent method has to be (transitively) functional too.
To allow for self-sends in action blocks, copy (transitively) self-sent methods to target
parser. This is safe as these self-sent methods are guarnateed to be functional.
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 27 Jul 2015 10:21:41 +0100] rev 505
Post-merge fixes. PPCCodeBlock refactoring.
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 24 Jul 2015 19:42:09 +0100] rev 504
Portability fix: override #new for class that implements #initialize
#initialize is not sent by default.
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 24 Jul 2015 15:37:23 +0100] rev 503
Merge
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 24 Jul 2015 15:06:54 +0100] rev 502
Updated to PetitCompiler-JanVrany.135, PetitCompiler-Tests-JanKurs.93, PetitCompiler-Extras-Tests-JanVrany.16, PetitCompiler-Benchmarks-JanKurs.12
Name: PetitCompiler-JanVrany.135
Author: JanVrany
Time: 22-07-2015, 06:53:29.127 PM
UUID: 890178b5-275d-46af-a2ad-1738998f07cb
Ancestors: PetitCompiler-JanVrany.134
Name: PetitCompiler-Tests-JanKurs.93
Author: JanKurs
Time: 20-07-2015, 11:30:10.283 PM
UUID: 6473e671-ad70-42ca-b6c3-654b78edc531
Ancestors: PetitCompiler-Tests-JanKurs.92
Name: PetitCompiler-Extras-Tests-JanVrany.16
Author: JanVrany
Time: 22-07-2015, 05:18:22.387 PM
UUID: 8f6f9129-dbba-49b1-9402-038470742f98
Ancestors: PetitCompiler-Extras-Tests-JanKurs.15
Name: PetitCompiler-Benchmarks-JanKurs.12
Author: JanKurs
Time: 06-07-2015, 02:10:06.901 PM
UUID: cb24f1ac-46a4-494d-9780-64576f0f0dba
Ancestors: PetitCompiler-Benchmarks-JanKurs.11, PetitCompiler-Benchmarks-JanVrany.e29bd90f388e.20150619081300
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 19 Jun 2015 08:13:39 +0100] rev 501
Moved PPMappedActionParser>>asCompilerNode to protocol 'converting'
If in '*petitparser' it makes some problems with Monticello.
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 19 Jun 2015 07:14:07 +0100] rev 500
Use RBVariableNode>>name: to change variable's name.
The old way - `node token value:` is working in Pharo - there's no token in RBVariableNode. Sigh.
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 19 Jun 2015 06:53:06 +0100] rev 499
Portability fix: do not use #?
...use `notNil ifTrue:[] ifFalse:[]` instead. #? is not supported
in Squeak/Pharo
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 18 Jun 2015 22:11:40 +0100] rev 498
Moved PPCMappedActionNode to category PetitCompiler-Nodes
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 18 Jun 2015 22:05:13 +0100] rev 497
Do not use RBProgramNode>>variableNodesDo: as this method is not present in Pharo.
Use local helper method instead.
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 18 Jun 2015 21:20:15 +0100] rev 496
Reverted fc3dbe5654c5: sending #copy should be OK (copy set's parent properly)
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 18 Jun 2015 06:40:15 +0100] rev 495
Send #sourceNode instead of #ast as there's no #ast in Pharo
...I was mistaken.
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 18 Jun 2015 06:07:40 +0100] rev 494
Oops, removed EOL comments as they;re not supported in Squeak / Pharo
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 17 Jun 2015 17:10:54 +0100] rev 493
Fixed target mcz - exit Smalltalk after all packages are exported.
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 17 Jun 2015 16:49:28 +0100] rev 492
Use #deepCopy instead of #copy when copying RB parse tree
...because #copy make a copy if child nodes but does not set their parents properly.
Therefore node replacing does not work because it replaces it in wrong tree (original,
not the copy).
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 16 Jun 2015 07:49:21 +0100] rev 491
Codegen: added support for smart action node compiling.
Avoid creation of intermediate result collection for action nodes if all references
to action block's argument (i.e., the nodes collection) is in form of:
* <nodes> at: <numeric constant>
* <nodes> first (second, third...
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 16 Jun 2015 06:54:14 +0100] rev 490
Oops, renamed testMappedNode3/4/5 to testActionNode3/4/5 which is the correct name!
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 16 Jun 2015 06:45:26 +0100] rev 489
Fix in codegen for inlined sequence nodes.
For inlined sequence nodes, generate nested ifs rather than sequential code which
does not work when inlined. The reason is that #codeReturn: in inline generates
instvar assignment, not method return, so in sequential code the next child of a sequence
will be probed even if previous failed. If that happends, the whole sequence fail and therefore
we must generate nested ifs to correctly handle this w.r.t. inlining.
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 15 Jun 2015 19:13:49 +0100] rev 488
Avoid creation of intermediate collection for mapped action nodes.
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 15 Jun 2015 18:00:44 +0100] rev 487
Fix in codegen: fixed compilation of unknown node: do not hardcode return variable name
...use `self retvalVar` instead
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 15 Jun 2015 17:47:38 +0100] rev 486
Renamed #codeStoreValueOf:intoVariable: to #codeAssignParsedValueOf:to:
to use same naming as #codeAssign:to:
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 15 Jun 2015 17:12:54 +0100] rev 485
Fixed codegen for empty (mapped) action block.
Although empty blocks are useless in practice, they may occur (and do occur in tests)
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 05 Jun 2015 00:05:08 +0100] rev 484
Do not create intermediate collection when parsing sequence if not necesary.
The collection is not needed when the result of a choice is being used in mapped parser.
In that case, store parsed objects in variables and inline action code to use these variables
to access parsed objects.
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 03 Jun 2015 09:06:49 +0100] rev 483
Oops, fixed subproject definition (wrong package names)
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 03 Jun 2015 08:48:59 +0100] rev 482
Updated .mcz exporting code to include a commit message digest
...instead of just exported revision commit message.
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 03 Jun 2015 06:23:49 +0100] rev 481
Introduced PPCMappedActionNode for PPMappedActionParser.
It's compilation is not yet ideal, bot works for now.
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 02 Jun 2015 17:25:57 +0100] rev 480
Introduced PPMappedActionParser, a specialized parser for map:ped actions.
In order to compile nicer code, compiler has to be able to tell between
simple (==>) action parser and mapped (map:) action parser.
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 02 Jun 2015 00:16:55 +0100] rev 479
Action inlining [1/x]: Initial support for inlining actions parsers (i.e., ==>)
The code of the action is now inlined into parsing method rather then delegated to
stored block. Mapping parser (i.e., map:[...]) are not supported and not detected, so
using them cause crash. This will be fixed later.
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 01 Jun 2015 23:15:52 +0100] rev 478
Codegen refactoring [2/x]: Added PPCCompiler>>codeIf:then:else:
this allows for more structured coding of conditionals. then/else code is evaluated
inside new block so it may allocate its own temporaries.
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 01 Jun 2015 22:02:17 +0100] rev 477
Codegen refactoring [1/x]: Introduced a PPCCodeBlock
A PPCCodeBlock is an abstraction of a block of statements with temporaries. This will
allow for scoped temporary management in code generator - temporary variables could
be allocated for block only. (i.e., make them block-temporaries)
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 29 May 2015 07:25:31 +0100] rev 476
Fixed choice inlining.
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 27 May 2015 08:37:09 +0100] rev 475
Add inspector tab to present parser tree.
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 27 May 2015 03:30:35 +0100] rev 474
More fixes for inlining of nodes
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 26 May 2015 07:27:15 +0100] rev 473
Oops, merged code which contained Pharoism's
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 25 May 2015 02:49:22 +0100] rev 472
Avoid using of a bridge parser for top-most composite parser
...by converting PPCompositeParser to PPCDelegatePrser.
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 22 May 2015 18:08:30 +0100] rev 471
Added two more tests for inlining
Jan Vrany <jan.vrany@fit.cvut.cz> [Fri, 22 May 2015 17:06:30 +0100] rev 470
Added inspector representation to show PPC node tree.
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 21 May 2015 17:19:17 +0100] rev 469
Oops. re-added classes lost during merge...
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 21 May 2015 15:49:26 +0100] rev 468
Indent by 4 spaces on Smalltalk/X
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 21 May 2015 15:35:26 +0100] rev 467
Fixed code generation for deterministic choice w.r.t inlining
For PPCDeterministicChoiceNode generate code in form
if ()
else if ()
else if ()
else error
instead of sequence of ifs. The former is safe w.r.t inlining.
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 21 May 2015 14:43:38 +0100] rev 466
Fixed MNU in PPCSpecializingVisitor>>visitTrimmingTokenNode: node
Set child of PPCTrimmingCharacterTokenNode before setting name
as child is used to compute meaningful name.
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 21 May 2015 14:35:34 +0100] rev 465
Merge
Jan Vrany <jan.vrany@fit.cvut.cz> [Thu, 21 May 2015 14:12:22 +0100] rev 464
Updated to PetitCompiler-JanKurs.118, PetitCompiler-Tests-JanKurs.46, PetitCompiler-Extras-Tests-JanKurs.11, and PetitCompiler-Benchmarks-JanKurs.11
Name: PetitCompiler-JanKurs.118
Author: JanKurs
Time: 13-05-2015, 03:59:01.292 PM
UUID: 4a8ccd94-3131-4cc7-9098-528f8e5ea0b5
Name: PetitCompiler-Tests-JanKurs.46
Author: JanKurs
Time: 04-05-2015, 04:25:06.162 PM
UUID: 9f4cf8b7-876e-4a13-9579-b833f016db66
Name: PetitCompiler-Extras-Tests-JanKurs.11
Author: JanKurs
Time: 13-05-2015, 04:27:27.940 PM
UUID: e9f30c31-fbd0-4e96-ad2a-868f88d20ea8
Name: PetitCompiler-Benchmarks-JanKurs.11
Author: JanKurs
Time: 13-05-2015, 02:21:49.932 PM
UUID: 6a23fd1e-a86f-46db-8221-cc41b778d32c
Jan Vrany <jan.vrany@fit.cvut.cz> [Wed, 20 May 2015 16:47:52 +0100] rev 463
Small improvement in inlining: inline child of an action node.
Jan Vrany <jan.vrany@fit.cvut.cz> [Sat, 16 May 2015 19:21:00 +0100] rev 462
Added benchmark of a smalltalk parser with empty actions.
This is used to check the cost of compiled actions
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 12 May 2015 01:57:37 +0100] rev 461
Portability: fixes for Smalltalk/X
* Do not use #crShow: - not present in Smalltalk/X
* Do not use Array class>>with:withAll:
* do not use detect:ifFound:ifAbsent:
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 12 May 2015 01:33:33 +0100] rev 460
Merge
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 12 May 2015 01:24:03 +0100] rev 459
Merged with PetitCompiler-JanKurs.20150510144201, PetitCompiler-Tests-JanKurs.20150510144201, PetitCompiler-Extras-Tests-JanKurs.20150510144201, PetitCompiler-Benchmarks-JanKurs.20150510144201
Name: PetitCompiler-JanKurs.20150510144201
Author: JanKurs
Time: 10-05-2015, 04:42:29.192 PM
UUID: 58a4786b-1182-4904-8b44-a13d3918f244
Name: PetitCompiler-Tests-JanKurs.20150510144201
Author: JanKurs
Time: 10-05-2015, 04:32:12.870 PM
UUID: 2a8fd41a-331b-4dcf-a7a3-752a50ce86e7
Name: PetitCompiler-Extras-Tests-JanKurs.20150510144201
Author: JanKurs
Time: 10-05-2015, 04:59:25.308 PM
UUID: ef43bd1a-be60-4e88-b749-8b635622c969
Name: PetitCompiler-Benchmarks-JanKurs.20150510144201
Author: JanKurs
Time: 10-05-2015, 05:04:54.561 PM
UUID: d8e764fd-016b-46e2-9fc1-17c38c18f0e5
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 11 May 2015 18:31:26 +0100] rev 458
Added lost method PPCBenchmark>>teardownSmalltalkGrammarTokenized
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 11 May 2015 18:29:13 +0100] rev 457
Oops, merged lost Smalltalk/X compatibility fixes (again)
Jan Vrany <jan.vrany@fit.cvut.cz> [Mon, 11 May 2015 12:19:13 +0100] rev 456
Oops, fixed sub project definition (causing endless recursion during build)
Jan Vrany <jan.vrany@fit.cvut.cz> [Sun, 10 May 2015 14:42:14 +0100] rev 455
Added .../parsers/java and .../compiler/tests/extras to exported .mczs
Jan Vrany <jan.vrany@fit.cvut.cz> [Sun, 10 May 2015 14:20:24 +0100] rev 454
Portability: fixes for Smalltalk/X
* Do not use detect:ifFound: - not present in Smalltalk/X
* Removed leftover debugging code (Halt if:, ...)
* Do not use `aClass methods`, use `aClass methodDictionary values`
* Do not use #allPairsDo; - not present in Smalltalk/X
* Do not use #crShow: - not present in Smalltalk/X
* On Smalltalk?X use Filename - there's no FileReference in Smalltalk/X
* Do not use CharacterSet, use String
Jan Vrany <jan.vrany@fit.cvut.cz> [Sun, 10 May 2015 06:46:56 +0100] rev 453
Merge
Jan Vrany <jan.vrany@fit.cvut.cz> [Sun, 10 May 2015 06:28:36 +0100] rev 452
Updated to PetitCompiler-JanKurs.111, PetitCompiler-Tests-JanKurs.51, PetitCompiler-Benchmarks-JanKurs.7, added PetitCompiler-Extras-Tests-JanKurs.4
Name: PetitCompiler-JanKurs.111
Author: JanKurs
Time: 08-05-2015, 05:56:05.327 PM
UUID: 8805e696-9933-49b8-a5c8-a963b931b996
Name: PetitCompiler-Tests-JanKurs.51
Author: JanKurs
Time: 08-05-2015, 05:17:44.224 PM
UUID: 21c24114-73be-4ba2-86cd-5a4402f778a0
Name: PetitCompiler-Benchmarks-JanKurs.7
Author: JanKurs
Time: 07-05-2015, 06:06:12.918 PM
UUID: 0e6e2c0a-90f6-4f46-9663-c66f636da602
Name: PetitCompiler-Extras-Tests-JanKurs.4
Author: JanKurs
Time: 08-05-2015, 05:56:46.180 PM
UUID: 4d4d4d23-c5bc-41ef-ad41-8a56528ddb42
Jan Vrany <jan.vrany@fit.cvut.cz> [Tue, 05 May 2015 16:25:23 +0200] rev 451
Portability: fixes for Smalltalk/X