Changeset 428 for branches/thune
- Timestamp:
- 07/07/07 23:25:19 (17 months ago)
- Location:
- branches/thune/thread_safe
- Files:
-
- 3 added
- 4 modified
-
component.c (modified) (2 diffs)
-
component.h (added)
-
internal.h (modified) (1 diff)
-
make.c (modified) (2 diffs)
-
series.c (modified) (2 diffs)
-
tests/working/component.good (added)
-
tests/working/component.t (added)
Legend:
- Unmodified
- Added
- Removed
-
branches/thune/thread_safe/component.c
r425 r428 20 20 21 21 #include "internal.h" 22 #include "component.h" 22 23 #include "urlan_atoms.h" 23 24 25 // Component Count Accessors26 #define ur_ccIn(cell) (cell)->coord.elem[0]27 #define ur_ccOut(cell) (cell)->coord.elem[1]28 #define ur_ccLoc(cell) (cell)->coord.elem[2]29 #define ur_ccMask(cell) (cell)->coord.elem[3]30 24 31 25 … … 124 118 return 0; //sigN; 125 119 } 126 127 128 /**129 void ur_cloneComponent( UThread* ut, UCell* result, UCell* proto )130 {131 (void) ut;132 (void) result;133 (void) proto;134 }135 */136 120 137 121 -
branches/thune/thread_safe/internal.h
r426 r428 17 17 //#define BLK_DSTACK 4 18 18 19 enum ComponentContextValues20 {21 COMPONENT_SELF = 0,22 COMPONENT_COUNTS,23 COMPONENT_BODY,24 COMPONENT_CELLS25 };26 19 27 20 #define initGCArray(af) \ -
branches/thune/thread_safe/make.c
r427 r428 29 29 30 30 31 //#define GC_STRESS_TEST 1 32 33 31 34 extern int64_t ur_stringToInt( const char*, const char*, const char** ); 32 35 extern int64_t ur_hexToInt( const char*, const char*, const char** ); … … 34 37 35 38 extern UContext ur_thrGlobal; 36 37 38 //#define GC_STRESS_TEST 139 39 40 40 -
branches/thune/thread_safe/series.c
r417 r428 19 19 20 20 21 #include "os.h" 22 #include "urlan.h" 21 #include "internal.h" 23 22 #include "charset.h" 24 #include "internal.h"25 23 #include "list.h" 24 #ifdef UR_CONFIG_DATAFLOW 25 #include "component.h" 26 #endif 26 27 27 28 … … 2356 2357 } 2357 2358 break; 2359 2360 #ifdef UR_CONFIG_DATAFLOW 2361 case UT_COMPONENT: 2362 { 2363 UBlock* orig; 2364 UBlock* blk; 2365 UCell* cnt; 2366 UCell* it; 2367 UCell* end; 2368 UIndex blkN; 2369 int len; 2370 2371 orig = ur_blockPtr( val->ctx.valBlk ); 2372 it = orig->ptr.cells; 2373 len = orig->used; 2374 blkN = ur_makeBlockT( ut, len, &blk ); 2375 2376 ur_copyCells( it, it + len, blk->ptr.cells ); 2377 blk->used = len; 2378 2379 // Point result & self to new values. 2380 it = blk->ptr.cells + COMPONENT_SELF; 2381 val->ctx.valBlk = it->ctx.valBlk = blkN; 2382 2383 // Initialize input mask. 2384 cnt = blk->ptr.cells + COMPONENT_COUNTS; 2385 ur_ccMask(cnt) = 0xffff << ur_ccIn(cnt); 2386 2387 // Initialize plugs to unset. 2388 it = blk->ptr.cells + COMPONENT_CELLS; 2389 end = it + ur_ccIn(cnt) + ur_ccOut(cnt); 2390 while( it != end ) 2391 { 2392 ur_initType( it, UT_UNSET ); 2393 ++it; 2394 } 2395 2396 // Initialize locals to none. 2397 end = it + ur_ccLoc(cnt); 2398 while( it != end ) 2399 { 2400 ur_setNone( it ); 2401 ++it; 2402 } 2403 2404 // Copy & rebind body. 2405 it = blk->ptr.cells + COMPONENT_BODY; 2406 ur_clone( ut, it, UR_COPY_ALL, 1 ); 2407 ur_bindT( ut, it->series.n, val, UR_BIND_PLUG ); 2408 } 2409 break; 2410 #endif 2358 2411 2359 2412 default: // keep value...
