author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 15 Jul 2018 18:18:34 +0200 | |
branch | jv |
changeset 4384 | aee25576d864 |
parent 3841 | a22f33410bdf |
child 4385 | 16741aa9dc2e |
permissions | -rw-r--r-- |
2573
b91533c88862
- nodes are no longer shared
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2015
diff
changeset
|
1 |
"{ Package: 'stx:libcomp' }"! |
2015 | 2 |
|
4384
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
3 |
!Block methodsFor:'accessing'! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
4 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
5 |
dbgVariableTableBlock |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
6 |
"Return a variable table block describing variables of |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
7 |
this method (including those of inlined blocks)." |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
8 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
9 |
| varTable | |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
10 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
11 |
varTable := self homeMethod dbgVariableTable. |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
12 |
^ varTable lookupBlock:sourcePos. |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
13 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
14 |
"Created: / 15-07-2018 / 11:54:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
15 |
"Modified (comment): / 15-07-2018 / 17:12:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
16 |
! ! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
17 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
18 |
!Context methodsFor:'accessing'! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
19 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
20 |
dbgVariableTableBlock |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
21 |
"Returns a table describing variables of this context (as `DIVariableBlock`)" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
22 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
23 |
^ method dbgVariableTableBlock |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
24 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
25 |
"Created: / 15-07-2018 / 11:52:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
26 |
"Modified: / 15-07-2018 / 16:09:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
27 |
! ! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
28 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
29 |
!Method methodsFor:'accessing'! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
30 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
31 |
dbgInfo |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
32 |
"Returns debug info for this method or `nil` if not debug info |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
33 |
available." |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
34 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
35 |
| l | |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
36 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
37 |
l := self at: 1. |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
38 |
^ l isByteArray ifTrue:[ DIInfo decode: l readStream ] ifFalse:[ nil ]. |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
39 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
40 |
" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
41 |
(Smalltalk class >> #loadPackage:asAutoloaded:) dbgInfo |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
42 |
" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
43 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
44 |
"Created: / 10-07-2018 / 13:11:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
45 |
"Modified (comment): / 15-07-2018 / 17:10:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
46 |
! ! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
47 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
48 |
!Method methodsFor:'accessing'! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
49 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
50 |
dbgVariableTable |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
51 |
^ self dbgInfo dbgVariableTable |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
52 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
53 |
"Created: / 15-07-2018 / 11:52:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
54 |
! ! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
55 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
56 |
!Method methodsFor:'accessing'! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
57 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
58 |
dbgVariableTableBlock |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
59 |
"Return a variable table block describing variables of |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
60 |
this method (including those of inlined blocks)." |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
61 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
62 |
| varTable | |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
63 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
64 |
varTable := self dbgVariableTable. |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
65 |
^ varTable lookupBlock:0. |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
66 |
|
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
67 |
"Created: / 15-07-2018 / 11:53:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
68 |
"Modified (comment): / 15-07-2018 / 17:12:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
69 |
! ! |
aee25576d864
DBG: teach `ByteCodeCompiler` to generate Smalltalk/X debug info
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3841
diff
changeset
|
70 |
|
2015 | 71 |
!Object methodsFor:'user interaction & notifications'! |
72 |
||
73 |
notifyTodo:msg position:position |
|
74 |
className:className selector:selector |
|
75 |
severity:severityOrSeveritySymbol priority:priorityOrPrioritySymbol |
|
76 |
equalityParameter:equalityParameter checkAction:checkAction |
|
77 |
||
78 |
"this is a message from the compiler system, to allow for a hook to remember |
|
79 |
things to do. Can aslo used by other subsystems to add entries to the toDoList" |
|
80 |
||
81 |
(Tools::CompilerWarningToDoListEntry notNil |
|
82 |
and:[Tools::CompilerWarningToDoListEntry isLoaded]) ifFalse:[^ self ]. |
|
83 |
||
84 |
Tools::CompilerWarningToDoListEntry |
|
85 |
notifyTodo:msg position:position |
|
86 |
className:className selector:selector |
|
87 |
severity:severityOrSeveritySymbol priority:priorityOrPrioritySymbol |
|
88 |
equalityParameter:equalityParameter checkAction:checkAction |
|
89 |
||
90 |
"Modified: / 15-03-2007 / 20:29:23 / cg" |
|
91 |
! ! |
|
92 |
||
2573
b91533c88862
- nodes are no longer shared
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2015
diff
changeset
|
93 |
!stx_libcomp class methodsFor:'documentation'! |
b91533c88862
- nodes are no longer shared
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2015
diff
changeset
|
94 |
|
3841 | 95 |
extensionsVersion_HG |
96 |
||
97 |
^ '$Changeset: <not expanded> $' |
|
3114
1cd94f2790f1
Some more support for new breakpoints.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2582
diff
changeset
|
98 |
! ! |