Debian Codegraph @

memorytracepane.cpp

raw symbols SCIP
1 // File: memorytracepane.cppcxx . . $ `<file>/memorytracepane.cpp`/
2 /*
3 Pep8-1 is a virtual machine for writing machine language and assembly
4 language programs.
5
6 Copyright (C) 2009 J. Stanley Warford, Pepperdine University
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21 #include <QFontDialog>
22 #include <QRgb>
23 #include "memorytracepane.h"cxx . . $ `<file>/memorytracepane.h`/
24 #include "ui_memorytracepane.h"cxx . . $ `<file>/ui_memorytracepane.h`/
25 #include "pep.h"cxx . . $ `<file>/pep.h`/
26 #include "sim.h"cxx . . $ `<file>/sim.h`/
27 #include "asm.h"cxx . . $ `<file>/asm.h`/
28
29 #include <QMessageBox>
30 #include <QDebug>
31
32 MemoryTracePanecxx . . $ MemoryTracePane#::MemoryTracePanecxx . . $ MemoryTracePane#MemoryTracePane(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent) :
33 QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent),
34 uicxx . . $ MemoryTracePane#ui.(new Uicxx . . $ Ui/::MemoryTracePanecxx . . $ Ui/MemoryTracePane#)
35 {
36 uicxx . . $ MemoryTracePane#ui.->setupUicxx . . $ Ui_MemoryTracePane#setupUi(108f35f7aa7f3cf9).(this);
37
38 uicxx . . $ MemoryTracePane#ui.->labelcxx . . $ Ui_MemoryTracePane#label.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(7ae16150a604556).(Pepcxx . . $ Pep#::labelFontcxx . . $ Pep#labelFont., Pepcxx . . $ Pep#::labelFontSizecxx . . $ Pep#labelFontSize.));
39 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(QFontcxx . . $ QFont#QFont(7ae16150a604556).(Pepcxx . . $ Pep#::codeFontcxx . . $ Pep#codeFont., Pepcxx . . $ Pep#::codeFontSizecxx . . $ Pep#codeFontSize.));
40
41 connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ MemoryTracePane#ui.->spinBoxcxx . . $ Ui_MemoryTracePane#spinBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(valueChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(zoomFactorChanged(int)));
42
43 scenecxx . . $ MemoryTracePane#scene. = new QGraphicsScenecxx . . $ QGraphicsScene#(this);
44 }
45
46 MemoryTracePanecxx . . $ MemoryTracePane#::~cxx . . $ MemoryTracePane#`~MemoryTracePane`(ced63f7c635d850d).MemoryTracePanecxx . . $ MemoryTracePane#()
47 {
48 delete uicxx . . $ MemoryTracePane#ui.;
49 }
50
51 void MemoryTracePanecxx . . $ MemoryTracePane#::setMemoryTracecxx . . $ MemoryTracePane#setMemoryTrace(49f6e7a06ebc5aa8).()
52 {
53 globalVarscxx . . $ MemoryTracePane#globalVars..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
54 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
55 heapcxx . . $ MemoryTracePane#heap..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
56 isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
57 isHeapItemAddedStackcxx . . $ MemoryTracePane#isHeapItemAddedStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
58 isStackFrameAddedStackcxx . . $ MemoryTracePane#isStackFrameAddedStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
59 isHeapFrameAddedStackcxx . . $ MemoryTracePane#isHeapFrameAddedStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
60 stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
61 modifiedBytescxx . . $ MemoryTracePane#modifiedBytes..clearcxx . . $ QSet#clear(49f6e7a06ebc5aa8).();
62 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
63 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
64 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
65 addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..clearcxx . . $ QMap#clear(49f6e7a06ebc5aa8).();
66 numCellsInStackFramecxx . . $ MemoryTracePane#numCellsInStackFrame..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
67 graphicItemsInStackFramecxx . . $ MemoryTracePane#graphicItemsInStackFrame..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
68 heapFrameItemStackcxx . . $ MemoryTracePane#heapFrameItemStack..clearcxx . . $ QVector#clear(49f6e7a06ebc5aa8).();
69 newestHeapItemsListcxx . . $ MemoryTracePane#newestHeapItemsList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
70 scenecxx . . $ MemoryTracePane#scene.->clearcxx . . $ QGraphicsScene#clear(49f6e7a06ebc5aa8).();
71
72 if (Pepcxx . . $ Pep#::traceTagWarningcxx . . $ Pep#traceTagWarning.) {
73 hidecxx . . $ QWidget#hide(49f6e7a06ebc5aa8).();
74 return;
75 }
76
77 stackLocationcxx . . $ MemoryTracePane#stackLocation. =cxx . . $ QPointF#`operator=`(6b56849cfae83b80). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(200, 0);
78 globalLocationcxx . . $ MemoryTracePane#globalLocation. =cxx . . $ QPointF#`operator=`(6b56849cfae83b80). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(0, 0);
79 heapLocationcxx . . $ MemoryTracePane#heapLocation. =cxx . . $ QPointF#`operator=`(6b56849cfae83b80). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(400, 0 - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
80 QStringcxx . . $ QString# blockSymbolcxx . . $ QString#QString(ced63f7c635d850d).;
81 int multiplier;
82
83 // Globals:
84 for (int i = 0; i < Pepcxx . . $ Pep#::blockSymbolscxx . . $ Pep#blockSymbols..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
85 blockSymbol =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). Pepcxx . . $ Pep#::blockSymbolscxx . . $ Pep#blockSymbols..atcxx . . $ QList#at(e2681f9bb6b2f357).(i);
86 multiplier = Pepcxx . . $ Pep#::symbolFormatMultipliercxx . . $ Pep#symbolFormatMultiplier..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol);
87 int address = Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol);
88 if (Pepcxx . . $ Pep#::globalStructSymbolscxx . . $ Pep#globalStructSymbols..containscxx . . $ QMap#contains(8877ebe272b9620d).(blockSymbol)) {
89 int offset = 0;
90 int bytesPerCell;
91 QStringcxx . . $ QString# structField = ""cxx . . $ QString#QString(85c52e162fed56f9).;
92 for (int j = 0; j < Pepcxx . . $ Pep#::globalStructSymbolscxx . . $ Pep#globalStructSymbols..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol).sizecxx . . $ QList#size(ea6fe5115c70a13f).(); j++) {
93 structField =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). Pepcxx . . $ Pep#::globalStructSymbolscxx . . $ Pep#globalStructSymbols..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol).atcxx . . $ QList#at(e2681f9bb6b2f357).(j);
94 bytesPerCell = Simcxx . . $ Sim#::cellSizecxx . . $ Sim#cellSize(10342dda07a560ad).(Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(structField));
95 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(address + offset,
96 QStringcxx . . $ QString#QString(85c52e162fed56f9).("%1.%2").argcxx . . $ QString#arg(bc823072288cbbb5).(blockSymbol).argcxx . . $ QString#arg(bc823072288cbbb5).(structField),
97 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(structField),
98 static_cast<int>(globalLocationcxx . . $ MemoryTracePane#globalLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()),
99 static_cast<int>(globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
100 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
101 globalLocationcxx . . $ MemoryTracePane#globalLocation. =cxx . . $ QPointF#`operator=`(6b56849cfae83b80). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(globalLocationcxx . . $ MemoryTracePane#globalLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).(), globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() + MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
102 globalVarscxx . . $ MemoryTracePane#globalVars..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
103 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(address + offset, item);
104 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(item);
105 offset += bytesPerCell;
106 }
107 }
108 else {
109 if (multiplier == 1) {
110 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(address,
111 blockSymbolcxx . . $ QString#QString(132dd6869045752b).,
112 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol),
113 static_cast<int>(globalLocationcxx . . $ MemoryTracePane#globalLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()),
114 static_cast<int>(globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
115 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
116 globalLocationcxx . . $ MemoryTracePane#globalLocation. =cxx . . $ QPointF#`operator=`(6b56849cfae83b80). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(globalLocationcxx . . $ MemoryTracePane#globalLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).(), globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() + MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
117 globalVarscxx . . $ MemoryTracePane#globalVars..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
118 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(address, item);
119 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(item);
120 }
121 else { // Array
122 int offset = 0;
123 int bytesPerCell = Simcxx . . $ Sim#::cellSizecxx . . $ Sim#cellSize(10342dda07a560ad).(Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol));
124 for (int j = 0; j < multiplier; j++) {
125 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(address + offset,
126 blockSymbol +cxx . . $ operator+(fab9b4f80031f353). QStringcxx . . $ QString#QString(85c52e162fed56f9).("[%1]").argcxx . . $ QString#arg(64ab2ed17cc11715).(j),
127 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(blockSymbol),
128 static_cast<int>(globalLocationcxx . . $ MemoryTracePane#globalLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()),
129 static_cast<int>(globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
130 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
131 globalLocationcxx . . $ MemoryTracePane#globalLocation. =cxx . . $ QPointF#`operator=`(6b56849cfae83b80). QPointFcxx . . $ QPointF#QPointF(bc12c9ec15586e6a).(globalLocationcxx . . $ MemoryTracePane#globalLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).(), globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() + MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
132 globalVarscxx . . $ MemoryTracePane#globalVars..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
133 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(address + offset, item);
134 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(item);
135 offset += bytesPerCell;
136 }
137 }
138 }
139 }
140
141 // Stack frame:
142 stackLocationcxx . . $ MemoryTracePane#stackLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).());
143 scenecxx . . $ MemoryTracePane#scene.->addLinecxx . . $ QGraphicsScene#addLine(4dda49b0777a2130).(stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. * 0.2, stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).(),
144 stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).() + MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. * 1.2, stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).(),
145 QPencxx . . $ QPen#QPen(c1f9b1cc0228302b).(QBrushcxx . . $ QBrush#QBrush(15c18aa000f81c3b).(Qtcxx . . $ Qt/::SolidPatterncxx . . $ Qt/SolidPattern.), 2, Qtcxx . . $ Qt/::SolidLinecxx . . $ Qt/SolidLine.));
146 int dist = static_cast<int>(MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. * 1.2 - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. * 1.4);
147 for (int i = static_cast<int>(MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. * 1.2); i > dist; i = i - 10) {
148 scenecxx . . $ MemoryTracePane#scene.->addLinecxx . . $ QGraphicsScene#addLine(4dda49b0777a2130).(stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).() + i - 10, stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() + 10,
149 stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).() + i, stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).(),
150 QPencxx . . $ QPen#QPen(c1f9b1cc0228302b).(QBrushcxx . . $ QBrush#QBrush(15c18aa000f81c3b).(Qtcxx . . $ Qt/::SolidPatterncxx . . $ Qt/SolidPattern.), 1, Qtcxx . . $ Qt/::SolidLinecxx . . $ Qt/SolidLine.));
151 }
152 stackLocationcxx . . $ MemoryTracePane#stackLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
153
154 heapLocationcxx . . $ MemoryTracePane#heapLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(globalLocationcxx . . $ MemoryTracePane#globalLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
155
156 scenecxx . . $ MemoryTracePane#scene.->setSceneRectcxx . . $ QGraphicsScene#setSceneRect(7a51d6bf5aba0926).(scenecxx . . $ MemoryTracePane#scene.->itemsBoundingRectcxx . . $ QGraphicsScene#itemsBoundingRect(19f9350443f914b1).());
157 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->setScenecxx . . $ QGraphicsView#setScene(36f1b6a6c9a93129).(scenecxx . . $ MemoryTracePane#scene.);
158
159 uicxx . . $ MemoryTracePane#ui.->warningLabelcxx . . $ Ui_MemoryTracePane#warningLabel.->clearcxx . . $ QLabel#clear(49f6e7a06ebc5aa8).();
160
161 stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..resetcxx . . $ StackFrameFSM#reset(49f6e7a06ebc5aa8).();
162 }
163
164 void MemoryTracePanecxx . . $ MemoryTracePane#::updateMemoryTracecxx . . $ MemoryTracePane#updateMemoryTrace(49f6e7a06ebc5aa8).()
165 {
166 // Color all of the cells normally (globals)
167 for (int i = 0; i < globalVarscxx . . $ MemoryTracePane#globalVars..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
168 globalVarscxx . . $ MemoryTracePane#globalVars..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.;
169 globalVarscxx . . $ MemoryTracePane#globalVars..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->boxTextColorcxx . . $ MemoryCellGraphicsItem#boxTextColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.;
170 }
171 // Color all of the cells normally (stack)
172 for (int i = 0; i < runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
173 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.;
174 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->boxTextColorcxx . . $ MemoryCellGraphicsItem#boxTextColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.;
175 }
176 // Color all of the cells normally (heap)
177 for (int i = 0; i < heapcxx . . $ MemoryTracePane#heap..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
178 heapcxx . . $ MemoryTracePane#heap..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.;
179 heapcxx . . $ MemoryTracePane#heap..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->boxTextColorcxx . . $ MemoryCellGraphicsItem#boxTextColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::blackcxx . . $ Qt/black.;
180 }
181 // Color the newest 'new' items on the heap light green
182 for (int i = 0; i < newestHeapItemsListcxx . . $ MemoryTracePane#newestHeapItemsList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
183 newestHeapItemsListcxx . . $ MemoryTracePane#newestHeapItemsList..atcxx . . $ QList#at(e2681f9bb6b2f357).(i)->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(fd1b853fb77c9003). QColorcxx . . $ QColor#QColor(2261ffe5112eab06).(72, 255, 72, 192);
184 }
185 newestHeapItemsListcxx . . $ MemoryTracePane#newestHeapItemsList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
186
187 // Add cached stack items to the scene
188 for (int i = 0; i < runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
189 if (!isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)) {
190 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i));
191 isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i] = true;
192 }
193 }
194 // Add cached stack FRAME items to the scene
195 for (int i = 0; i < isStackFrameAddedStackcxx . . $ MemoryTracePane#isStackFrameAddedStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
196 if (!isStackFrameAddedStackcxx . . $ MemoryTracePane#isStackFrameAddedStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)) {
197 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(graphicItemsInStackFramecxx . . $ MemoryTracePane#graphicItemsInStackFrame..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i));
198 isStackFrameAddedStackcxx . . $ MemoryTracePane#isStackFrameAddedStack.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i] = true;
199 }
200 }
201
202 // Add cached heap items to the scene
203 for (int i = 0; i < isHeapItemAddedStackcxx . . $ MemoryTracePane#isHeapItemAddedStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
204 if (!isHeapItemAddedStackcxx . . $ MemoryTracePane#isHeapItemAddedStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)) {
205 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(heapcxx . . $ MemoryTracePane#heap..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i));
206 isHeapItemAddedStackcxx . . $ MemoryTracePane#isHeapItemAddedStack.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i] = true;
207 }
208 }
209 for (int i = 0; i < isHeapFrameAddedStackcxx . . $ MemoryTracePane#isHeapFrameAddedStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
210 if (!isHeapFrameAddedStackcxx . . $ MemoryTracePane#isHeapFrameAddedStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)) {
211 scenecxx . . $ MemoryTracePane#scene.->addItemcxx . . $ QGraphicsScene#addItem(af50d9c5bfd58279).(heapFrameItemStackcxx . . $ MemoryTracePane#heapFrameItemStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i));
212 isHeapFrameAddedStackcxx . . $ MemoryTracePane#isHeapFrameAddedStack.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i] = true;
213 }
214 }
215
216 // Color global/stack/heap items red if they were modified last step
217 QListcxx . . $ QList#<int> modifiedBytesToBeUpdated = modifiedBytescxx . . $ MemoryTracePane#modifiedBytes..toListcxx . . $ QSet#toList(bf6c511543d55010).();
218 for (int i = 0; i < bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
219 if (addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))) {
220 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::redcxx . . $ Qt/red.;
221 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->boxTextColorcxx . . $ MemoryCellGraphicsItem#boxTextColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.;
222 }
223 if (addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))) {
224 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::redcxx . . $ Qt/red.;
225 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->boxTextColorcxx . . $ MemoryCellGraphicsItem#boxTextColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.;
226 }
227 if (addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))) {
228 addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->boxBgColorcxx . . $ MemoryCellGraphicsItem#boxBgColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::redcxx . . $ Qt/red.;
229 addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->boxTextColorcxx . . $ MemoryCellGraphicsItem#boxTextColor. =cxx . . $ QColor#`operator=`(7dc25a5504d99c29). Qtcxx . . $ Qt/::whitecxx . . $ Qt/white.;
230 }
231 }
232 // Update modified cells
233 for (int i = 0; i < modifiedBytesToBeUpdated.sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
234 if (addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(modifiedBytesToBeUpdated.atcxx . . $ QList#at(e2681f9bb6b2f357).(i))) {
235 addressToGlobalItemMapcxx . . $ MemoryTracePane#addressToGlobalItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(modifiedBytesToBeUpdated.atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
236 }
237 if (addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(modifiedBytesToBeUpdated.atcxx . . $ QList#at(e2681f9bb6b2f357).(i))) {
238 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(modifiedBytesToBeUpdated.atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
239 }
240 if (addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(modifiedBytesToBeUpdated.atcxx . . $ QList#at(e2681f9bb6b2f357).(i))) {
241 addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(modifiedBytesToBeUpdated.atcxx . . $ QList#at(e2681f9bb6b2f357).(i))->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
242 }
243 }
244
245 scenecxx . . $ MemoryTracePane#scene.->setSceneRectcxx . . $ QGraphicsScene#setSceneRect(7a51d6bf5aba0926).(scenecxx . . $ MemoryTracePane#scene.->itemsBoundingRectcxx . . $ QGraphicsScene#itemsBoundingRect(19f9350443f914b1).());
246 // This is time-consuming, but worthwhile to ensure scrollbars aren't going off into oblivion after items are removed.
247 // From the documentation for the 'itemsBoundingRect()' function:
248 // Calculates and returns the bounding rect of all items on the scene.
249 // This function works by iterating over all items, and because if this, it can be slow for large scenes.
250 // Our it is unlikely that this scene become very large (as in the 30,000 chips example), so I would expect this to remain
251 // a reasonable function call. It is also called in the 'setMemoryTrace' function, but the scene will have very few items at that point.
252
253 scenecxx . . $ MemoryTracePane#scene.->invalidatecxx . . $ QGraphicsScene#invalidate(ffbc978047f068fe).(); // redraw the scene!
254 // this is fast, so we do this for the whole scene instead of just certain boxes
255
256 // Scroll to the top item if we have a scrollbar:
257 if (!runtimeStackcxx . . $ MemoryTracePane#runtimeStack..isEmptycxx . . $ QVector#isEmpty(50ce9a9e25b4a850).() && uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->viewportcxx . . $ QAbstractScrollArea#viewport(27f420ad5cce8994).()->heightcxx . . $ QWidget#height(455f465bc33b4cdf).() < scenecxx . . $ MemoryTracePane#scene.->heightcxx . . $ QGraphicsScene#height(21b6c25e127938e2).()) {
258 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->centerOncxx . . $ QGraphicsView#centerOn(3378f77c441138b9).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..topcxx . . $ QStack#top(19b2b6f17af048b).());
259 }
260
261 // Clear modified bytes so for the next update:
262 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
263 modifiedBytescxx . . $ MemoryTracePane#modifiedBytes..clearcxx . . $ QSet#clear(49f6e7a06ebc5aa8).();
264 }
265
266 void MemoryTracePanecxx . . $ MemoryTracePane#::cacheChangescxx . . $ MemoryTracePane#cacheChanges(49f6e7a06ebc5aa8).()
267 {
268 modifiedBytescxx . . $ MemoryTracePane#modifiedBytes..unitecxx . . $ QSet#unite(ccebfa87892ac54d).(Simcxx . . $ Sim#::modifiedBytescxx . . $ Sim#modifiedBytes.);
269 if (Simcxx . . $ Sim#::tracingTrapscxx . . $ Sim#tracingTraps.) {
270 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
271 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep. =cxx . . $ QList#`operator=`(fb6690361a2f6b44). Simcxx . . $ Sim#::modifiedBytescxx . . $ Sim#modifiedBytes..toListcxx . . $ QSet#toList(bf6c511543d55010).();
272 }
273 else if (Simcxx . . $ Sim#::trappedcxx . . $ Sim#trapped.) {
274 // We delay for a single vonNeumann step so that we preserve the modified bytes until we leave the trap - this allows for
275 // recoloring of cells modified by a trap instruction.
276 delayLastStepClearcxx . . $ MemoryTracePane#delayLastStepClear. = true;
277 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..appendcxx . . $ QList#append(3d2301cfd89f773a).(Simcxx . . $ Sim#::modifiedBytescxx . . $ Sim#modifiedBytes..toListcxx . . $ QSet#toList(bf6c511543d55010).());
278 }
279 else if (delayLastStepClearcxx . . $ MemoryTracePane#delayLastStepClear.) {
280 // Phew! We can now update (in updateMemoryTrace). If we don't, no harm done - they didn't want to see what happened in the trap
281 delayLastStepClearcxx . . $ MemoryTracePane#delayLastStepClear. = false;
282 }
283 else {
284 // Clear the bytes written the step before last, and get the new list from the previous step. This is used in our update for coloring.
285 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
286 bytesWrittenLastStepcxx . . $ MemoryTracePane#bytesWrittenLastStep. =cxx . . $ QList#`operator=`(fb6690361a2f6b44). Simcxx . . $ Sim#::modifiedBytescxx . . $ Sim#modifiedBytes..toListcxx . . $ QSet#toList(bf6c511543d55010).();
287 }
288 }
289
290 void MemoryTracePanecxx . . $ MemoryTracePane#::cacheStackChangescxx . . $ MemoryTracePane#cacheStackChanges(49f6e7a06ebc5aa8).()
291 {
292 if (Simcxx . . $ Sim#::trappedcxx . . $ Sim#trapped.) {
293 return;
294 }
295
296 // Look ahead for the symbol trace list (needs to be done here because of the possibility of call (can't look behind on a call)
297 // so we just do it for them all)
298 switch (Pepcxx . . $ Pep#::decodeMnemoniccxx . . $ Pep#decodeMnemonic.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).Simcxx . . $ Sim#::readBytecxx . . $ Sim#readByte(7864480464b09eea).(Simcxx . . $ Sim#::programCountercxx . . $ Sim#programCounter.)]) {
299 case Enucxx . . $ Enu/::SUBSPcxx . . $ Enu/SUBSP.:
300 case Enucxx . . $ Enu/::CALLcxx . . $ Enu/CALL.:
301 case Enucxx . . $ Enu/::RET0cxx . . $ Enu/RET0.:
302 case Enucxx . . $ Enu/::RET1cxx . . $ Enu/RET1.:
303 case Enucxx . . $ Enu/::RET2cxx . . $ Enu/RET2.:
304 case Enucxx . . $ Enu/::RET3cxx . . $ Enu/RET3.:
305 case Enucxx . . $ Enu/::RET4cxx . . $ Enu/RET4.:
306 case Enucxx . . $ Enu/::RET5cxx . . $ Enu/RET5.:
307 case Enucxx . . $ Enu/::RET6cxx . . $ Enu/RET6.:
308 case Enucxx . . $ Enu/::RET7cxx . . $ Enu/RET7.:
309 case Enucxx . . $ Enu/::ADDSPcxx . . $ Enu/ADDSP.:
310 if (Pepcxx . . $ Pep#::symbolTraceListcxx . . $ Pep#symbolTraceList..containscxx . . $ QMap#contains(8877ebe272b9620d).(Simcxx . . $ Sim#::programCountercxx . . $ Sim#programCounter.)) {
311 lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList. =cxx . . $ QStringList#`operator=`(cb3c3d1614140851). Pepcxx . . $ Pep#::symbolTraceListcxx . . $ Pep#symbolTraceList..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(Simcxx . . $ Sim#::programCountercxx . . $ Sim#programCounter.);
312 }
313 break;
314 default:
315 break;
316 }
317 // End look ahead
318
319 int multiplier = 0;
320 int bytesPerCell = 0;
321 int offset = 0;
322 int numCellsToAdd = 0;
323 int frameSizeToAdd = 0;
324 QStringcxx . . $ QString# stackSymbolcxx . . $ QString#QString(ced63f7c635d850d).;
325
326 switch (Pepcxx . . $ Pep#::decodeMnemoniccxx . . $ Pep#decodeMnemonic.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).Simcxx . . $ Sim#::instructionSpecifiercxx . . $ Sim#instructionSpecifier.]) {
327 case Enucxx . . $ Enu/::CALLcxx . . $ Enu/CALL.:
328 {
329 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(Simcxx . . $ Sim#::stackPointercxx . . $ Sim#stackPointer., "retAddr"cxx . . $ QString#QString(85c52e162fed56f9)., Enucxx . . $ Enu/::F_2Hcxx . . $ Enu/F_2H.,
330 static_cast<int>(stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()), static_cast<int>(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
331 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
332 stackLocationcxx . . $ MemoryTracePane#stackLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
333
334 isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(false);
335 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
336 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(Simcxx . . $ Sim#::stackPointercxx . . $ Sim#stackPointer., item);
337 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(1);
338 }
339 break;
340 case Enucxx . . $ Enu/::SUBSPcxx . . $ Enu/SUBSP.:
341 {
342 for (int i = 0; i < lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
343 stackSymbol =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList..atcxx . . $ QList#at(e2681f9bb6b2f357).(i);
344 multiplier = Pepcxx . . $ Pep#::symbolFormatMultipliercxx . . $ Pep#symbolFormatMultiplier..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(stackSymbol);
345 if (multiplier == 1) {
346 offset += Simcxx . . $ Sim#::cellSizecxx . . $ Sim#cellSize(10342dda07a560ad).(Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(stackSymbol));
347 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(Simcxx . . $ Sim#::stackPointercxx . . $ Sim#stackPointer. - offset + Simcxx . . $ Sim#::operandSpecifiercxx . . $ Sim#operandSpecifier.,
348 stackSymbolcxx . . $ QString#QString(132dd6869045752b).,
349 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(stackSymbol),
350 static_cast<int>(stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()),
351 static_cast<int>(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
352 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
353 stackLocationcxx . . $ MemoryTracePane#stackLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
354 isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(false);
355 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
356 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(Simcxx . . $ Sim#::stackPointercxx . . $ Sim#stackPointer. - offset + Simcxx . . $ Sim#::operandSpecifiercxx . . $ Sim#operandSpecifier., item);
357 numCellsToAdd++;
358 }
359 else { // This is an array!
360 bytesPerCell = Simcxx . . $ Sim#::cellSizecxx . . $ Sim#cellSize(10342dda07a560ad).(Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(stackSymbol));
361 for (int j = multiplier - 1; j >= 0; j--) {
362 offset += bytesPerCell;
363 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(Simcxx . . $ Sim#::stackPointercxx . . $ Sim#stackPointer. - offset + Simcxx . . $ Sim#::operandSpecifiercxx . . $ Sim#operandSpecifier.,
364 stackSymbol +cxx . . $ operator+(fab9b4f80031f353). QStringcxx . . $ QString#QString(85c52e162fed56f9).("[%1]").argcxx . . $ QString#arg(64ab2ed17cc11715).(j),
365 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(stackSymbol),
366 static_cast<int>(stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()),
367 static_cast<int>(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
368 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
369 stackLocationcxx . . $ MemoryTracePane#stackLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
370 isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(false);
371 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
372 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(Simcxx . . $ Sim#::stackPointercxx . . $ Sim#stackPointer. - offset + Simcxx . . $ Sim#::operandSpecifiercxx . . $ Sim#operandSpecifier., item);
373 numCellsToAdd++;
374 }
375 }
376 }
377 // qDebug() << "numCellsToAdd before makeTransition in ADDSP: " << numCellsToAdd;
378 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(numCellsToAdd);
379 }
380 break;
381 case Enucxx . . $ Enu/::RET0cxx . . $ Enu/RET0.:
382 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(2);
383 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0); // makeTransition(0) -> 0 bytes to add to the stack frame FSM.
384 break;
385 case Enucxx . . $ Enu/::RET1cxx . . $ Enu/RET1.:
386 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(3);
387 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
388 break;
389 case Enucxx . . $ Enu/::RET2cxx . . $ Enu/RET2.:
390 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(4);
391 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
392 break;
393 case Enucxx . . $ Enu/::RET3cxx . . $ Enu/RET3.:
394 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(5);
395 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
396 break;
397 case Enucxx . . $ Enu/::RET4cxx . . $ Enu/RET4.:
398 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(6);
399 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
400 break;
401 case Enucxx . . $ Enu/::RET5cxx . . $ Enu/RET5.:
402 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(7);
403 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
404 break;
405 case Enucxx . . $ Enu/::RET6cxx . . $ Enu/RET6.:
406 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(8);
407 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
408 break;
409 case Enucxx . . $ Enu/::RET7cxx . . $ Enu/RET7.:
410 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(9);
411 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
412 break;
413 case Enucxx . . $ Enu/::ADDSPcxx . . $ Enu/ADDSP.:
414 popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(Simcxx . . $ Sim#::operandSpecifiercxx . . $ Sim#operandSpecifier.);
415 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
416 break;
417 default:
418 frameSizeToAdd = stackFrameFSMcxx . . $ MemoryTracePane#stackFrameFSM..makeTransitioncxx . . $ StackFrameFSM#makeTransition(7864480464b09eea).(0);
419 break;
420 }
421
422 if (frameSizeToAdd != 0) {
423 addStackFramecxx . . $ MemoryTracePane#addStackFrame(d4f767463ce0a6b3).(frameSizeToAdd);
424 // This map is used to correlate the top of the stack frame with the frame itself,
425 // useful for determining when the frame should dissapear.
426 // IE: The top byte of the frame gets removed, so does the frame
427 stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).() - 1, graphicItemsInStackFramecxx . . $ MemoryTracePane#graphicItemsInStackFrame..topcxx . . $ QStack#top(19b2b6f17af048b).());
428 }
429 }
430
431 void MemoryTracePanecxx . . $ MemoryTracePane#::cacheHeapChangescxx . . $ MemoryTracePane#cacheHeapChanges(49f6e7a06ebc5aa8).()
432 {
433 if (Simcxx . . $ Sim#::trappedcxx . . $ Sim#trapped.) {
434 return;
435 }
436 if (uicxx . . $ MemoryTracePane#ui.->warningLabelcxx . . $ Ui_MemoryTracePane#warningLabel.->textcxx . . $ QLabel#text(6ef7b6c27b00b43d).() !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") {
437 uicxx . . $ MemoryTracePane#ui.->warningLabelcxx . . $ Ui_MemoryTracePane#warningLabel.->clearcxx . . $ QLabel#clear(49f6e7a06ebc5aa8).();
438 }
439
440 if (Pepcxx . . $ Pep#::decodeMnemoniccxx . . $ Pep#decodeMnemonic.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).Simcxx . . $ Sim#::instructionSpecifiercxx . . $ Sim#instructionSpecifier.] == Enucxx . . $ Enu/::CALLcxx . . $ Enu/CALL. && Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..valuecxx . . $ QMap#value(866b0a4e5fb46e14).("new"cxx . . $ QString#QString(85c52e162fed56f9).) == Simcxx . . $ Sim#::operandSpecifiercxx . . $ Sim#operandSpecifier.) {
441 newestHeapItemsListcxx . . $ MemoryTracePane#newestHeapItemsList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).();
442 int numCellsToAdd = 0;
443 int offset = 0;
444 int multiplier;
445 QStringcxx . . $ QString# heapSymbolcxx . . $ QString#QString(ced63f7c635d850d).;
446 int heapPointer;
447 if (Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..containscxx . . $ QMap#contains(8877ebe272b9620d).("hpPtr"cxx . . $ QString#QString(85c52e162fed56f9).)) {
448 heapPointer = Pepcxx . . $ Pep#::symbolTablecxx . . $ Pep#symbolTable..valuecxx . . $ QMap#value(866b0a4e5fb46e14).("hpPtr"cxx . . $ QString#QString(85c52e162fed56f9).);
449 }
450 else {
451 // We have no idea where the heap pointer is. Error!
452 uicxx . . $ MemoryTracePane#ui.->warningLabelcxx . . $ Ui_MemoryTracePane#warningLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Warning: hpPtr not found, unable to trace <code>CALL \'new\'</code>."cxx . . $ QString#QString(85c52e162fed56f9).);
453 return;
454 }
455 int listNumBytes = 0;
456 // Check and make sure the accumulator matches the number of bytes we're newing:
457 // We'll start by adding up the number of bytes...
458 for (int i = 0; i < lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
459 heapSymbol =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList..atcxx . . $ QList#at(e2681f9bb6b2f357).(i);
460 if (Pepcxx . . $ Pep#::equateSymbolscxx . . $ Pep#equateSymbols..containscxx . . $ QStringList#contains(8cce4688c16f48f3).(heapSymbol) || Pepcxx . . $ Pep#::blockSymbolscxx . . $ Pep#blockSymbols..containscxx . . $ QStringList#contains(8cce4688c16f48f3).(heapSymbol)) {
461 // listNumBytes += number of bytes for that tag * the multiplier (IE, 2d4a is a 4 cell
462 // array of 2 byte decimals, where 2 is the multiplier and 4 is the number of cells.
463 // Note: the multiplier should always be 1 for new'd cells, but that's checked below, where we'll give a more specific error.
464 listNumBytes += Asmcxx . . $ Asm#::tagNumBytescxx . . $ Asm#tagNumBytes(10342dda07a560ad).(Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(heapSymbol)) * Pepcxx . . $ Pep#::symbolFormatMultipliercxx . . $ Pep#symbolFormatMultiplier..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(heapSymbol);
465 }
466 }
467 if (listNumBytes != Simcxx . . $ Sim#::accumulatorcxx . . $ Sim#accumulator.) {
468 uicxx . . $ MemoryTracePane#ui.->warningLabelcxx . . $ Ui_MemoryTracePane#warningLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Warning: The accumulator doesn't match the number of bytes in the trace tags"cxx . . $ QString#QString(85c52e162fed56f9).);
469 return;
470 }
471 for (int i = 0; i < lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList..sizecxx . . $ QList#size(ea6fe5115c70a13f).(); i++) {
472 heapSymbol =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). lookAheadSymbolListcxx . . $ MemoryTracePane#lookAheadSymbolList..atcxx . . $ QList#at(e2681f9bb6b2f357).(i);
473 if (Pepcxx . . $ Pep#::equateSymbolscxx . . $ Pep#equateSymbols..containscxx . . $ QStringList#contains(8cce4688c16f48f3).(heapSymbol) || Pepcxx . . $ Pep#::blockSymbolscxx . . $ Pep#blockSymbols..containscxx . . $ QStringList#contains(8cce4688c16f48f3).(heapSymbol)) {
474 multiplier = Pepcxx . . $ Pep#::symbolFormatMultipliercxx . . $ Pep#symbolFormatMultiplier..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(heapSymbol);
475 }
476 else {
477 uicxx . . $ MemoryTracePane#ui.->warningLabelcxx . . $ Ui_MemoryTracePane#warningLabel.->setTextcxx . . $ QLabel#setText(3520e46b33348bf6).("Warning: Symbol \"" +cxx . . $ operator+(c75c3ae4eb9af1a8). heapSymbol +cxx . . $ operator+(3d22f08efddf8107). "\" not found in .equates, unknown size.");
478 return;
479 }
480 if (multiplier == 1) { // We can't support arrays on the stack with our current addressing modes.
481 // Very good! Have a cookie. Then, work! *cracks whip* (All our prereqs have been met to make an item)
482 moveHeapUpOneCellcxx . . $ MemoryTracePane#moveHeapUpOneCell(49f6e7a06ebc5aa8).();
483 MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem# *item = new MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#(Simcxx . . $ Sim#::readWordcxx . . $ Sim#readWord(7864480464b09eea).(heapPointer) + offset,
484 heapSymbolcxx . . $ QString#QString(132dd6869045752b).,
485 Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(heapSymbol),
486 static_cast<int>(heapLocationcxx . . $ MemoryTracePane#heapLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).()),
487 static_cast<int>(heapLocationcxx . . $ MemoryTracePane#heapLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).()));
488 item->updateValuecxx . . $ MemoryCellGraphicsItem#updateValue(49f6e7a06ebc5aa8).();
489 isHeapItemAddedStackcxx . . $ MemoryTracePane#isHeapItemAddedStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(false);
490 heapcxx . . $ MemoryTracePane#heap..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
491 addressToHeapItemMapcxx . . $ MemoryTracePane#addressToHeapItemMap..insertcxx . . $ QMap#insert(929a1ed410fe8423).(Simcxx . . $ Sim#::readWordcxx . . $ Sim#readWord(7864480464b09eea).(heapPointer) + offset, item);
492 newestHeapItemsListcxx . . $ MemoryTracePane#newestHeapItemsList..appendcxx . . $ QList#append(77d9f17553126ecb).(item);
493 offset += Simcxx . . $ Sim#::cellSizecxx . . $ Sim#cellSize(10342dda07a560ad).(Pepcxx . . $ Pep#::symbolFormatcxx . . $ Pep#symbolFormat..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(heapSymbol));
494 numCellsToAdd++;
495 }
496 }
497 if (numCellsToAdd != 0) {
498 addHeapFramecxx . . $ MemoryTracePane#addHeapFrame(d4f767463ce0a6b3).(numCellsToAdd);
499 }
500 }
501 }
502
503 void MemoryTracePanecxx . . $ MemoryTracePane#::highlightOnFocuscxx . . $ MemoryTracePane#highlightOnFocus(49f6e7a06ebc5aa8).()
504 {
505 if (uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).() || uicxx . . $ MemoryTracePane#ui.->spinBoxcxx . . $ Ui_MemoryTracePane#spinBox.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).()) {
506 uicxx . . $ MemoryTracePane#ui.->labelcxx . . $ Ui_MemoryTracePane#label.->setAutoFillBackgroundcxx . . $ QWidget#setAutoFillBackground(b45ddcbc8423892c).(true);
507 }
508 else {
509 uicxx . . $ MemoryTracePane#ui.->labelcxx . . $ Ui_MemoryTracePane#label.->setAutoFillBackgroundcxx . . $ QWidget#setAutoFillBackground(b45ddcbc8423892c).(false);
510 }
511 }
512
513 bool MemoryTracePanecxx . . $ MemoryTracePane#::hasFocuscxx . . $ MemoryTracePane#hasFocus(c9857a73d68e59ba).()
514 {
515 return uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).() || uicxx . . $ MemoryTracePane#ui.->spinBoxcxx . . $ Ui_MemoryTracePane#spinBox.->hasFocuscxx . . $ QWidget#hasFocus(50ce9a9e25b4a850).();
516 }
517
518 void MemoryTracePanecxx . . $ MemoryTracePane#::setFocuscxx . . $ MemoryTracePane#setFocus(49f6e7a06ebc5aa8).()
519 {
520 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).();
521 }
522
523 void MemoryTracePanecxx . . $ MemoryTracePane#::onFontChangedcxx . . $ MemoryTracePane#onFontChanged(19c44da831d1de49).(QFontcxx . . $ QFont# font)
524 {
525 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->setFontcxx . . $ QWidget#setFont(d0a4bd0c8524b912).(font);
526 }
527
528 void MemoryTracePanecxx . . $ MemoryTracePane#::addStackFramecxx . . $ MemoryTracePane#addStackFrame(d4f767463ce0a6b3).(int numCells)
529 {
530 QPencxx . . $ QPen# pencxx . . $ QPen#QPen(129a55e114526ad3).(Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.);
531 pen.setWidthcxx . . $ QPen#setWidth(d4f767463ce0a6b3).(4);
532 QGraphicsRectItemcxx . . $ QGraphicsRectItem# *item = new QGraphicsRectItemcxx . . $ QGraphicsRectItem#QGraphicsRectItem(3256263a0ac8e492).(stackLocationcxx . . $ MemoryTracePane#stackLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).() - 2, stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() + MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.,
533 static_cast<qrealcxx . . $ qreal#>(MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. + 4),
534 static_cast<qrealcxx . . $ qreal#>(MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight. * numCells), 0);
535 item->setPencxx . . $ QAbstractGraphicsShapeItem#setPen(af0a25dfda3214db).(pen);
536 graphicItemsInStackFramecxx . . $ MemoryTracePane#graphicItemsInStackFrame..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
537 isStackFrameAddedStackcxx . . $ MemoryTracePane#isStackFrameAddedStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(false);
538 item->setZValuecxx . . $ QGraphicsItem#setZValue(ba8836b59fb42830).(1.0); // This moves the stack frame to the front
539 numCellsInStackFramecxx . . $ MemoryTracePane#numCellsInStackFrame..pushcxx . . $ QStack#push(77d9f17553126ecb).(numCells);
540 }
541
542 void MemoryTracePanecxx . . $ MemoryTracePane#::addHeapFramecxx . . $ MemoryTracePane#addHeapFrame(d4f767463ce0a6b3).(int numCells)
543 {
544 QPencxx . . $ QPen# pencxx . . $ QPen#QPen(129a55e114526ad3).(Qtcxx . . $ QColor#QColor(408ec4d5924bfb00).::blackcxx . . $ Qt/black.);
545 pen.setWidthcxx . . $ QPen#setWidth(d4f767463ce0a6b3).(4);
546 QGraphicsRectItemcxx . . $ QGraphicsRectItem# *item = new QGraphicsRectItemcxx . . $ QGraphicsRectItem#QGraphicsRectItem(3256263a0ac8e492).(heapLocationcxx . . $ MemoryTracePane#heapLocation..xcxx . . $ QPointF#x(21b6c25e127938e2).() - 2,
547 heapLocationcxx . . $ MemoryTracePane#heapLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight. * (numCells - 1),
548 static_cast<qrealcxx . . $ qreal#>(MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxWidthcxx . . $ MemoryCellGraphicsItem#boxWidth. + 4),
549 static_cast<qrealcxx . . $ qreal#>(MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight. * numCells), 0);
550 item->setPencxx . . $ QAbstractGraphicsShapeItem#setPen(af0a25dfda3214db).(pen);
551 heapFrameItemStackcxx . . $ MemoryTracePane#heapFrameItemStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(item);
552 isHeapFrameAddedStackcxx . . $ MemoryTracePane#isHeapFrameAddedStack..pushcxx . . $ QStack#push(77d9f17553126ecb).(false);
553 item->setZValuecxx . . $ QGraphicsItem#setZValue(ba8836b59fb42830).(1.0); // This moves the heap frame to the front
554 }
555
556 void MemoryTracePanecxx . . $ MemoryTracePane#::moveHeapUpOneCellcxx . . $ MemoryTracePane#moveHeapUpOneCell(49f6e7a06ebc5aa8).()
557 {
558 for (int i = 0; i < heapcxx . . $ MemoryTracePane#heap..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
559 heapcxx . . $ MemoryTracePane#heap..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->moveBycxx . . $ QGraphicsItem#moveBy(bc12c9ec15586e6a).(0, 0 - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
560 }
561 for (int i = 0; i < heapFrameItemStackcxx . . $ MemoryTracePane#heapFrameItemStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); i++) {
562 heapFrameItemStackcxx . . $ MemoryTracePane#heapFrameItemStack..atcxx . . $ QVector#at(e2681f9bb6b2f357).(i)->moveBycxx . . $ QGraphicsItem#moveBy(bc12c9ec15586e6a).(0, 0 - MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
563 }
564 }
565
566 void MemoryTracePanecxx . . $ MemoryTracePane#::popBytescxx . . $ MemoryTracePane#popBytes(d4f767463ce0a6b3).(int bytesToPop)
567 {
568 while (bytesToPop > 0 && !runtimeStackcxx . . $ MemoryTracePane#runtimeStack..isEmptycxx . . $ QVector#isEmpty(50ce9a9e25b4a850).()) {
569 if (stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..containscxx . . $ QMap#contains(8877ebe272b9620d).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).() - 1)) {
570 if (stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).() - 1)->scenecxx . . $ QGraphicsItem#scene(f7f3e4948c86db3d).() == scenecxx . . $ MemoryTracePane#scene.) {
571 scenecxx . . $ MemoryTracePane#scene.->removeItemcxx . . $ QGraphicsScene#removeItem(af50d9c5bfd58279).(stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).() - 1));
572 }
573 delete stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..valuecxx . . $ QMap#value(866b0a4e5fb46e14).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).() - 1);
574 graphicItemsInStackFramecxx . . $ MemoryTracePane#graphicItemsInStackFrame..popcxx . . $ QStack#pop(5f357b03ed472e5e).();
575 stackHeightToStackFrameMapcxx . . $ MemoryTracePane#stackHeightToStackFrameMap..removecxx . . $ QMap#remove(dd8e59d271e40448).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..sizecxx . . $ QVector#size(455f465bc33b4cdf).() - 1);
576 isStackFrameAddedStackcxx . . $ MemoryTracePane#isStackFrameAddedStack..popcxx . . $ QStack#pop(5f357b03ed472e5e).();
577 numCellsInStackFramecxx . . $ MemoryTracePane#numCellsInStackFrame..popcxx . . $ QStack#pop(5f357b03ed472e5e).();
578 }
579
580 if (runtimeStackcxx . . $ MemoryTracePane#runtimeStack..topcxx . . $ QStack#top(19b2b6f17af048b).()->scenecxx . . $ QGraphicsItem#scene(f7f3e4948c86db3d).() == scenecxx . . $ MemoryTracePane#scene.) {
581 scenecxx . . $ MemoryTracePane#scene.->removeItemcxx . . $ QGraphicsScene#removeItem(af50d9c5bfd58279).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..topcxx . . $ QStack#top(19b2b6f17af048b).());
582 }
583 addressToStackItemMapcxx . . $ MemoryTracePane#addressToStackItemMap..removecxx . . $ QMap#remove(dd8e59d271e40448).(runtimeStackcxx . . $ MemoryTracePane#runtimeStack..topcxx . . $ QStack#top(19b2b6f17af048b).()->getAddresscxx . . $ MemoryCellGraphicsItem#getAddress(b126dc7c1de90089).());
584 bytesToPop -= runtimeStackcxx . . $ MemoryTracePane#runtimeStack..topcxx . . $ QStack#top(19b2b6f17af048b).()->getNumBytescxx . . $ MemoryCellGraphicsItem#getNumBytes(b126dc7c1de90089).();
585 delete runtimeStackcxx . . $ MemoryTracePane#runtimeStack..topcxx . . $ QStack#top(19b2b6f17af048b).();
586 runtimeStackcxx . . $ MemoryTracePane#runtimeStack..popcxx . . $ QStack#pop(5f357b03ed472e5e).();
587 isRuntimeStackItemAddedStackcxx . . $ MemoryTracePane#isRuntimeStackItemAddedStack..popcxx . . $ QStack#pop(5f357b03ed472e5e).();
588 stackLocationcxx . . $ MemoryTracePane#stackLocation..setYcxx . . $ QPointF#setY(ba8836b59fb42830).(stackLocationcxx . . $ MemoryTracePane#stackLocation..ycxx . . $ QPointF#y(21b6c25e127938e2).() + MemoryCellGraphicsItemcxx . . $ MemoryCellGraphicsItem#::boxHeightcxx . . $ MemoryCellGraphicsItem#boxHeight.);
589 }
590 }
591
592 void MemoryTracePanecxx . . $ MemoryTracePane#::mouseReleaseEventcxx . . $ MemoryTracePane#mouseReleaseEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *)
593 {
594 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).();
595 }
596
597 void MemoryTracePanecxx . . $ MemoryTracePane#::zoomFactorChangedcxx . . $ MemoryTracePane#zoomFactorChanged(d4f767463ce0a6b3).(int factor)
598 {
599 QMatrixcxx . . $ QMatrix# matrixcxx . . $ QMatrix#QMatrix(49f6e7a06ebc5aa8).;
600 matrix.scalecxx . . $ QMatrix#scale(4e43707283fa7a46).(factor * .01, factor * .01);
601 uicxx . . $ MemoryTracePane#ui.->graphicsViewcxx . . $ Ui_MemoryTracePane#graphicsView.->setMatrixcxx . . $ QGraphicsView#setMatrix(d9134e31f6525ee).(matrix);
602 }
603
604 void MemoryTracePanecxx . . $ MemoryTracePane#::mouseDoubleClickEventcxx . . $ MemoryTracePane#mouseDoubleClickEvent(702858a82d06265c).(QMouseEventcxx . . $ QMouseEvent# *)
605 {
606 emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! labelDoubleClickedcxx . . $ MemoryTracePane#labelDoubleClicked(d9b7ee7ebef3c77).(Enucxx . . $ Enu/::EMemoryTracecxx . . $ Enu/EMemoryTrace.);
607 }