Permalink
Browse files

Don't crash the tests if trace stats are on.

  • Loading branch information...
1 parent 3114514 commit c2e5690b3fe4a287b99621617ca9935c80603e27 @nominolo committed Sep 23, 2012
Showing with 4 additions and 2 deletions.
  1. +2 −1 vm/assembler.cc
  2. +2 −1 vm/jit.cc
View
@@ -836,7 +836,8 @@ void Assembler::assemble(IRBuffer *buf, MachineCode *mcode) {
prepareTail(buf, saveref);
#ifdef LC_TRACE_STATS
- incrementCounter(&jit()->stats_[0]);
+ if (jit()->stats_ != NULL)
+ incrementCounter(&jit()->stats_[0]);
#endif
for (curins_--; curins_ >= stopins_; curins_--) {
View
@@ -913,7 +913,8 @@ void Fragment::restoreSnapshot(ExitNo exitno, ExitState *ex) {
DBG(cerr << "Restoring from snapshot " << (int)exitno
<< " of Trace " << traceId() << endl);
#ifdef LC_TRACE_STATS
- bumpExitCount(exitno);
+ if (stats_ != NULL)
+ bumpExitCount(exitno);
#endif
Snapshot &sn = snap(exitno);
IR *snapins = ir(sn.ref());

0 comments on commit c2e5690

Please sign in to comment.