src/jdk.pack/share/native/common-unpack/coding.h
author sdama
Tue, 12 Jun 2018 18:30:52 +0530
changeset 50522 99f4d3b6d487
parent 47216 71c04702a3d5
permissions -rw-r--r--
8204861: fix for 8196993 has broken the build on linux Summary: undo the changes done for 8196993 Reviewed-by: stefank, shade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1082
diff changeset
     2
 * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1082
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1082
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1082
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1082
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 1082
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
struct unpacker;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#define INT_MAX_VALUE ((int)0x7FFFFFFF)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#define INT_MIN_VALUE ((int)0x80000000)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#define CODING_SPEC(B, H, S, D) ((B)<<20|(H)<<8|(S)<<4|(D)<<0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#define CODING_B(x) ((x)>>20 & 0xF)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#define CODING_H(x) ((x)>>8  & 0xFFF)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
#define CODING_S(x) ((x)>>4  & 0xF)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
#define CODING_D(x) ((x)>>0  & 0xF)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
#define CODING_INIT(B, H, S, D) \
1082
53833ff90c45 6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux
ohair
parents: 2
diff changeset
    38
  { CODING_SPEC(B, H, S, D) , 0, 0, 0, 0, 0, 0, 0, 0}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
1082
53833ff90c45 6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux
ohair
parents: 2
diff changeset
    40
// For debugging purposes, some compilers do not like this and will complain.
53833ff90c45 6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux
ohair
parents: 2
diff changeset
    41
//    #define long do_not_use_C_long_types_use_jlong_or_int
53833ff90c45 6496269: Many warnings generated from com/sun/java/util/jar/pack/*.cpp when compiled on Linux
ohair
parents: 2
diff changeset
    42
// Use of the type "long" is problematic, do not use it.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
struct coding {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
  int  spec;  // B,H,S,D
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
  // Handy values derived from the spec:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
  int B() { return CODING_B(spec); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
  int H() { return CODING_H(spec); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
  int S() { return CODING_S(spec); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  int D() { return CODING_D(spec); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  int L() { return 256-CODING_H(spec); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
  int  min, max;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
  int  umin, umax;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
  char isSigned, isSubrange, isFullRange, isMalloc;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
  coding* init();  // returns self or null if error
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
  coding* initFrom(int spec_) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
    assert(this->spec == 0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
    this->spec = spec_;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
    return init();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
  static coding* findBySpec(int spec);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
  static coding* findBySpec(int B, int H, int S=0, int D=0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
  static coding* findByIndex(int irregularCodingIndex);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
  static uint parse(byte* &rp, int B, int H);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
  static uint parse_lgH(byte* &rp, int B, int H, int lgH);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
  static void parseMultiple(byte* &rp, int N, byte* limit, int B, int H);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
  uint parse(byte* &rp) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
    return parse(rp, CODING_B(spec), CODING_H(spec));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
  void parseMultiple(byte* &rp, int N, byte* limit) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
    parseMultiple(rp, N, limit, CODING_B(spec), CODING_H(spec));
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
  bool canRepresent(int x)         { return (x >= min  && x <= max);  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  bool canRepresentUnsigned(int x) { return (x >= umin && x <= umax); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
  int sumInUnsignedRange(int x, int y);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
  int readFrom(byte* &rpVar, int* dbase);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  void readArrayFrom(byte* &rpVar, int* dbase, int length, int* values);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
  void skipArrayFrom(byte* &rpVar, int length) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
    readArrayFrom(rpVar, (int*)NULL, length, (int*)NULL);
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
#ifndef PRODUCT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
  const char* string();
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
#endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
  void free();  // free self if isMalloc
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
  // error handling
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
  static void abort(const char* msg = null) { unpack_abort(msg); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
enum coding_method_kind {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
  cmk_ERROR,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
  cmk_BHS,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
  cmk_BHS0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  cmk_BHS1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
  cmk_BHSD1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
  cmk_BHS1D1full,  // isFullRange
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
  cmk_BHS1D1sub,   // isSubRange
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
  // special cases hand-optimized (~50% of all decoded values)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  cmk_BYTE1,         //(1,256)      6%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
  cmk_CHAR3,         //(3,128)      7%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
  cmk_UNSIGNED5,     //(5,64)      13%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
  cmk_DELTA5,        //(5,64,1,1)   5%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
  cmk_BCI5,          //(5,4)       18%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
  cmk_BRANCH5,       //(5,4,2)      4%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
//cmk_UNSIGNED5H16,  //(5,16)       5%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
//cmk_UNSIGNED2H4,   //(2,4)        6%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
//cmk_DELTA4H8,      //(4,8,1,1)   10%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
//cmk_DELTA3H16,     //(3,16,1,1)   9%
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
  cmk_BHS_LIMIT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
  cmk_pop,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
  cmk_pop_BHS0,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
  cmk_pop_BYTE1,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
  cmk_pop_LIMIT,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
  cmk_LIMIT
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
enum {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
  BYTE1_spec       = CODING_SPEC(1, 256, 0, 0),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
  CHAR3_spec       = CODING_SPEC(3, 128, 0, 0),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
  UNSIGNED4_spec   = CODING_SPEC(4, 256, 0, 0),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
  UNSIGNED5_spec   = CODING_SPEC(5, 64, 0, 0),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
  SIGNED5_spec     = CODING_SPEC(5, 64, 1, 0),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
  DELTA5_spec      = CODING_SPEC(5, 64, 1, 1),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
  UDELTA5_spec     = CODING_SPEC(5, 64, 0, 1),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  MDELTA5_spec     = CODING_SPEC(5, 64, 2, 1),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
  BCI5_spec        = CODING_SPEC(5, 4, 0, 0),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
  BRANCH5_spec     = CODING_SPEC(5, 4, 2, 0)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
enum {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
  B_MAX = 5,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
  C_SLOP = B_MAX*10
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
struct coding_method;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
// iterator under the control of a meta-coding
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
struct value_stream {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
  // current coding of values or values
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
  coding c;               // B,H,S,D,etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
  coding_method_kind cmk; // type of decoding needed
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
  byte* rp;               // read pointer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
  byte* rplimit;          // final value of read pointer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
  int sum;                // partial sum of all values so far (D=1 only)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
  coding_method* cm;      // coding method that defines this stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
  void init(byte* band_rp, byte* band_limit, coding* defc);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  void init(byte* band_rp, byte* band_limit, int spec)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    { init(band_rp, band_limit, coding::findBySpec(spec)); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
  void setCoding(coding* c);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
  void setCoding(int spec) { setCoding(coding::findBySpec(spec)); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
  // Parse and decode a single value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
  int getInt();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
  // Parse and decode a single byte, with no error checks.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
  int getByte() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
    assert(cmk == cmk_BYTE1);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
    assert(rp < rplimit);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
    return *rp++ & 0xFF;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  // Used only for asserts.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  bool hasValue();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
  void done() { assert(!hasValue()); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
  // Sometimes a value stream has an auxiliary (but there are never two).
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  value_stream* helper() {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    assert(hasHelper());
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
    return this+1;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
  }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  bool hasHelper();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
  // error handling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
  //  inline void abort(const char* msg);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
  //  inline void aborting();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
struct coding_method {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
  value_stream vs0;       // initial state snapshot (vs.meta==this)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
  coding_method* next;    // what to do when we run out of bytes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
  // these fields are used for pop codes only:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
  int* fValues;           // favored value array
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
  int  fVlength;          // maximum favored value token
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
  coding_method* uValues; // unfavored value stream
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
  // pointer to outer unpacker, for error checks etc.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
  unpacker* u;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
  // Initialize a value stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
  void reset(value_stream* state);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
  // Parse a band header, size a band, and initialize for further action.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
  // band_rp advances (but not past band_limit), and meta_rp advances.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
  // The mode gives context, such as "inside a pop".
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
  // The defc and N are the incoming parameters to a meta-coding.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
  // The value sink is used to collect output values, when desired.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
  void init(byte* &band_rp, byte* band_limit,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
            byte* &meta_rp, int mode,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
            coding* defc, int N,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
            intlist* valueSink);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
  // error handling
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
  void abort(const char* msg) { unpack_abort(msg, u); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
  bool aborting()             { return unpack_aborting(u); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
//inline void value_stream::abort(const char* msg) { cm->abort(msg); }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
//inline void value_stream::aborting()             { cm->aborting(); }