ByteCodeCompilerWithBreakpointSupport.st
author HG Automerge
Thu, 12 Jan 2017 09:44:22 +0000
branchjv
changeset 4088 529963173d68
parent 3520 b2b6462d8cd7
child 4171 3f8437757dba
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     1
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     2
 COPYRIGHT (c) 2006 by eXept Software AG
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     3
	      All Rights Reserved
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     4
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    10
 hereby transferred.
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    11
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    12
"{ Package: 'stx:libcomp' }"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    13
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    14
ByteCodeCompiler subclass:#ByteCodeCompilerWithBreakpointSupport
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    15
	instanceVariableNames:'breakpoints'
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
	classVariableNames:''
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	poolDictionaries:''
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
	category:'System-Compiler-Debugging'
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
!ByteCodeCompilerWithBreakpointSupport class methodsFor:'documentation'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    22
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    23
copyright
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    24
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    25
 COPYRIGHT (c) 2006 by eXept Software AG
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
	      All Rights Reserved
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
 hereby transferred.
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    36
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    37
documentation
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    38
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    39
    I'm an experimental compiler class that supports
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
    breakpoints. Once tested, the code will be merged
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
    to ByteCodeCompiler.
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
    [author:]
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
        Jan Vrany <jan.vrany@fit.cvut.cz>
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
    [instance variables:]
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    47
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    48
    [class variables:]
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    49
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    50
    [see also:]
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    51
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    52
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    53
! !
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    54
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    55
!ByteCodeCompilerWithBreakpointSupport methodsFor:'adding breakpoint'!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    56
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    57
possiblyWrapABreakPointAround:aBlock
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    58
    "refactored Jan's original code; changed to not wrap an already wrapped expression"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    59
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    60
    | expr bpnt tokenPositionBefore tokenLineNrBefore |
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    61
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    62
    tokenPositionBefore := tokenPosition ? source position.
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
    63
    tokenLineNrBefore := tokenLineNr.
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    64
3205
aaf9ba016d5b class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
    65
    "/ find the very first breakpoint, which is right after the
aaf9ba016d5b class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
    66
    "/ current line start, and remove it from the breakpoints collection,
aaf9ba016d5b class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
    67
    "/ incl. all before. This removes breakpoints on empty lines or inside strings etc.
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    68
    [
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    69
        breakpoints notEmpty
3426
5ca39458af81 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3225
diff changeset
    70
        and:[breakpoints first position <= tokenPositionBefore]
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    71
    ] whileTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    72
        bpnt := breakpoints removeFirst
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    73
    ].
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    74
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    75
    expr := aBlock value.
3520
b2b6462d8cd7 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    76
    expr == #Error ifTrue:[^expr].
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    77
    bpnt isNil ifTrue:[^expr].
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    78
    expr isBreakPointNode ifTrue:[^expr].
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    79
    tokenPositionBefore = tokenPosition ifTrue:[
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    80
        "/ nothing scanned - happens with unaryExpression which does not find anything,
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    81
        "/ but returns due to a ')' or ']' token.
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    82
        ^expr
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    83
    ].
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    84
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    85
    bpnt isReached:true.
2799
37dfd9b9d9ee changed: #possiblyWrapABreakPointAround:
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
    86
37dfd9b9d9ee changed: #possiblyWrapABreakPointAround:
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
    87
    "/ Transcript show:'adding breakpoint '; show:bpnt; show:' before: '; showCR:expr.
37dfd9b9d9ee changed: #possiblyWrapABreakPointAround:
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
    88
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    89
    ^ BreakpointNode new
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    90
        breakpoint: bpnt;
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    91
        expression: expr;
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
    92
        lineNumber:(bpnt line ? tokenLineNrBefore);
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    93
        yourself
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    94
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    95
    "Created: / 05-07-2011 / 21:11:19 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    96
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    97
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    98
removeMissedBreakpointsBefore:aPosition
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    99
    [
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   100
        breakpoints notEmpty
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   101
        and:[breakpoints first position < aPosition]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   102
    ] whileTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   103
        breakpoints removeFirst
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   104
    ].
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   105
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   106
    "Created: / 05-07-2011 / 23:13:25 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   107
! !
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   108
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   109
!ByteCodeCompilerWithBreakpointSupport methodsFor:'parsing-expressions'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   110
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   111
binaryExpression
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   112
    ^ self possiblyWrapABreakPointAround:[super binaryExpression]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   113
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   114
    "Created: / 05-07-2011 / 23:08:43 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   115
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   116
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   117
binaryExpressionFor:aReceiver
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   118
    ^ self possiblyWrapABreakPointAround:[super binaryExpressionFor:aReceiver]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   119
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   120
    "Created: / 05-07-2011 / 21:10:53 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   121
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   122
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   123
block
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   124
    |blockNode|
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   125
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   126
    self removeMissedBreakpointsBefore:source position.
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   127
    blockNode := super block.
3517
b71d7aeb8c41 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   128
    blockNode ~~ #Error ifTrue:[
b71d7aeb8c41 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   129
        self removeMissedBreakpointsBefore:blockNode endPosition+2.
b71d7aeb8c41 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   130
    ].
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   131
    ^ blockNode
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   132
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   133
    "Created: / 05-07-2011 / 22:56:19 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   134
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   135
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   136
expression
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   137
    ^ self possiblyWrapABreakPointAround:[super expression]
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   138
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   139
    "Created: / 16-06-2011 / 14:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   140
    "Modified: / 05-07-2011 / 21:11:38 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   141
!
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   142
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   143
primary
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   144
    ^ self possiblyWrapABreakPointAround:[super primary]
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   146
    "Created: / 16-06-2011 / 14:58:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   147
    "Modified: / 05-07-2011 / 21:11:38 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   148
    "Created: / 05-07-2011 / 23:05:23 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   149
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   150
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   151
unaryExpression
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   152
    ^ self possiblyWrapABreakPointAround:[super unaryExpression]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   153
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   154
    "Created: / 05-07-2011 / 23:08:54 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   155
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   156
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   157
unaryExpressionFor:aReceiver
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   158
    ^ self possiblyWrapABreakPointAround:[super unaryExpressionFor:aReceiver]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   159
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   160
    "Created: / 05-07-2011 / 21:15:30 / cg"
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   161
! !
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   162
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   163
!ByteCodeCompilerWithBreakpointSupport methodsFor:'private'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   165
breakpoints:aCollection
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   166
    breakpoints := aCollection copy sort:[:a :b|a position < b position].
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   168
    "Created: / 16-06-2011 / 14:35:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   169
    "Created: / 05-07-2011 / 21:37:28 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   170
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   171
3225
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   172
methodClass
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   173
    ^ methodClass ? MethodWithBreakpoints
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   174
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   175
    "Created: / 22-07-2013 / 15:54:19 / cg"
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   176
!
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   177
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   178
notifying: anObject
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   179
    super notifying: anObject.
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   180
    anObject notNil ifTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   181
        breakpoints isNil ifTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   182
            self breakpoints:(anObject perform: #breakpoints ifNotUnderstood:#()).
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   183
        ]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   184
    ]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   185
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   186
    "Created: / 16-06-2011 / 14:35:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   187
    "Modified: / 05-07-2011 / 21:48:37 / cg"
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   188
! !
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   189
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   190
!ByteCodeCompilerWithBreakpointSupport class methodsFor:'documentation'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   192
version
3520
b2b6462d8cd7 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
   193
    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompilerWithBreakpointSupport.st,v 1.11 2014-11-14 14:37:57 cg Exp $'
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   194
!
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   195
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   196
version_CVS
3520
b2b6462d8cd7 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
   197
    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompilerWithBreakpointSupport.st,v 1.11 2014-11-14 14:37:57 cg Exp $'
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   198
!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   200
version_SVN
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   201
    ^ '$ Id $'
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
! !
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   203