Version 3 (modified by jkeenan, 5 years ago)

--

December 12 2009 Pre-Release Hackathon

Topics

  • 12 December 2009: Miscellaneous Hackathon - We'll focus on:
    • Merge CallSignature and Context. This work is being done in the context_unify3 branch.
    • Remove uses of ->strstart outside of src/string. Either use Parrot_str_to_cstring/Parrot_str_free_cstring bufstart. See r40983 for examples of both and ask on #parrot if you're not sure.
    • When in doubt, look at Parrot's  test coverage and write tests for code we don't currently cover.

Resources

->strstart cleanup

Here are 73 instances of ->strstart in 19 files outside of src/string/.
(Note: Wiki formatting problems mean that the code listed for ./src/pmc/filehandle.pmc line 370 is not correct.)

Check off completed instances by editing wiki to put an asterisk after first 2 vertical bars.

./src/ops/string.ops392$1 = PTR2UINTVAL($2->strstart);
./src/gc/api.c527string->strstart = NULL;
./src/gc/api.c734sets also C<< str->strstart >> to the new buffer location, C<< str->bufused >>
./src/gc/api.c764Buffer_bufstart(str) = str->strstart = mem;
./src/gc/api.c830oldmem = str->strstart;
./src/gc/api.c832str->strstart = mem;
./src/gc/alloc_resources.c439offset = (ptrdiff_t)((STRING *)b)->strstart -
./src/gc/alloc_resources.c464((STRING *)b)->strstart = (char *)Buffer_bufstart(b) +
./src/gc/alloc_resources.c500((STRING *)b)->strstart = (char *)Buffer_bufstart(b) +
./src/gc/alloc_resources.c910PARROT_ASSERT(((STRING *) pobj)->strstart >=
./src/gc/alloc_resources.c912PARROT_ASSERT(((STRING *) pobj)->strstart +
./src/gc/alloc_resources.c927PARROT_ASSERT(((STRING *)pobj)->strstart >=
./src/gc/alloc_resources.c929PARROT_ASSERT(((STRING *)pobj)->strstart +
./src/gc/mark_sweep.c312(char*) ((PMC*)b)->vtable->whoami->strstart);
./src/packfile/pf_items.c1331s->strstart, OFFS(pf, *cursor)));
./src/packfile/pf_items.c1389if (s->strstart) {
./src/packfile/pf_items.c1390mem_sys_memcopy(charcursor, s->strstart, s->bufused);
./src/pmc/filehandle.pmc370char * const r = readline(got_prompt ? prompt->strstart NULL);
./src/pmc/filehandle.pmc381fprintf(stderr, "%s", prompt->strstart);
./src/pmc/filehandle.pmc394&& (((char *)string_result->strstart)[len - 1] == '\n'
./src/pmc/filehandle.pmc395 ((char *)string_result->strstart)[len - 1] == '\r')) {
./src/pmc/eval.pmc284if ((size_t)(res->strstart) & 0xf) {
./src/pmc/eval.pmc285char *adr = res->strstart;
./src/pmc/eval.pmc287res->strstart = adr;
./src/pmc/eval.pmc296PackFile_pack(INTERP, pf, (opcode_t *)res->strstart);
./src/pmc/eval.pmc354if (PackFile_unpack(INTERP, pf, (opcode_t *)packed->strstart,
./src/io/win32.c493void * const buffer = s->strstart;
./src/io/unix.c556const char * const buffer = s->strstart;
./src/io/utf8.c64const utf8_t *u8ptr = (utf8_t *)((char *)s->strstart +
./src/io/portable.c306const size_t bytes = fread(s->strstart, 1, 1, fptr);
./src/io/portable.c311ungetc(*(char *)s->strstart, fptr);
./src/io/portable.c409void * const buffer = s->strstart;
./src/io/buffer.c303if (!s->strstart)
./src/io/buffer.c306out_buf = (unsigned char *)s->strstart;
./src/io/buffer.c442memmove(s->strstart, buffer_next, len);
./src/io/buffer.c510if (s->strstart) {
./src/io/buffer.c517out_buf = (unsigned char*)s->strstart + s->strlen;
./src/io/buffer.c529if (s->strstart) {
./src/io/buffer.c536out_buf = (unsigned char*)s->strstart + s->strlen;
./src/io/buffer.c568void * const buffer = s->strstart;
./src/io/socket_win32.c251if ((error = send((int)io->os_handle, (char *)s->strstart + byteswrote,
./src/io/socket_unix.c304if ((error = send(io->os_handle, (char *)s->strstart + byteswrote,
./src/utils.c585const char * const str_start = base->strstart;
./src/utils.c587const char * const search_str = search->strstart;
./src/utils.c635const char * const search_start = search->strstart;
./src/utils.c644const char * const base_start = (char *)base->strstart + current_offset;
./src/oo.c958bits = (((UINTVAL) method_name->strstart) >> 2) & TBL_SIZE_MASK;
./src/oo.c979while (e && e->strstart != method_name->strstart) {
./src/oo.c991e->strstart = method_name->strstart;
./src/dynext.c335if (!STRING_IS_EMPTY(lib) && memcmp(lib->strstart, "lib", 3) == 0) {
./src/dynext.c336*handle = Parrot_dlopen((char *)lib->strstart + 3);
./src/dynext.c346if (!STRING_IS_EMPTY(lib) && memcmp(lib->strstart, "lib", 3) == 0) {
./src/pmc_freeze.c348ignored = PF_store_number((opcode_t *)((ptrcast_t)s->strstart + used), &v);
./src/pmc_freeze.c377ignored = PF_store_string((opcode_t *)((ptrcast_t)s->strstart + used), v);
./src/pmc_freeze.c399const char * const start = (char *)io->image->strstart;
./src/pmc_freeze.c400char **opcode = &io->image->strstart;
./src/pmc_freeze.c404io->image->bufused -= ((char *)io->image->strstart - start);
./src/pmc_freeze.c405io->image->strlen -= ((char *)io->image->strstart - start);
./src/pmc_freeze.c428const char * const start = (const char *)io->image->strstart;
./src/pmc_freeze.c429char **opcode = &io->image->strstart;
./src/pmc_freeze.c433io->image->bufused -= ((char *)io->image->strstart - start);
./src/pmc_freeze.c434io->image->strlen -= ((char *)io->image->strstart - start);
./src/pmc_freeze.c459char * const start = (char*)io->image->strstart;
./src/pmc_freeze.c460char * opcode = io->image->strstart;
./src/pmc_freeze.c464io->image->strstart = opcode;
./src/pmc_freeze.c535mem_sys_memcopy(s->strstart, pf->header, PACKFILE_HEADER_BYTES);
./src/pmc_freeze.c554mem_sys_memcopy(pf->header, s->strstart, PACKFILE_HEADER_BYTES);
./src/pmc_freeze.c560LVALUE_CAST(char *, s->strstart) += header_length;
./src/pmc_freeze.c1140LVALUE_CAST(char *, image->strstart) -= bufused;
./src/pmc_freeze.c1144PARROT_ASSERT(image->strstart >= (char *)Buffer_bufstart(image));
./t/op/string_cs.t735# 106 dest_len = u_strToUpper(src->strstart, dest_len,
./t/op/string_cs.t740# (gdb) x /8h src->strstart
./t/op/string_cs.t746# (gdb) x /8h src->strstart

context_unify3 branch

 Smolder report at r43007.