Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Eliminate the 'isBoolean' instruction in favour of using the type checking machinery |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0718166269aff75a484dc7c9f1260354 |
User & Date: | kbk 2018-12-27 04:12:30.524 |
Context
2019-11-19
| ||
03:52 | Merge refactoring so that all direct operations interact correctly with the callframe. check-in: b9e2a13b96 user: kbk tags: trunk | |
2019-11-08
| ||
21:57 | Refactor directSet to accept and return the callframe check-in: 26b53d7b5a user: kennykb tags: kbk-refactor-directops | |
2019-08-03
| ||
15:01 | Starting to work on being able to write (most of) the stdlib in C; lots of things are not yet working... check-in: 63f2d78960 user: dkf tags: stdlib-in-c | |
2018-12-29
| ||
20:26 | Open a branch for some experiments on refactoring callframe operations check-in: 7454a5228c user: kbk tags: kbk-refactor-callframe | |
2018-12-27
| ||
19:44 | Very rough beginning of a refactored 'varargs' pass check-in: 7c9d400e5e user: kbk tags: notworking, kbk-refactor-varargs | |
04:12 | Eliminate the 'isBoolean' instruction in favour of using the type checking machinery check-in: 0718166269 user: kbk tags: trunk | |
04:09 | Eliminate the 'isBoolean' opcode in favour of 'instanceOf', to allow for type inferemce based on tryCvtToBoolean Closed-Leaf check-in: bd009801ca user: kbk tags: kbk-isBoolean | |
2018-12-18
| ||
15:12 | OOPS: remove 'source' of unused file check-in: 3bf74c48dc user: kbk tags: trunk | |
Changes
Changes to codegen/build.tcl.
︙ | ︙ | |||
4488 4489 4490 4491 4492 4493 4494 | # An LLVM value reference. method invokeExpanded {arguments flags ec {resultName ""}} { my ExtractVector $arguments my call ${tcl.invoke.expanded} [list $len $ary $flags $ec] $resultName } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 | # An LLVM value reference. method invokeExpanded {arguments flags ec {resultName ""}} { my ExtractVector $arguments my call ${tcl.invoke.expanded} [list $len $ary $flags $ec] $resultName } # Builder:isTrue(INT) -- # # Tests whether a given value will cause 'jumpTrue' to jump; # Quadcode implementation('jumpTrue', 'jumpFalse') # # Parameters: # value - The value to test, as an LLVM value reference. |
︙ | ︙ |
Changes to codegen/compile.tcl.
︙ | ︙ | |||
465 466 467 468 469 470 471 | my SetErrorLine $errorCode \ [$b maybe [$b frame.value $res]] } my StoreResult $tgt $res } "bitor" - "bitxor" - "bitand" - "lshift" - "rshift" - "add" - "sub" - "mult" - "uminus" - "uplus" - "land" - "lor" - | | | 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 | my SetErrorLine $errorCode \ [$b maybe [$b frame.value $res]] } my StoreResult $tgt $res } "bitor" - "bitxor" - "bitand" - "lshift" - "rshift" - "add" - "sub" - "mult" - "uminus" - "uplus" - "land" - "lor" - "eq" - "neq" - "lt" - "gt" - "le" - "ge" - "not" - "streq" - "bitnot" - "strcase" - "strclass" - "strcmp" - "strfind" - "strlen" - "strmap" - "strmatch" - "strrfind" - "strtrim" - "resolveCmd" - "arrayExists" - "directExists" - "arrayElementExists" - "directArrayExists" - "initArrayIfNotExists" - "extractScalar" - "extractArray" - "arraySet" - "arrayUnset" - "arrayGet" { |
︙ | ︙ |
Changes to quadcode/pre.tcl.
︙ | ︙ | |||
68 69 70 71 72 73 74 | dictLappend dictSet dictSetOrUnset dictSize dictUnset div eq expand exists expon extractArray extractCallFrame extractExists extractFail extractMaybe extractScalar frameArgs frameDepth ge gt initIfNotExists | | | 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | dictLappend dictSet dictSetOrUnset dictSize dictUnset div eq expand exists expon extractArray extractCallFrame extractExists extractFail extractMaybe extractScalar frameArgs frameDepth ge gt initIfNotExists instanceOf le listAppend listConcat listIn listIndex listLength listRange listSet lshift lt maptoint mod moveFromCallFrame mult narrowToType neq not purify |
︙ | ︙ |
Changes to quadcode/translate.tcl.
︙ | ︙ | |||
1099 1100 1101 1102 1103 1104 1105 | my quads copy $res $val } tryCvtToNumeric { # No effect on value } tryCvtToBoolean { # Push whether we're dealing with a boolean set val [list temp [expr {$depth - 1}]] set res [list temp $depth] | > > > > > | > | 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 | my quads copy $res $val } tryCvtToNumeric { # No effect on value } tryCvtToBoolean { # Push whether we're dealing with a boolean set val [list temp [expr {$depth - 1}]] set res [list temp $depth] set typecode [quadcode::dataType::typeUnion \ $quadcode::dataType::IMPURE \ $quadcode::dataType::BOOLEAN] set v0 [list temp [incr depth -1]] set r $v0 my quads [list instanceOf $typecode \ [quadcode::nameOfType $typecode]] $res $val } numericType - resolveCmd - strlen { # Unary operations set v0 [list temp [incr depth -1]] set r $v0 my quads [lindex $insn 0] $r $v0 |
︙ | ︙ |
Changes to quadcode/types.tcl.
︙ | ︙ | |||
622 623 624 625 626 627 628 | dictExists - foreachMayStep - dictIterDone - eq - ge - gt - instanceOf - | < | 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | dictExists - foreachMayStep - dictIterDone - eq - ge - gt - instanceOf - land - le - lor - lt - neq - strclass - streq - |
︙ | ︙ |