ByteCodeCompilerWithBreakpointSupport.st
author Claus Gittinger <cg@exept.de>
Sun, 23 Sep 2018 00:50:51 +0200
changeset 4301 8f50482edeb1
parent 4171 3f8437757dba
child 4366 9e9025f9ca1f
permissions -rw-r--r--
#FEATURE by cg class: ParserFlags class definition added: #allowPeriodAsNameSpaceSeparator #allowPeriodAsNameSpaceSeparator: comment/format in: #allowArrayIndexSyntaxExtension #allowArrayIndexSyntaxExtension: changed: #initialize class: ParserFlags class comment/format in: #allowArrayIndexSyntaxExtension #allowArrayIndexSyntaxExtension: #allowLocalVariableDeclarationWithInitializerExpression #allowLocalVariableDeclarationWithInitializerExpression: changed: #initialize
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
4171
3f8437757dba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3520
diff changeset
    14
"{ NameSpace: Smalltalk }"
3f8437757dba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3520
diff changeset
    15
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    16
ByteCodeCompiler subclass:#ByteCodeCompilerWithBreakpointSupport
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    17
	instanceVariableNames:'breakpoints'
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    18
	classVariableNames:''
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    19
	poolDictionaries:''
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    20
	category:'System-Compiler-Debugging'
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    21
!
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
!ByteCodeCompilerWithBreakpointSupport class methodsFor:'documentation'!
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
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    26
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    27
 COPYRIGHT (c) 2006 by eXept Software AG
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    28
	      All Rights Reserved
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    29
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    31
 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
    32
 inclusion of the above copyright notice.   This software may not
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    35
 hereby transferred.
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
!
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
documentation
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    40
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    41
    I'm an experimental compiler class that supports
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    42
    breakpoints. Once tested, the code will be merged
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    43
    to ByteCodeCompiler.
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    44
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    45
    [author:]
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    46
        Jan Vrany <jan.vrany@fit.cvut.cz>
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
    [instance 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
    [class variables:]
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
    [see also:]
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
"
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    55
! !
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
    56
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    57
!ByteCodeCompilerWithBreakpointSupport methodsFor:'adding breakpoint'!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    58
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    59
possiblyWrapABreakPointAround:aBlock
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    60
    "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
    61
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    62
    | expr bpnt tokenPositionBefore tokenLineNrBefore |
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    63
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    64
    tokenPositionBefore := tokenPosition ? source position.
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
    65
    tokenLineNrBefore := tokenLineNr.
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    66
3205
aaf9ba016d5b class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
    67
    "/ find the very first breakpoint, which is right after the
aaf9ba016d5b class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
    68
    "/ current line start, and remove it from the breakpoints collection,
aaf9ba016d5b class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
    69
    "/ 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
    70
    [
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    71
        breakpoints notEmpty
4171
3f8437757dba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3520
diff changeset
    72
        and:[(breakpoints first position ? 0) <= tokenPositionBefore]
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    73
    ] whileTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    74
        bpnt := breakpoints removeFirst
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    75
    ].
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    76
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    77
    expr := aBlock value.
3520
b2b6462d8cd7 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    78
    expr == #Error ifTrue:[^expr].
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    79
    bpnt isNil ifTrue:[^expr].
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    80
    expr isBreakPointNode ifTrue:[^expr].
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    81
    tokenPositionBefore = tokenPosition ifTrue:[
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    82
        "/ nothing scanned - happens with unaryExpression which does not find anything,
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    83
        "/ but returns due to a ')' or ']' token.
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    84
        ^expr
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    85
    ].
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
    86
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    87
    bpnt isReached:true.
2799
37dfd9b9d9ee changed: #possiblyWrapABreakPointAround:
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
    88
37dfd9b9d9ee changed: #possiblyWrapABreakPointAround:
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
    89
    "/ Transcript show:'adding breakpoint '; show:bpnt; show:' before: '; showCR:expr.
37dfd9b9d9ee changed: #possiblyWrapABreakPointAround:
Claus Gittinger <cg@exept.de>
parents: 2758
diff changeset
    90
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    91
    ^ BreakpointNode new
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    92
        breakpoint: bpnt;
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    93
        expression: expr;
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
    94
        lineNumber:(bpnt line ? tokenLineNrBefore);
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
    95
        yourself
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
    "Created: / 05-07-2011 / 21:11:19 / cg"
4171
3f8437757dba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3520
diff changeset
    98
    "Modified: / 25-07-2017 / 12:37:24 / stefan"
2537
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
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   101
removeMissedBreakpointsBefore:aPosition
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   102
    [
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   103
        breakpoints notEmpty
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   104
        and:[breakpoints first position < aPosition]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   105
    ] whileTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   106
        breakpoints removeFirst
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
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   109
    "Created: / 05-07-2011 / 23:13:25 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   110
! !
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   111
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   112
!ByteCodeCompilerWithBreakpointSupport methodsFor:'parsing-expressions'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   113
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   114
binaryExpression
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   115
    ^ self possiblyWrapABreakPointAround:[super binaryExpression]
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
    "Created: / 05-07-2011 / 23:08:43 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   118
!
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
binaryExpressionFor:aReceiver
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   121
    ^ self possiblyWrapABreakPointAround:[super binaryExpressionFor:aReceiver]
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
    "Created: / 05-07-2011 / 21:10:53 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   124
!
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
block
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   127
    |blockNode|
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   128
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   129
    self removeMissedBreakpointsBefore:source position.
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   130
    blockNode := super block.
3517
b71d7aeb8c41 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   131
    blockNode ~~ #Error ifTrue:[
b71d7aeb8c41 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   132
        self removeMissedBreakpointsBefore:blockNode endPosition+2.
b71d7aeb8c41 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3426
diff changeset
   133
    ].
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   134
    ^ blockNode
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   135
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   136
    "Created: / 05-07-2011 / 22:56:19 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   137
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   138
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   139
expression
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   140
    ^ self possiblyWrapABreakPointAround:[super expression]
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   141
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   142
    "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
   143
    "Modified: / 05-07-2011 / 21:11:38 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   144
!
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   145
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   146
primary
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   147
    ^ self possiblyWrapABreakPointAround:[super primary]
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   148
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   149
    "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
   150
    "Modified: / 05-07-2011 / 21:11:38 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   151
    "Created: / 05-07-2011 / 23:05:23 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   152
!
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
unaryExpression
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   155
    ^ self possiblyWrapABreakPointAround:[super unaryExpression]
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
    "Created: / 05-07-2011 / 23:08:54 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   158
!
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
unaryExpressionFor:aReceiver
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   161
    ^ self possiblyWrapABreakPointAround:[super unaryExpressionFor:aReceiver]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   162
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   163
    "Created: / 05-07-2011 / 21:15:30 / cg"
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   164
! !
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   165
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   166
!ByteCodeCompilerWithBreakpointSupport methodsFor:'private'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   167
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   168
breakpoints:aCollection
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   169
    breakpoints := aCollection copy sort:[:a :b|a position < b position].
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   170
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   171
    "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
   172
    "Created: / 05-07-2011 / 21:37:28 / cg"
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   173
!
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   174
3225
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   175
methodClass
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   176
    ^ methodClass ? MethodWithBreakpoints
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   177
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   178
    "Created: / 22-07-2013 / 15:54:19 / cg"
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   179
!
57126b848598 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3205
diff changeset
   180
2537
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   181
notifying: anObject
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   182
    super notifying: anObject.
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   183
    anObject notNil ifTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   184
        breakpoints isNil ifTrue:[
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   185
            self breakpoints:(anObject perform: #breakpoints ifNotUnderstood:#()).
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   186
        ]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   187
    ]
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   188
72fde5f496de fixes to make testSuite pass
Claus Gittinger <cg@exept.de>
parents: 2498
diff changeset
   189
    "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
   190
    "Modified: / 05-07-2011 / 21:48:37 / cg"
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   191
! !
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   192
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   193
!ByteCodeCompilerWithBreakpointSupport class methodsFor:'documentation'!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   194
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   195
version
4171
3f8437757dba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3520
diff changeset
   196
    ^ '$Header$'
3199
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   197
!
0c12b1eefc58 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 3198
diff changeset
   198
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   199
version_CVS
4171
3f8437757dba #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 3520
diff changeset
   200
    ^ '$Header$'
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   201
!
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   202
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   203
version_SVN
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   204
    ^ '$ Id $'
2498
43bfd25f2552 Initial checkin
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff changeset
   205
! !
3198
47a691bea790 class: ByteCodeCompilerWithBreakpointSupport
Claus Gittinger <cg@exept.de>
parents: 2799
diff changeset
   206