示例#1
0
void amf_decode_msg(lua_State *L, amf_cursor *c)
{
    uint16_t ver, hc, bc;

    lua_createtable(L, 3, 0);

    amf_cursor_read_u16(c, &ver);
    amf_cursor_checkerr(c);
    lua_pushinteger(L, ver);
    lua_rawseti(L, -2, 1);


    /* headers */
    amf_cursor_read_u16(c, &hc);
    if (hc > 0) lua_createtable(L, hc, 0);
    unsigned int i;
    for (i = 0; i < hc; i++) {
        decode_hdr(L, c);
        amf_cursor_checkerr(c);
        lua_rawseti(L, -2, i+1);
    }
    lua_rawseti(L, -2, 2);

    /* bodies */
    amf_cursor_read_u16(c, &bc);
    if (bc > 0) lua_createtable(L, bc, 0);
    unsigned int j;
    for (j = 0; j < hc; j++) {
        decode_body(L, c);
        amf_cursor_checkerr(c);
        lua_rawseti(L, -2, j+1);
    }
    lua_rawseti(L, -2, 3);
}
示例#2
0
ScopeDesc::ScopeDesc(const ScopeDesc* parent) {
  _code          = parent->_code;
  _decode_offset = parent->_sender_decode_offset;
  _objects       = parent->_objects;
  _reexecute     = false; //reexecute only applies to the first scope
  _return_oop    = false;
  decode_body();
}
示例#3
0
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, bool reexecute, bool return_oop) {
  _code          = code;
  _decode_offset = decode_offset;
  _objects       = decode_object_values(DebugInformationRecorder::serialized_null);
  _reexecute     = reexecute;
  _return_oop    = return_oop;
  decode_body();
}
示例#4
0
ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool return_oop) {
  _code          = code;
  _decode_offset = decode_offset;
  _objects       = decode_object_values(obj_decode_offset);
  _reexecute     = reexecute;
  _return_oop    = return_oop;
  decode_body();
}
示例#5
0
ScopeDesc::ScopeDesc(const CompiledMethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool rethrow_exception, bool return_oop) {
  _code          = code;
  _decode_offset = decode_offset;
  _objects       = decode_object_values(obj_decode_offset);
  _reexecute     = reexecute;
  _rethrow_exception = rethrow_exception;
  _return_oop    = return_oop;
  decode_body();
}
示例#6
0
PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC

ScopeDesc::ScopeDesc(const nmethod* code, int decode_offset, int obj_decode_offset, bool reexecute, bool return_oop) {
  _code          = code;
  _decode_offset = decode_offset;
  _objects       = decode_object_values(obj_decode_offset);
  _reexecute     = reexecute;
  _return_oop    = return_oop;
  decode_body();
}