File tree Expand file tree Collapse file tree 3 files changed +46
-6
lines changed Expand file tree Collapse file tree 3 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ endforeach()
33
33
34
34
# debug folder
35
35
set (DEBUG_FUNCTORS
36
- "stacktrace_line_num.oz"
36
+ "stacktrace_line_num.oz" "gc.oz"
37
37
)
38
38
file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /debug" )
39
39
foreach (FUNCTOR ${DEBUG_FUNCTORS} )
Original file line number Diff line number Diff line change
1
+ %%%
2
+ %%% Authors:
3
+ %%% kennytm
4
+ %%%
5
+ %%% Copyright:
6
+ %%% Kenny Chan, 2014
7
+ %%%
8
+ %%% Last change:
9
+ %%% $Date$ by $Author$
10
+ %%% $Revision$
11
+ %%%
12
+ %%% This file is part of Mozart, an implementation
13
+ %%% of Oz 3
14
+ %%% http://www.mozart-oz.org
15
+ %%%
16
+ %%% See the file "LICENSE" or
17
+ %%% http://www.mozart-oz.org/LICENSE.html
18
+ %%% for information on usage and redistribution
19
+ %%% of this file, and for a DISCLAIMER OF ALL
20
+ %%% WARRANTIES.
21
+ %%%
22
+
23
+ functor
24
+
25
+ import
26
+ System(gcDo)
27
+
28
+ export
29
+ Return
30
+
31
+ define
32
+ Return = gcDebug([
33
+ gcDebugTest(proc {$}
34
+ {System.gcDo}
35
+ {System.gcDo} % <-- should not crash at this point.
36
+ end )
37
+ ])
38
+
39
+ end
40
+
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ DebugEntry::DebugEntry(GR gr, const DebugEntry& from):
75
75
// StackEntry //
76
76
// //////////////
77
77
78
- StackEntry::StackEntry (GR gr, StackEntry& from) {
78
+ StackEntry::StackEntry (GR gr, StackEntry& from):
79
+ debugEntry (gr, from.debugEntry)
80
+ {
79
81
if (from.abstraction == nullptr )
80
82
abstraction = nullptr ;
81
83
else
@@ -92,8 +94,6 @@ StackEntry::StackEntry(GR gr, StackEntry& from) {
92
94
gr->copyUnstableNode (yregs[i], from.yregs [i]);
93
95
}
94
96
95
- debugEntry = DebugEntry (gr, from.debugEntry );
96
-
97
97
// gregs and kregs are irrelevant
98
98
}
99
99
@@ -373,10 +373,10 @@ void Thread::run() {
373
373
case OpDebugEntry:
374
374
case OpDebugExit: {
375
375
debugEntry.valid = true ;
376
- debugEntry.file = new (vm) StableNode (vm, KPC (1 ) );
376
+ debugEntry.file = & KPC (1 );
377
377
debugEntry.lineNumber = IntPC (2 );
378
378
debugEntry.columnNumber = IntPC (3 );
379
- debugEntry.kind = new (vm) StableNode (vm, KPC (4 ) );
379
+ debugEntry.kind = & KPC (4 );
380
380
advancePC (4 );
381
381
break ;
382
382
}
You can’t perform that action at this time.
0 commit comments