~ubuntu-branches/ubuntu/wily/luajit/wily

« back to all changes in this revision

Viewing changes to src/lj_snap.c

  • Committer: Package Import Robot
  • Author(s): Enrico Tassi
  • Date: 2015-08-14 16:40:52 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20150814164052-prd0p1tz8zdupc28
Tags: 2.0.4+dfsg-1
* New upstream release (Close: #789321)
* Build on Hurd (Close: #712975)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
** Snapshot handling.
3
 
** Copyright (C) 2005-2014 Mike Pall. See Copyright Notice in luajit.h
 
3
** Copyright (C) 2005-2015 Mike Pall. See Copyright Notice in luajit.h
4
4
*/
5
5
 
6
6
#define lj_snap_c
104
104
    if (frame_islua(frame)) {
105
105
      map[f++] = SNAP_MKPC(frame_pc(frame));
106
106
      frame = frame_prevl(frame);
107
 
      if (frame + funcproto(frame_func(frame))->framesize > ftop)
108
 
        ftop = frame + funcproto(frame_func(frame))->framesize;
109
107
    } else if (frame_iscont(frame)) {
110
108
      map[f++] = SNAP_MKFTSZ(frame_ftsz(frame));
111
109
      map[f++] = SNAP_MKPC(frame_contpc(frame));
114
112
      lua_assert(!frame_isc(frame));
115
113
      map[f++] = SNAP_MKFTSZ(frame_ftsz(frame));
116
114
      frame = frame_prevd(frame);
 
115
      continue;
117
116
    }
 
117
    if (frame + funcproto(frame_func(frame))->framesize > ftop)
 
118
      ftop = frame + funcproto(frame_func(frame))->framesize;
118
119
  }
119
120
  lua_assert(f == (MSize)(1 + J->framedepth));
120
121
  return (BCReg)(ftop - lim);