Lines Matching refs:bw

101 DUK_INTERNAL void duk_bw_write_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t src_of…  in duk_bw_write_raw_slice()  argument
105 DUK_ASSERT(bw != NULL); in duk_bw_write_raw_slice()
106 DUK_ASSERT(src_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_write_raw_slice()
107 DUK_ASSERT(len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_write_raw_slice()
108 DUK_ASSERT(src_off + len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_write_raw_slice()
111 p_base = bw->p_base; in duk_bw_write_raw_slice()
112 DUK_MEMCPY((void *) bw->p, in duk_bw_write_raw_slice()
115 bw->p += len; in duk_bw_write_raw_slice()
118 DUK_INTERNAL void duk_bw_write_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t src… in duk_bw_write_ensure_slice() argument
120 DUK_ASSERT(bw != NULL); in duk_bw_write_ensure_slice()
121 DUK_ASSERT(src_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_write_ensure_slice()
122 DUK_ASSERT(len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_write_ensure_slice()
123 DUK_ASSERT(src_off + len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_write_ensure_slice()
126 DUK_BW_ENSURE(thr, bw, len); in duk_bw_write_ensure_slice()
127 duk_bw_write_raw_slice(thr, bw, src_off, len); in duk_bw_write_ensure_slice()
130 DUK_INTERNAL void duk_bw_insert_raw_bytes(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_o… in duk_bw_insert_raw_bytes() argument
135 DUK_ASSERT(bw != NULL); in duk_bw_insert_raw_bytes()
136 DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_raw_bytes()
140 p_base = bw->p_base; in duk_bw_insert_raw_bytes()
141 buf_sz = bw->p - p_base; in duk_bw_insert_raw_bytes()
151 bw->p += len; in duk_bw_insert_raw_bytes()
154 DUK_INTERNAL void duk_bw_insert_ensure_bytes(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t ds… in duk_bw_insert_ensure_bytes() argument
156 DUK_ASSERT(bw != NULL); in duk_bw_insert_ensure_bytes()
157 DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_ensure_bytes()
161 DUK_BW_ENSURE(thr, bw, len); in duk_bw_insert_ensure_bytes()
162 duk_bw_insert_raw_bytes(thr, bw, dst_off, buf, len); in duk_bw_insert_ensure_bytes()
165 DUK_INTERNAL void duk_bw_insert_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t dst_o… in duk_bw_insert_raw_slice() argument
170 DUK_ASSERT(bw != NULL); in duk_bw_insert_raw_slice()
171 DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_raw_slice()
172 DUK_ASSERT(src_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_raw_slice()
173 DUK_ASSERT(len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_raw_slice()
174 DUK_ASSERT(src_off + len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_raw_slice()
177 p_base = bw->p_base; in duk_bw_insert_raw_slice()
189 buf_sz = bw->p - p_base; in duk_bw_insert_raw_slice()
199 bw->p += len; in duk_bw_insert_raw_slice()
202 DUK_INTERNAL void duk_bw_insert_ensure_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t ds… in duk_bw_insert_ensure_slice() argument
204 DUK_ASSERT(bw != NULL); in duk_bw_insert_ensure_slice()
205 DUK_ASSERT(dst_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_ensure_slice()
206 DUK_ASSERT(src_off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_ensure_slice()
207 DUK_ASSERT(len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_ensure_slice()
208 DUK_ASSERT(src_off + len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_ensure_slice()
214 DUK_BW_ENSURE(thr, bw, len); in duk_bw_insert_ensure_slice()
215 duk_bw_insert_raw_slice(thr, bw, dst_off, src_off, len); in duk_bw_insert_ensure_slice()
218 DUK_INTERNAL duk_uint8_t *duk_bw_insert_raw_area(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_… in duk_bw_insert_raw_area() argument
223 DUK_ASSERT(bw != NULL); in duk_bw_insert_raw_area()
224 DUK_ASSERT(off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_raw_area()
227 p_base = bw->p_base; in duk_bw_insert_raw_area()
228 buf_sz = bw->p - p_base; in duk_bw_insert_raw_area()
236 DUK_INTERNAL duk_uint8_t *duk_bw_insert_ensure_area(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_si… in duk_bw_insert_ensure_area() argument
238 DUK_ASSERT(bw != NULL); in duk_bw_insert_ensure_area()
239 DUK_ASSERT(off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_insert_ensure_area()
242 DUK_BW_ENSURE(thr, bw, len); in duk_bw_insert_ensure_area()
243 return duk_bw_insert_raw_area(thr, bw, off, len); in duk_bw_insert_ensure_area()
246 DUK_INTERNAL void duk_bw_remove_raw_slice(duk_hthread *thr, duk_bufwriter_ctx *bw, duk_size_t off, … in duk_bw_remove_raw_slice() argument
254 DUK_ASSERT(bw != NULL); in duk_bw_remove_raw_slice()
255 DUK_ASSERT(off <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_remove_raw_slice()
256 DUK_ASSERT(len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_remove_raw_slice()
257 DUK_ASSERT(off + len <= DUK_BW_GET_SIZE(thr, bw)); in duk_bw_remove_raw_slice()
260 p_base = bw->p_base; in duk_bw_remove_raw_slice()
263 move_sz = (duk_size_t) (bw->p - p_src); in duk_bw_remove_raw_slice()
267 bw->p -= len; in duk_bw_remove_raw_slice()