RegressionTests__CompilerTests2.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sat, 26 Dec 2015 08:35:43 +0100
branchjv
changeset 1475 ea3d40ebae8f
parent 1473 e31a9559e135
child 1478 84b9cfc40f37
permissions -rw-r--r--
More tests for context variables and values (used by the debugger)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"{ Package: 'exept:regression' }"
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
"{ NameSpace: RegressionTests }"
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
TestCase subclass:#CompilerTests2
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
     6
	instanceVariableNames:'methods enabledJIT savedContext savedContextArgAndVarNames
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
     7
		savedContextArgAndVarValues savedContextArgAndVarValuesUsingEval
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
     8
		savedContextLine'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
	classVariableNames:''
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
	poolDictionaries:''
1163
db96f4ca7932 category changes
Claus Gittinger <cg@exept.de>
parents: 1149
diff changeset
    11
	category:'tests-Regression-Compilers'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    15
!CompilerTests2 methodsFor:'private'!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    16
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    17
assertSendersMethodIsIdenticalTo: sendersMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    18
    "Do not assert here, pass down to have some immediate, possibly lazy contexts
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    19
     in between"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    20
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    21
    self assertSendersSendersMethodIsIdenticalTo: sendersMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    22
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    23
    "Created: / 25-04-2013 / 15:28:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    24
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    25
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    26
assertSendersSendersMethodIsIdenticalTo: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    27
    | ctx m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    28
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    29
    ctx := thisContext sender sender.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    30
    "/ Now, DO NOT USE Context>>method as it searches for the method
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    31
    "/ if it is not set!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    32
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    33
    m := ctx instVarAt: (Context instVarIndexFor: #method).
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    34
    self assert: m == thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    35
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    36
    "Created: / 25-04-2013 / 15:30:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    37
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
    38
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    39
compile: source mode: mode
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    40
    "Compile given source and returns the new method.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    41
     The from the source is prepended the mode + underscore
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    42
     (i.e., foo -> stc_foo).
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    43
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    44
     If mode is:
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    45
       #stc....then the method is stc-compiled.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    46
       #jit....then the method is bytecode compiled and left
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    47
               to the jitter
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    48
       #bc.....them the method is bytecode compiled and marked
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    49
               as checked so JIT won't even try.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    50
    "
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    51
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    52
    | m |
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    53
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    54
    Class withoutUpdatingChangesDo:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    55
        mode == #stc ifTrue:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    56
            ParserFlags withSTCCompilation:#always do:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    57
                m := self class compile: (mode, '_', source) classified: 'private - *dynamic*'.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    58
            ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    59
        ] ifFalse:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    60
            ParserFlags withSTCCompilation:#never do:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    61
                m := self class compile: (mode, '_', source) classified: 'private - *dynamic*'.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    62
                m checked: (mode == #bc)
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    63
            ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    64
        ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    65
    ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    66
    methods add: m.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    67
    ^m
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    68
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    69
    "Created: / 25-04-2013 / 15:18:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    70
!
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
    71
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    72
currentLineNumber
900
7acbd0cce153 Call fixAllLineNumbers, otherwise linenos are invalid.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 899
diff changeset
    73
    thisContext fixAllLineNumbers.
7acbd0cce153 Call fixAllLineNumbers, otherwise linenos are invalid.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 899
diff changeset
    74
    ^thisContext sender lineNumber.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    75
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
    76
    "Created: / 12-04-2013 / 21:20:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
900
7acbd0cce153 Call fixAllLineNumbers, otherwise linenos are invalid.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 899
diff changeset
    77
    "Modified: / 13-04-2013 / 10:12:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    78
!
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    79
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    80
saveContext
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    81
    self saveContext: thisContext sender.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    82
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    83
    "Created: / 26-09-2014 / 12:49:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    84
!
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    85
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    86
saveContext: aContext
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    87
    savedContext := aContext.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    88
    savedContextArgAndVarNames := savedContext argAndVarNames asArray.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    89
    savedContextArgAndVarValues := savedContext argsAndVars.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    90
    savedContextArgAndVarValuesUsingEval := savedContextArgAndVarNames 
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    91
        collect:[ :each | 
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    92
            Compiler evaluate:each
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    93
                             in:savedContext
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    94
                             receiver:savedContext receiver
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    95
                             notifying:nil
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    96
                             logged:false
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    97
                             ifFail:[ '*Error when evaluating*'].
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    98
        ].
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
    99
    savedContextLine := savedContext lineNumber.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   100
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   101
    self assert: savedContextArgAndVarNames size == savedContextArgAndVarValues size.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   102
    self assert: savedContextArgAndVarNames size == savedContextArgAndVarValuesUsingEval size.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   103
1287
e1d75e402dff class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 1273
diff changeset
   104
    1 to: savedContextArgAndVarNames size do:[:i | 
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   105
        | v1 v2 |
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   106
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   107
        v1 := savedContextArgAndVarValues at: i.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   108
        v2 := savedContextArgAndVarValuesUsingEval at: i.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   109
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   110
        self assert: v1 == v2. "HAS to be IDENTICAL"
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   111
    ].
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   112
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   113
    "Created: / 26-09-2014 / 12:49:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   114
    "Modified: / 26-09-2014 / 14:58:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   115
! !
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   116
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   117
!CompilerTests2 methodsFor:'private-mock methods'!
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   118
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   119
method_argAndVarNames_01
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   120
    #(1 2 3 4) select:[:each |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   121
        | isEven |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   122
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   123
        isEven := each even.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   124
        self saveContext.
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   125
    ].
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   126
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   127
    "Created: / 20-08-2013 / 09:04:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   128
    "Modified: / 26-09-2014 / 13:00:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   129
!
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   130
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   131
method_argAndVarNames_02
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   132
    #(1 2 3 4) select:[:each |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   133
        | isEven |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   134
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   135
        '1234' select:[:char |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   136
            | someOtherLocal |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   137
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   138
            someOtherLocal := char == $1.
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   139
        ].
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   140
        isEven := each even.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   141
        self saveContext.
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   142
    ].
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   143
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   144
    "Created: / 20-08-2013 / 09:17:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   145
    "Modified: / 26-09-2014 / 13:00:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   146
!
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   147
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   148
method_argAndVarNames_03
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   149
    "Reported by Stefan"
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   150
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   151
    savedContextArgAndVarNames := 1.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   152
    (Smalltalk isStandAloneApp | (savedContextArgAndVarNames == 1)) ifTrue:[
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   153
        | ttt |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   154
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   155
        ttt := 123.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   156
        self saveContext.
1149
e394c5dbf746 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1138
diff changeset
   157
    ].
e394c5dbf746 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1138
diff changeset
   158
    self halt.
e394c5dbf746 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1138
diff changeset
   159
    
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   160
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   161
    "
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   162
    CompilerTests2 basicNew method_argAndVarNames_03
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   163
    "
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   164
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   165
    "Created: / 20-08-2013 / 09:22:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   166
    "Modified: / 26-09-2014 / 13:01:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   167
!
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   168
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   169
method_argAndVarNames_04
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   170
    #(1 2 3 4) select:[:each |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   171
        | isEven |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   172
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   173
        isEven := each even.
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   174
        isEven ifTrue:[
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   175
            | isOddNot |
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   176
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   177
            isOddNot := each odd not.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   178
            self saveContext.
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   179
        ]
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   180
    ].
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   181
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   182
    "Created: / 20-08-2013 / 10:11:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   183
    "Modified: / 26-09-2014 / 13:01:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   184
!
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   185
991
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   186
method_argAndVarNames_05
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   187
    | b |
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   188
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   189
    b := [:len |
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   190
        1 to: len do:[:i|
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   191
            | local1 local2 |
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   192
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   193
            local1 := #local1.
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   194
            local2 := 42.
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   195
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   196
            i == 1 ifTrue:[
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   197
                self saveContext.
991
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   198
            ]
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   199
        ]
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   200
    ].
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   201
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   202
    b value: 5
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   203
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   204
    "
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   205
    CompilerTests2 basicNew method_argAndVarNames_05
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   206
    "
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   207
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   208
    "Created: / 22-08-2013 / 15:48:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   209
    "Modified: / 26-09-2014 / 13:01:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
991
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   210
!
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   211
1001
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   212
method_argAndVarNames_06
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   213
    (Smalltalk at:#exept_regression) classNamesAndAttributesDo:[:clsnm :attributes|
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   214
        | cls |
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   215
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   216
        cls := Smalltalk at: clsnm.
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   217
        ((Array with: self class) includes: cls) ifTrue:[
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   218
            (attributes includes: #autoload) ifTrue:[
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   219
                "/ Care for Object!!
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   220
                cls superclass notNil ifTrue:[
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   221
                    | superDef superNm |
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   222
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   223
                    superDef := ProjectDefinition definitionClassForPackage: cls superclass package.
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   224
                    superNm := cls superclass name.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   225
                    self saveContext.
1001
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   226
                    ^ self
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   227
                ].
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   228
            ].
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   229
        ].
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   230
    ].           
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   231
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   232
    "
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   233
    CompilerTests2 basicNew method_argAndVarNames_06
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   234
    "
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   235
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   236
    "Created: / 20-09-2013 / 11:44:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   237
    "Modified: / 26-09-2014 / 13:01:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1001
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   238
!
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
   239
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   240
method_argAndVarNames_07
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   241
    | b |
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   242
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   243
    b := [:len |
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   244
        1 to: len do:[:i|
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   245
            i == 1 ifTrue:[
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   246
                self saveContext.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   247
            ]
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   248
        ]
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   249
    ].
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   250
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   251
    b value: 5
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   252
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   253
    "
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   254
    CompilerTests2 basicNew method_argAndVarNames_05
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   255
    "
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   256
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   257
    "Created: / 23-12-2015 / 18:40:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   258
!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   259
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   260
method_lineno_002
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   261
    1 factorial. ^self currentLineNumber
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   262
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   263
    "Created: / 12-04-2013 / 21:22:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   264
!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   265
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   266
method_lineno_300
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   267
    "DO NOT MAKE THIS METHOD SHORTER, DO NOT REMOVE BLANK LINES!!!!!!"
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   268
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   269
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   270
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   271
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   272
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   273
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   274
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   275
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   276
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   277
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   278
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   279
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   280
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   281
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   282
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   283
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   284
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   285
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   286
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   287
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   288
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   289
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   290
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   291
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   292
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   293
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   294
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   295
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   296
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   297
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   298
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   299
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   300
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   301
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   302
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   303
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   304
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   305
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   306
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   307
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   308
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   309
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   310
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   311
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   312
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   313
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   314
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   315
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   316
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   317
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   318
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   319
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   320
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   321
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   322
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   323
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   324
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   325
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   326
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   327
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   328
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   329
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   330
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   331
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   332
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   333
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   334
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   335
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   336
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   337
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   338
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   339
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   340
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   341
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   342
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   343
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   344
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   345
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   346
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   347
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   348
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   349
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   350
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   351
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   352
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   353
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   354
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   355
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   356
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   357
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   358
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   359
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   360
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   361
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   362
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   363
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   364
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   365
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   366
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   367
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   368
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   369
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   370
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   371
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   372
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   373
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   374
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   375
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   376
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   377
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   378
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   379
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   380
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   381
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   382
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   383
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   384
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   385
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   386
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   387
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   388
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   389
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   390
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   391
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   392
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   393
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   394
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   395
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   396
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   397
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   398
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   399
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   400
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   401
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   402
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   403
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   404
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   405
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   406
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   407
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   408
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   409
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   410
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   411
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   412
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   413
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   414
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   415
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   416
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   417
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   418
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   419
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   420
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   421
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   422
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   423
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   424
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   425
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   426
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   427
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   428
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   429
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   430
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   431
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   432
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   433
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   434
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   435
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   436
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   437
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   438
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   439
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   440
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   441
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   442
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   443
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   444
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   445
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   446
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   447
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   448
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   449
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   450
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   451
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   452
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   453
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   454
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   455
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   456
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   457
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   458
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   459
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   460
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   461
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   462
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   463
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   464
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   465
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   466
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   467
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   468
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   469
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   470
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   471
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   472
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   473
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   474
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   475
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   476
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   477
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   478
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   479
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   480
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   481
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   482
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   483
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   484
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   485
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   486
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   487
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   488
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   489
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   490
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   491
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   492
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   493
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   494
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   495
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   496
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   497
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   498
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   499
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   500
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   501
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   502
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   503
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   504
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   505
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   506
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   507
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   508
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   509
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   510
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   511
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   512
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   513
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   514
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   515
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   516
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   517
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   518
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   519
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   520
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   521
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   522
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   523
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   524
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   525
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   526
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   527
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   528
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   529
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   530
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   531
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   532
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   533
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   534
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   535
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   536
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   537
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   538
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   539
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   540
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   541
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   542
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   543
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   544
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   545
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   546
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   547
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   548
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   549
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   550
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   551
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   552
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   553
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   554
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   555
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   556
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   557
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   558
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   559
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   560
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   561
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   562
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   563
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   564
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   565
    ^self currentLineNumber
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   566
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   567
    "Created: / 12-04-2013 / 21:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   568
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   569
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   570
method_literals_array_01a
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   571
    | literal |
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   572
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   573
    literal := #(
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   574
        _XXX:_:
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   575
        YYY
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   576
        _XXX:_:
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   577
    ).
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   578
    ^ literal
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   579
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   580
    "Created: / 20-01-2014 / 13:39:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   581
!
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   582
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   583
method_literals_array_01b
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   584
    | literal |
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   585
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   586
    literal := #(
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   587
        #'_XXX:_:'
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   588
        #'YYY'
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   589
        #'_XXX:_:'
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   590
    ).
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   591
    ^ literal
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   592
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   593
    "Created: / 20-01-2014 / 13:39:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   594
!
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
   595
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   596
method_literals_symbol_01
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   597
    | literal |
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   598
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   599
    literal := #_XXX:_:.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   600
    ^ literal.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   601
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   602
    "Created: / 20-01-2014 / 13:43:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   603
!
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
   604
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   605
method_methodslot_01: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   606
    self assertSendersMethodIsIdenticalTo: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   607
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   608
    "Created: / 25-04-2013 / 15:28:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   609
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   610
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   611
method_methodslot_02: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   612
     [ self assertSendersMethodIsIdenticalTo: thisMethod ]
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   613
        valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   614
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   615
    "Created: / 25-04-2013 / 15:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   616
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   617
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   618
method_methodslot_03: thisMethod
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   619
    "Deep block nesting...."
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   620
    [
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   621
        [
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   622
            [
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   623
                [ 
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   624
                    self assertSendersMethodIsIdenticalTo: thisMethod 
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   625
                ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   626
            ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   627
        ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   628
    ] valueWithArguments:#() "/ don't use #value, it gets optimized!!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   629
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
   630
    "Created: / 25-04-2013 / 15:38:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1271
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   631
!
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   632
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   633
method_negativeZero_01
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   634
    | literal |
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   635
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   636
    literal := -0.0.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
   637
    ^ literal.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   638
! !
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
   639
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   640
!CompilerTests2 methodsFor:'setup'!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   641
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   642
setUp
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   643
    methods := Set new.
930
78e2acffdea6 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 929
diff changeset
   644
    enabledJIT := ObjectMemory justInTimeCompilation:true.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   645
    savedContext := savedContextArgAndVarNames 
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   646
    := savedContextArgAndVarValues := savedContextArgAndVarValuesUsingEval 
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   647
    := savedContextLine := '* Not assigned *'.
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   648
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   649
    "Created: / 25-04-2013 / 15:20:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   650
    "Modified: / 26-09-2014 / 13:00:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   651
!
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   652
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   653
tearDown
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   654
    savedContext := savedContextArgAndVarNames 
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   655
    := savedContextArgAndVarValues := savedContextArgAndVarValuesUsingEval 
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   656
    := savedContextLine := nil.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   657
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   658
    ObjectMemory justInTimeCompilation: enabledJIT.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   659
    Class withoutUpdatingChangesDo:[
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   660
        | classesToRemove |
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   661
        (Smalltalk at: #'exept_regression_testData_CompilerTests2') notNil ifTrue:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   662
            (Smalltalk at: #'exept_regression_testData_CompilerTests2') classes do:[:e|
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   663
                e notNil ifTrue:[
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   664
                    Smalltalk removeClass: e
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   665
                ].
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   666
            ].
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   667
        ].
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   668
        Smalltalk allClassesDo:[:cls|
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   669
            (#(
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   670
                'exept:regression/testData/CompilerTests2'
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   671
                "/Add more...
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   672
            ) includes: cls package) ifTrue:[
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   673
                Smalltalk removeClass: cls
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   674
            ]
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   675
        ].
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   676
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   677
        methods do:[:m|
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   678
            m mclass removeSelector: m selector.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   679
        ]
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
   680
    ]
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   681
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   682
    "Created: / 26-10-2012 / 11:32:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   683
    "Modified: / 26-09-2014 / 12:59:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   684
! !
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   685
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   686
!CompilerTests2 methodsFor:'tests'!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   687
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   688
test_01
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   689
    "JV@2012-10-26:
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   690
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   691
     When a package is loaded from source using
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   692
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   693
        Smalltalk loadPackage:'...'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   694
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   695
     expression __EVALUATED FROM WORKSPACE__ AND a method from loaded class
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   696
     uses a class from the same package that is not yet loaded (i.e., it will
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   697
     be loaded later),
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   698
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   699
     then the compiler as of 2012-10-26 generates access to a workspace variable
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   700
     instead of access to a global
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   701
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   702
     This tests checks for this bug
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   703
    "
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   704
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   705
    | ws |
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   706
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   707
    "/ this test only works with a Display...
871
098316a54e40 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 870
diff changeset
   708
    self skipIf:[Display isNil] description:'Test requires a Display'.
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   709
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   710
    "/First, make sure that package is not yet loaded...
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   711
    self
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   712
        assert: (Smalltalk at: #'exept_regression_testData_CompilerTests2') isNil
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   713
        description: 'Mock package already loaded'.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   714
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   715
    ws := WorkspaceApplication new.
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   716
    ws selectedWorkspace
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   717
        autoDefineVariables: #workspace;
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   718
        contents: '(Smalltalk loadPackage: #''exept:regression/testData/CompilerTests2'')';
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   719
        selectAll;
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   720
        doIt.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   721
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   722
    self assert: (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') new foo class
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
   723
                    == (Smalltalk at: #'RegressionTests::CompilerTests2Mock2')
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   724
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   725
    "Created: / 26-10-2012 / 11:59:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   726
    "Modified: / 24-06-2013 / 15:30:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   727
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   728
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   729
test_02
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   730
    "JV@2012-10-26:
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   731
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   732
     When a package is loaded from source using
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   733
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   734
	Smalltalk loadPackage:'...'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   735
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   736
     expression and a method from loaded class in namespace uses a class from the
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   737
     same package and same namespace, that is not yet loaded (i.e., it will be loaded
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   738
     later),
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   739
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   740
     then the compiler as of 2012-10-26 generates access to class in no namespace.
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   741
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   742
     This test checks for this bug
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   743
    "
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   744
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   745
    "/First, make sure that package is not yet loaded...
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   746
    self
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   747
	assert: (Smalltalk at: #'exept_regression_estData_CompilerTests2') isNil
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   748
	description: 'Mock package already loaded'.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   749
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   750
    self
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   751
	assert: (Smalltalk loadPackage: #'exept:regression/testData/CompilerTests2')
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   752
	description: 'Cannot load mock package!!'.
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   753
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   754
823
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   755
    self assert: (Smalltalk at: #'RegressionTests::CompilerTests2Mock1') new foo class
452346d978c6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   756
		    == (Smalltalk at: #'RegressionTests::CompilerTests2Mock2')
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   757
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   758
    "Created: / 26-10-2012 / 12:26:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   759
    "Modified (comment): / 12-02-2013 / 16:24:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   760
!
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   761
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   762
test_03
992
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   763
    "JV@2013-10-27:
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   764
992
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   765
     As of 2013-10-27 parser crashes on DNU when a message
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   766
     is constant-folded.
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   767
    "
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   768
992
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   769
    self compile: 'mock_03 ^ 1 perform: #+ with: 2' mode: #bc.
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   770
    self assert: self bc_mock_03 == 3
948
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   771
a28d3cfb7c43 Added test from global variable access when compiling from within the workspace.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 930
diff changeset
   772
    "Created: / 24-06-2013 / 14:06:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
992
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   773
    "Modified: / 27-08-2013 / 02:38:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   774
!
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   775
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   776
test_04
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   777
    "JV@2013-10-27:
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   778
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   779
     As of 2013-10-27 bytecode compiler generates invalid code
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   780
     for perform:* with constant symbol. That's because
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   781
     in Parser, rev 1.781 >> keywordExpressionFor:, line 57 the
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   782
     selector is reser back to the original, overwriting the one
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   783
     set by constant-folding method.
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   784
    "
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   785
993
8cc7201dbfda Fix in test_04, sigh
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 992
diff changeset
   786
    self compile: 'mock_04:x ^x perform: #+ with: 2' mode: #bc.
992
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   787
    self assert: (self bc_mock_04:2) == 4
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   788
4acfe6220c73 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 991
diff changeset
   789
    "Created: / 27-08-2013 / 02:37:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
993
8cc7201dbfda Fix in test_04, sigh
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 992
diff changeset
   790
    "Modified: / 27-08-2013 / 10:32:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1138
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   791
!
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   792
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   793
test_05a
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   794
    "JV@2014-05-23:
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   795
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   796
    As of 2014-05-23, stc generate wrong code for compilation units
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   797
    which references symbol AND contains argument declarations for
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   798
    variable named _<value of that symbol> (given that symbol consist
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   799
    of [A-Za-z]). 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   800
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   801
    The problem is that stc creates per-compilation unit static variable
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   802
    for the symbol and defines a short accessor in form _<symbol value>.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   803
    If the function has argumemt with the very same name, the CPP expands
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   804
    argment name in method signature to the access to the static variable
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   805
    referencing the symbol object and thus cause syntax error.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   806
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   807
    NOTE, that problem occurs even if the symbol object is used as a selector
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   808
    in message send ANYWHERE in the same compilation unit.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   809
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   810
    Bytecode compiler, however, handles this correctly, so this problem
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   811
    will manifest itself by uncompilable code once checked out and
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   812
    compled by STC.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   813
    "
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   814
    #(bc stc) do:[:mode | 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   815
    self compile: 'at: _key 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   816
                    ^ #key' mode: mode.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   817
        self assert: (self perform: (mode , '_at:') asSymbol with: 2) == #key.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   818
    ]
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   819
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   820
    "Created: / 23-05-2014 / 14:33:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   821
    "Modified (comment): / 23-05-2014 / 16:11:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   822
!
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   823
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   824
test_05b
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   825
    "JV@2014-05-23:
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   826
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   827
    As of 2014-05-23, stc generate wrong code for compilation units
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   828
    which references symbol AND contains local variable declarations for
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   829
    variable named _<value of that symbol> (given that symbol consist
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   830
    of [A-Za-z]. 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   831
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   832
    The problem is that local variables in stc code are not a C local variables
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   833
    but rather accessed indirectly using __context[offset]. As a courtesy to a problammer,
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   834
    original variable name is a #define expaning to this context-accessing expression.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   835
    If there's a symbol with conflicitng name, the #define which is used to access it
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   836
    is overriden by #define for local variable, causing bad return value of the method.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   837
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   838
    Bytecode compiler, however, handles this correctly, so this problem
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   839
    will manifest itself when recompiled by STC and run. Even worse, in debugger
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   840
    printit you'll get correct answer and well as if you recompile. 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   841
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   842
    "
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   843
    #(bc stc) do:[:mode | 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   844
    self compile: 'at: arg
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   845
                    | _key |
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   846
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   847
                    _key := arg.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   848
                    ^ #key' mode: mode.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   849
        self assert: (self perform: (mode , '_at:') asSymbol with: 2) == #key.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   850
    ]
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   851
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   852
    "Created: / 23-05-2014 / 14:33:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   853
    "Modified (comment): / 23-05-2014 / 16:16:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   854
! !
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   855
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   856
!CompilerTests2 methodsFor:'tests - FFI'!
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   857
1246
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   858
test_external_function_call_01a
1138
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   859
    "Test for stx bug for <cdecl> specs like
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   860
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   861
        <cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   862
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   863
     i.e., when custom subclass of ExternalAddress is in namespace."
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   864
    
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   865
    | malloc  free |
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   866
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   867
    malloc := 'malloc: size
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   868
1201
717489c30ebd Added missing class CompilerTests2ExternalBytes - required by FFI test
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1163
diff changeset
   869
    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int ) module: ''librun.so''>
1138
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   870
    self primitive failed'.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   871
    free := 'free: ptr
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   872
1201
717489c30ebd Added missing class CompilerTests2ExternalBytes - required by FFI test
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1163
diff changeset
   873
    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes ) module: ''librun.so''>
1138
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   874
    self primitive failed'.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   875
    #( #bc #stc ) do:[:mode | 
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   876
        | ptr |
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   877
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   878
        self compile:malloc mode:mode.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   879
        self compile:free mode:mode.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   880
        ptr := self perform:(mode , '_malloc:') asSymbol with:1.
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   881
        self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
1201
717489c30ebd Added missing class CompilerTests2ExternalBytes - required by FFI test
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1163
diff changeset
   882
        self perform:(mode , '_free:') asSymbol with:ptr.
1138
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   883
    ]
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   884
cd03872a5b98 Two more tests covering stc bugs:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1037
diff changeset
   885
    "Created: / 06-01-2014 / 11:29:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1201
717489c30ebd Added missing class CompilerTests2ExternalBytes - required by FFI test
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1163
diff changeset
   886
    "Modified: / 20-09-2014 / 21:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1246
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   887
!
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   888
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   889
test_external_function_call_01b
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   890
    "Test for stx bug for <cdecl> specs like
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   891
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   892
        <cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   893
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   894
     i.e., when custom subclass of ExternalAddress is in namespace."
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   895
    
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   896
    | malloc  free |
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   897
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   898
    malloc := 'malloc: size
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   899
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   900
    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int ) module: ''librun''>
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   901
    self primitive failed'.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   902
    free := 'free: ptr
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   903
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   904
    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes ) module: ''librun''>
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   905
    self primitive failed'.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   906
    #( #bc #stc ) do:[:mode | 
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   907
        | ptr |
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   908
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   909
        self compile:malloc mode:mode.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   910
        self compile:free mode:mode.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   911
        ptr := self perform:(mode , '_malloc:') asSymbol with:1.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   912
        self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   913
        self perform:(mode , '_free:') asSymbol with:ptr.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   914
    ]
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   915
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   916
    "Created: / 06-01-2014 / 11:29:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   917
    "Modified: / 20-09-2014 / 21:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   918
!
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   919
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   920
test_external_function_call_01c
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   921
    "Test for stx bug for <cdecl> specs like
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   922
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   923
        <cdecl: Cairo::FontFace 'cairo_get_font_face' ( Cairo::GraphicsContext ) >
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   924
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   925
     i.e., when custom subclass of ExternalAddress is in namespace."
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   926
    
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   927
    | malloc  free |
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   928
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   929
    malloc := 'malloc: size
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   930
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   931
    <cdecl: const RegressionTests::CompilerTests2ExternalBytes "malloc" ( int )>
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   932
    self primitive failed'.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   933
    free := 'free: ptr
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   934
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   935
    <cdecl: const void "free" ( RegressionTests::CompilerTests2ExternalBytes )>
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   936
    self primitive failed'.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   937
    #( #bc #stc ) do:[:mode | 
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   938
        | ptr |
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   939
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   940
        self compile:malloc mode:mode.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   941
        self compile:free mode:mode.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   942
        ptr := self perform:(mode , '_malloc:') asSymbol with:1.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   943
        self assert:ptr class == RegressionTests::CompilerTests2ExternalBytes.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   944
        self perform:(mode , '_free:') asSymbol with:ptr.
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   945
    ]
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   946
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   947
    "Created: / 06-01-2014 / 11:29:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cc5bd61b11b4 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1245
diff changeset
   948
    "Modified: / 20-09-2014 / 21:51:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   949
! !
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   950
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   951
!CompilerTests2 methodsFor:'tests - arg & var names'!
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   952
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   953
test_argAndVarNames_04
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   954
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   955
    #(bc jit stc) do:[:mode |
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   956
        savedContextArgAndVarNames := nil.
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   957
        self compile: (self class >> #method_argAndVarNames_04) source mode: mode.
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   958
        self perform: (mode , '_method_argAndVarNames_04') asSymbol.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   959
        self assert: savedContextArgAndVarNames = #(each isEven isOddNot).
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   960
        self assert: savedContextArgAndVarValues = #(4 true true).  
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   961
    ]
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   962
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
   963
    "Created: / 20-08-2013 / 10:12:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
   964
    "Modified: / 26-09-2014 / 15:04:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
991
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   965
!
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   966
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   967
test_argAndVarNames_05bc
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   968
    "/ CG: this test tries to access the context of a block.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   969
    "/ however, the block is an inlined to:do: block, so its block local gets
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   970
    "/ lifted to its home context.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   971
    "/ It is questionable if the test is right.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   972
    "/ 
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   973
    "/ JV: true, but this tests exercise methods used by the
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   974
    "/ debugger. Therefore it does not matter whether block is inlined
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   975
    "/ or not - the debugger should show correct data in all cases!!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   976
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   977
    savedContextArgAndVarNames := nil.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   978
    self compile: (self class >> #method_argAndVarNames_05) source mode: #bc.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   979
    self perform: (#bc , '_method_argAndVarNames_05') asSymbol.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   980
    self assert: savedContextArgAndVarNames = #(len i local1 local2).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   981
    self assert: savedContextArgAndVarValues = #(5 1 #local1 42).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   982
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   983
    "Created: / 23-12-2015 / 18:38:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   984
!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   985
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   986
test_argAndVarNames_05jit
1247
ff9a4f439ff9 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1246
diff changeset
   987
    "/ CG: this test tries to access the context of a block.
ff9a4f439ff9 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1246
diff changeset
   988
    "/ however, the block is an inlined to:do: block, so its block local gets
ff9a4f439ff9 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1246
diff changeset
   989
    "/ lifted to its home context.
ff9a4f439ff9 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1246
diff changeset
   990
    "/ It is questionable if the test is right.
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   991
    "/ 
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   992
    "/ JV: true, but this tests exercise methods used by the
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   993
    "/ debugger. Therefore it does not matter whether block is inlined
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   994
    "/ or not - the debugger should show correct data in all cases!!
991
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   995
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   996
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   997
    "/ The bytecode compiler inlines the to:do: in this case...
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   998
    savedContextArgAndVarNames := nil.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
   999
    self compile: (self class >> #method_argAndVarNames_05) source mode: #jit.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1000
    self perform: (#jit , '_method_argAndVarNames_05') asSymbol.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1001
    self assert: savedContextArgAndVarNames = #(len i local1 local2).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1002
    self assert: savedContextArgAndVarValues = #(5 1 #local1 42).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1003
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1004
    "Created: / 23-12-2015 / 18:38:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1005
!
991
c855ef9d606c class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
  1006
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1007
test_argAndVarNames_05stc
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1008
    "/ CG: this test tries to access the context of a block.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1009
    "/ however, the block is an inlined to:do: block, so its block local gets
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1010
    "/ lifted to its home context.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1011
    "/ It is questionable if the test is right.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1012
    "/ 
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1013
    "/ JV: true, but this tests exercise methods used by the
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1014
    "/ debugger. Therefore it does not matter whether block is inlined
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1015
    "/ or not - the debugger should show correct data in all cases!!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1016
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1017
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1018
    "/ The stc compiler as of 2015-12-23 does not (!!!!!!) inline to:do:
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1019
    savedContextArgAndVarNames := nil.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1020
    self compile: (self class >> #method_argAndVarNames_05) source mode: #stc.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1021
    self perform: (#stc , '_method_argAndVarNames_05') asSymbol.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1022
    self assert: savedContextArgAndVarNames = #(i local1 local2).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1023
    self assert: savedContextArgAndVarValues = #(1 #local1 42)
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1024
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1025
    "Created: / 23-12-2015 / 18:37:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1001
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1026
!
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1027
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1028
test_argAndVarNames_06
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1029
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1030
    #(bc jit stc) do:[:mode |
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1031
        savedContextArgAndVarNames := nil.
1001
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1032
        self compile: (self class >> #method_argAndVarNames_06) source mode: mode.
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1033
        self perform: (mode , '_method_argAndVarNames_06') asSymbol.
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1034
        self assert: savedContextArgAndVarNames = #(clsnm attributes cls superDef superNm).
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1035
        self assert: savedContextArgAndVarValues = {
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1036
            self class name.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1037
            #(#autoload).
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1038
            self class.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1039
            Smalltalk at: #stx_goodies_sunit.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1040
            self class superclass name.
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1041
        }
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1042
1001
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1043
    ]
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1044
9478e093ee77 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 993
diff changeset
  1045
    "Created: / 20-09-2013 / 11:44:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1212
8429b2bff582 class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1201
diff changeset
  1046
    "Modified: / 26-09-2014 / 15:09:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1047
!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1048
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1049
test_argAndVarNames_07bc
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1050
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1051
    savedContextArgAndVarNames := nil.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1052
    self compile: (self class >> #method_argAndVarNames_07) source mode: #bc.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1053
    self perform: (#bc , '_method_argAndVarNames_07') asSymbol.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1054
    self assert: savedContextArgAndVarNames = #(len i ).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1055
    self assert: savedContextArgAndVarValues = #(5 1 ).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1056
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1057
    "Created: / 23-12-2015 / 18:40:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1058
!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1059
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1060
test_argAndVarNames_07jit
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1061
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1062
    savedContextArgAndVarNames := nil.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1063
    self compile: (self class >> #method_argAndVarNames_07) source mode: #jit.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1064
    self perform: (#jit , '_method_argAndVarNames_07') asSymbol.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1065
    self assert: savedContextArgAndVarNames = #(len i ).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1066
    self assert: savedContextArgAndVarValues = #(5 1 ).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1067
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1068
    "Created: / 23-12-2015 / 18:40:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1069
!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1070
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1071
test_argAndVarNames_07stc
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1072
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1073
    savedContextArgAndVarNames := nil.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1074
    self compile: (self class >> #method_argAndVarNames_07) source mode: #stc.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1075
    self perform: (#stc , '_method_argAndVarNames_07') asSymbol.
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1076
    self assert: savedContextArgAndVarNames = #( i ).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1077
    self assert: savedContextArgAndVarValues = #( 1 ).
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1078
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1079
    "Created: / 23-12-2015 / 18:41:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1080
    "Modified: / 26-12-2015 / 07:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
988
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
  1081
! !
cd49b35f671f class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 948
diff changeset
  1082
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1083
!CompilerTests2 methodsFor:'tests - line numbers'!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1084
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1085
test_lineno_01_bci
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1086
    | m002 m300 l |
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1087
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1088
    m002 := self compile: (self class >> #method_lineno_002) source mode: #bc.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1089
    m300 := self compile: (self class >> #method_lineno_300) source mode: #bc.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1090
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1091
    self assert: (l := self bc_method_lineno_002) == 2.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1092
    self assert: (l := self bc_method_lineno_300) == 300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1093
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1094
    self assert: m002 code isNil.
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1095
    self assert: m300 code isNil.
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1096
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1097
    "Created: / 12-04-2013 / 21:24:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1098
    "Modified: / 25-04-2013 / 15:24:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1099
!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1100
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1101
test_lineno_01_jit
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1102
    | m002 m300 l |
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1103
1473
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1104
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1105
    self skipIf: ObjectMemory justInTimeCompilation not 
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1106
         description: 'Just-in-time compilation not supported on this setup'.
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1107
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1108
    m002 := self compile: (self class >> #method_lineno_002) source mode: #jit.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1109
    m300 := self compile: (self class >> #method_lineno_300) source mode: #jit.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1110
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1111
    self assert: (l := self jit_method_lineno_002) == 2.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1112
    self assert: (l := self jit_method_lineno_300) == 300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1113
929
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
  1114
    self assert: m002 code notNil.
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
  1115
    self assert: m300 code notNil.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1116
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1117
    "Created: / 12-04-2013 / 21:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
929
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
  1118
    "Modified: / 10-05-2013 / 18:23:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1119
!
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1120
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1121
test_lineno_01_stc
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1122
    | m002 m300 l |
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1123
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1124
    m002 := self class >> #method_lineno_002.
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1125
    m300 := self class >> #method_lineno_300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1126
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1127
    self compile: m002 source mode: #stc.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1128
    self compile: m300 source mode: #stc.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1129
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1130
    self assert: (l := self stc_method_lineno_002) == 2.
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1131
    self assert: (l := self stc_method_lineno_300) == 300.
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1132
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1133
    "Created: / 12-04-2013 / 21:50:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
921
cb5e99d58aab Refactoring only - add more versatile compile method
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 900
diff changeset
  1134
    "Modified: / 25-04-2013 / 15:22:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
899
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1135
! !
4375bdf77fd2 Added line number tests
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 871
diff changeset
  1136
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1137
!CompilerTests2 methodsFor:'tests - literals'!
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1138
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1139
test_literals_array_01a
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1140
    | m l_stc l_bc |
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1141
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1142
    m := self class >> #method_literals_array_01a.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1143
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1144
    self compile: m source mode: #stc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1145
    self compile: m source mode: #bc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1146
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1147
    l_stc := self stc_method_literals_array_01a.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1148
    l_bc :=  self bc_method_literals_array_01a.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1149
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1150
    self assert: l_stc = l_bc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1151
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1152
    "Created: / 20-01-2014 / 13:46:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1153
!
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1154
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1155
test_literals_array_01a_bc
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1156
    | m l |
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1157
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1158
    m := self class >> #method_literals_array_01a.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1159
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1160
    self compile: m source mode: #bc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1161
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1162
    l := self bc_method_literals_array_01a.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1163
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1164
    self assert: l size == 3.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1165
    self assert: l first == #'_XXX:_:'.
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1166
    self assert: l second == #'YYY'.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1167
    self assert: l third == #'_XXX:_:'.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1168
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1169
    "Created: / 20-01-2014 / 13:42:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1170
!
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1171
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1172
test_literals_array_01a_stc
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1173
    | m l |
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1174
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1175
    m := self class >> #method_literals_array_01a.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1176
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1177
    self compile: m source mode: #stc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1178
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1179
    l := self stc_method_literals_array_01a.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1180
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1181
    self assert: l size == 3.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1182
    self assert: l first == #'_XXX:_:'.
1245
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1183
    self assert: l second == #'YYY'.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1184
    self assert: l third == #'_XXX:_:'.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1185
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1186
    "Created: / 20-01-2014 / 13:40:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1187
!
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1188
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1189
test_literals_array_01b
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1190
    | m l_stc l_bc |
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1191
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1192
    m := self class >> #method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1193
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1194
    self compile: m source mode: #stc.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1195
    self compile: m source mode: #bc.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1196
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1197
    l_stc := self stc_method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1198
    l_bc :=  self bc_method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1199
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1200
    self assert: l_stc = l_bc.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1201
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1202
    "Created: / 20-01-2014 / 13:46:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1203
!
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1204
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1205
test_literals_array_01b_bc
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1206
    | m l |
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1207
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1208
    m := self class >> #method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1209
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1210
    self compile: m source mode: #bc.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1211
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1212
    l := self bc_method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1213
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1214
    self assert: l size == 3.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1215
    self assert: l first == #'_XXX:_:'.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1216
    self assert: l second == #'YYY'.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1217
    self assert: l third == #'_XXX:_:'.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1218
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1219
    "Created: / 20-01-2014 / 13:42:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1220
!
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1221
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1222
test_literals_array_01b_stc
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1223
    | m l |
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1224
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1225
    m := self class >> #method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1226
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1227
    self compile: m source mode: #stc.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1228
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1229
    l := self stc_method_literals_array_01b.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1230
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1231
    self assert: l size == 3.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1232
    self assert: l first == #'_XXX:_:'.
a00a20a29299 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1212
diff changeset
  1233
    self assert: l second == #'YYY'.
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1234
    self assert: l third == #'_XXX:_:'.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1235
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1236
    "Created: / 20-01-2014 / 13:40:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1237
!
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1238
1271
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1239
test_literals_negativeZero_bc
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1240
    | m l |
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1241
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1242
    m := self class >> #method_negativeZero_01.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1243
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1244
    self compile: m source mode: #bc.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1245
1273
0afeacccdc89 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 1272
diff changeset
  1246
    l := self bc_method_negativeZero_01.
1271
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1247
    self assert: l = 0.0.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1248
    self assert: l isNegativeZero.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1249
!
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1250
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1251
test_literals_negativeZero_stc
1272
dbe0aa7a4e17 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 1271
diff changeset
  1252
    | m negZero |
1271
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1253
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1254
    m := self class >> #method_negativeZero_01.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1255
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1256
    self compile: m source mode: #stc.
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1257
1272
dbe0aa7a4e17 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 1271
diff changeset
  1258
    negZero := self stc_method_negativeZero_01.
dbe0aa7a4e17 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 1271
diff changeset
  1259
    self assert: negZero = 0.0.
dbe0aa7a4e17 class: RegressionTests::CompilerTests2
Stefan Vogel <sv@exept.de>
parents: 1271
diff changeset
  1260
    self assert: negZero isNegativeZero.
1271
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1261
!
6004da64f1ef class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 1247
diff changeset
  1262
1037
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1263
test_literals_symbol_01_bc
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1264
    | m l |
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1265
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1266
    m := self class >> #method_literals_symbol_01.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1267
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1268
    self compile: m source mode: #bc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1269
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1270
    l := self bc_method_literals_symbol_01.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1271
    self assert: l == #'_XXX:_:'.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1272
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1273
    "Created: / 20-01-2014 / 13:44:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1274
!
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1275
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1276
test_literals_symbol_01_stc
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1277
    | m l |
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1278
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1279
    m := self class >> #method_literals_symbol_01.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1280
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1281
    self compile: m source mode: #stc.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1282
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1283
    l := self stc_method_literals_symbol_01.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1284
    self assert: l == #'_XXX:_:'.
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1285
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1286
    "Created: / 20-01-2014 / 13:44:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1287
! !
4bba0706b9ae Added tests covering symbol parsing inconsistency in array literals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1001
diff changeset
  1288
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1289
!CompilerTests2 methodsFor:'tests - method slot'!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1290
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1291
test_methodslot_01_bci
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1292
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1293
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1294
    m := self compile: (self class >> #method_methodslot_01:) source mode: #bc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1295
    self bc_method_methodslot_01: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1296
    self assert: m code isNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1297
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1298
    "Created: / 25-04-2013 / 15:33:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1299
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1300
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1301
test_methodslot_01_jit
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1302
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1303
1473
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1304
    self skipIf: ObjectMemory justInTimeCompilation not 
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1305
         description: 'Just-in-time compilation not supported on this setup'.
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1306
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1307
    m := self compile: (self class >> #method_methodslot_01:) source mode: #jit.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1308
    self jit_method_methodslot_01: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1309
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1310
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1311
    "Created: / 25-04-2013 / 15:34:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1312
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1313
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1314
test_methodslot_01_stc
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1315
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1316
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1317
    m := self compile: (self class >> #method_methodslot_01:) source mode: #stc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1318
    self stc_method_methodslot_01: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1319
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1320
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1321
    "Created: / 25-04-2013 / 15:34:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1322
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1323
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1324
test_methodslot_02_bci
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1325
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1326
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1327
    m := self compile: (self class >> #method_methodslot_02:) source mode: #bc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1328
    self bc_method_methodslot_02: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1329
    self assert: m code isNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1330
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1331
    "Created: / 25-04-2013 / 15:36:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1332
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1333
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1334
test_methodslot_02_jit
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1335
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1336
1473
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1337
    self skipIf: ObjectMemory justInTimeCompilation not 
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1338
         description: 'Just-in-time compilation not supported on this setup'.
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1339
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1340
    m := self compile: (self class >> #method_methodslot_02:) source mode: #jit.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1341
    self jit_method_methodslot_02: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1342
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1343
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1344
    "Created: / 25-04-2013 / 15:37:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1345
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1346
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1347
test_methodslot_02_stc
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1348
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1349
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1350
    m := self compile: (self class >> #method_methodslot_02:) source mode: #stc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1351
    self stc_method_methodslot_02: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1352
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1353
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1354
    "Created: / 25-04-2013 / 15:37:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1355
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1356
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1357
test_methodslot_03_bci
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1358
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1359
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1360
    m := self compile: (self class >> #method_methodslot_03:) source mode: #bc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1361
    self bc_method_methodslot_03: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1362
    self assert: m code isNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1363
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1364
    "Created: / 25-04-2013 / 15:39:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1365
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1366
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1367
test_methodslot_03_jit
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1368
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1369
1473
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1370
    self skipIf: ObjectMemory justInTimeCompilation not 
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1371
         description: 'Just-in-time compilation not supported on this setup'.
e31a9559e135 Skip JIT tests on setups which do not support JIT
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1287
diff changeset
  1372
922
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1373
    m := self compile: (self class >> #method_methodslot_03:) source mode: #jit.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1374
    self jit_method_methodslot_03: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1375
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1376
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1377
    "Created: / 25-04-2013 / 15:39:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1378
!
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1379
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1380
test_methodslot_03_stc
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1381
    | m |
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1382
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1383
    m := self compile: (self class >> #method_methodslot_03:) source mode: #stc.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1384
    self stc_method_methodslot_03: m.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1385
    self assert: m code notNil.
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1386
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1387
    "Created: / 25-04-2013 / 15:39:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1388
! !
7c65bb0a73f5 Added tests for method-in-context slot.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 921
diff changeset
  1389
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1390
!CompilerTests2 class methodsFor:'documentation'!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1391
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1392
version
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1393
    ^ '$Header$'
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1394
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1395
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1396
version_CVS
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1397
    ^ '$Header$'
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1398
!
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1399
1475
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1400
version_HG
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1401
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1402
    ^ '$Changeset: <not expanded> $'
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1403
!
ea3d40ebae8f More tests for context variables and values (used by the debugger)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 1473
diff changeset
  1404
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1405
version_SVN
929
5c6f8d37f9ce class: RegressionTests::CompilerTests2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 922
diff changeset
  1406
    ^ '$Id$'
784
b59c0cad82d6 initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
  1407
! !
870
577f844aedf7 class: RegressionTests::CompilerTests2
Claus Gittinger <cg@exept.de>
parents: 823
diff changeset
  1408