Version 2 (modified by jkeenan, 12 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.ops | 392 | $1 = PTR2UINTVAL($2->strstart); | |
./src/gc/api.c | 527 | string->strstart = NULL; | |
./src/gc/api.c | 734 | sets also C<< str->strstart >> to the new buffer location, C<< str->bufused >> | |
./src/gc/api.c | 764 | Buffer_bufstart(str) = str->strstart = mem; | |
./src/gc/api.c | 830 | oldmem = str->strstart; | |
./src/gc/api.c | 832 | str->strstart = mem; | |
./src/gc/alloc_resources.c | 439 | offset = (ptrdiff_t)((STRING *)b)->strstart - | |
./src/gc/alloc_resources.c | 464 | ((STRING *)b)->strstart = (char *)Buffer_bufstart(b) + | |
./src/gc/alloc_resources.c | 500 | ((STRING *)b)->strstart = (char *)Buffer_bufstart(b) + | |
./src/gc/alloc_resources.c | 910 | PARROT_ASSERT(((STRING *) pobj)->strstart >= | |
./src/gc/alloc_resources.c | 912 | PARROT_ASSERT(((STRING *) pobj)->strstart + | |
./src/gc/alloc_resources.c | 927 | PARROT_ASSERT(((STRING *)pobj)->strstart >= | |
./src/gc/alloc_resources.c | 929 | PARROT_ASSERT(((STRING *)pobj)->strstart + | |
./src/gc/mark_sweep.c | 312 | (char*) ((PMC*)b)->vtable->whoami->strstart); | |
./src/packfile/pf_items.c | 1331 | s->strstart, OFFS(pf, *cursor))); | |
./src/packfile/pf_items.c | 1389 | if (s->strstart) { | |
./src/packfile/pf_items.c | 1390 | mem_sys_memcopy(charcursor, s->strstart, s->bufused); | |
./src/pmc/filehandle.pmc | 370 | char * const r = readline(got_prompt ? prompt->strstart NULL); | |
./src/pmc/filehandle.pmc | 381 | fprintf(stderr, "%s", prompt->strstart); | |
./src/pmc/filehandle.pmc | 394 | && (((char *)string_result->strstart)[len - 1] == '\n' | |
./src/pmc/filehandle.pmc | 395 | ((char *)string_result->strstart)[len - 1] == '\r')) { | |
./src/pmc/eval.pmc | 284 | if ((size_t)(res->strstart) & 0xf) { | |
./src/pmc/eval.pmc | 285 | char *adr = res->strstart; | |
./src/pmc/eval.pmc | 287 | res->strstart = adr; | |
./src/pmc/eval.pmc | 296 | PackFile_pack(INTERP, pf, (opcode_t *)res->strstart); | |
./src/pmc/eval.pmc | 354 | if (PackFile_unpack(INTERP, pf, (opcode_t *)packed->strstart, | |
./src/io/win32.c | 493 | void * const buffer = s->strstart; | |
./src/io/unix.c | 556 | const char * const buffer = s->strstart; | |
./src/io/utf8.c | 64 | const utf8_t *u8ptr = (utf8_t *)((char *)s->strstart + | |
./src/io/portable.c | 306 | const size_t bytes = fread(s->strstart, 1, 1, fptr); | |
./src/io/portable.c | 311 | ungetc(*(char *)s->strstart, fptr); | |
./src/io/portable.c | 409 | void * const buffer = s->strstart; | |
./src/io/buffer.c | 303 | if (!s->strstart) | |
./src/io/buffer.c | 306 | out_buf = (unsigned char *)s->strstart; | |
./src/io/buffer.c | 442 | memmove(s->strstart, buffer_next, len); | |
./src/io/buffer.c | 510 | if (s->strstart) { | |
./src/io/buffer.c | 517 | out_buf = (unsigned char*)s->strstart + s->strlen; | |
./src/io/buffer.c | 529 | if (s->strstart) { | |
./src/io/buffer.c | 536 | out_buf = (unsigned char*)s->strstart + s->strlen; | |
./src/io/buffer.c | 568 | void * const buffer = s->strstart; | |
./src/io/socket_win32.c | 251 | if ((error = send((int)io->os_handle, (char *)s->strstart + byteswrote, | |
./src/io/socket_unix.c | 304 | if ((error = send(io->os_handle, (char *)s->strstart + byteswrote, | |
./src/utils.c | 585 | const char * const str_start = base->strstart; | |
./src/utils.c | 587 | const char * const search_str = search->strstart; | |
./src/utils.c | 635 | const char * const search_start = search->strstart; | |
./src/utils.c | 644 | const char * const base_start = (char *)base->strstart + current_offset; | |
./src/oo.c | 958 | bits = (((UINTVAL) method_name->strstart) >> 2) & TBL_SIZE_MASK; | |
./src/oo.c | 979 | while (e && e->strstart != method_name->strstart) { | |
./src/oo.c | 991 | e->strstart = method_name->strstart; | |
./src/dynext.c | 335 | if (!STRING_IS_EMPTY(lib) && memcmp(lib->strstart, "lib", 3) == 0) { | |
./src/dynext.c | 336 | *handle = Parrot_dlopen((char *)lib->strstart + 3); | |
./src/dynext.c | 346 | if (!STRING_IS_EMPTY(lib) && memcmp(lib->strstart, "lib", 3) == 0) { | |
./src/pmc_freeze.c | 348 | ignored = PF_store_number((opcode_t *)((ptrcast_t)s->strstart + used), &v); | |
./src/pmc_freeze.c | 377 | ignored = PF_store_string((opcode_t *)((ptrcast_t)s->strstart + used), v); | |
./src/pmc_freeze.c | 399 | const char * const start = (char *)io->image->strstart; | |
./src/pmc_freeze.c | 400 | char **opcode = &io->image->strstart; | |
./src/pmc_freeze.c | 404 | io->image->bufused -= ((char *)io->image->strstart - start); | |
./src/pmc_freeze.c | 405 | io->image->strlen -= ((char *)io->image->strstart - start); | |
./src/pmc_freeze.c | 428 | const char * const start = (const char *)io->image->strstart; | |
./src/pmc_freeze.c | 429 | char **opcode = &io->image->strstart; | |
./src/pmc_freeze.c | 433 | io->image->bufused -= ((char *)io->image->strstart - start); | |
./src/pmc_freeze.c | 434 | io->image->strlen -= ((char *)io->image->strstart - start); | |
./src/pmc_freeze.c | 459 | char * const start = (char*)io->image->strstart; | |
./src/pmc_freeze.c | 460 | char * opcode = io->image->strstart; | |
./src/pmc_freeze.c | 464 | io->image->strstart = opcode; | |
./src/pmc_freeze.c | 535 | mem_sys_memcopy(s->strstart, pf->header, PACKFILE_HEADER_BYTES); | |
./src/pmc_freeze.c | 554 | mem_sys_memcopy(pf->header, s->strstart, PACKFILE_HEADER_BYTES); | |
./src/pmc_freeze.c | 560 | LVALUE_CAST(char *, s->strstart) += header_length; | |
./src/pmc_freeze.c | 1140 | LVALUE_CAST(char *, image->strstart) -= bufused; | |
./src/pmc_freeze.c | 1144 | PARROT_ASSERT(image->strstart >= (char *)Buffer_bufstart(image)); | |
./t/op/string_cs.t | 735 | # 106 dest_len = u_strToUpper(src->strstart, dest_len, | |
./t/op/string_cs.t | 740 | # (gdb) x /8h src->strstart | |
./t/op/string_cs.t | 746 | # (gdb) x /8h src->strstart |