| 269 | } |
| 270 | } |
| 271 | virtual void beforeLambda ( Lambda * lambda, TypeInfo * ) override { |
| 272 | TypeInfo * info = nullptr; |
| 273 | if ( reading ) { |
| 274 | uint64_t hash = 0; |
| 275 | serialize(hash); |
| 276 | info = context->debugInfo->lookup[hash]; // TODO: verify if there is capture, all that |
| 277 | DAS_ASSERTF(info,"type info not found. how did we get type, which is not in the typeinfo hash?"); |
| 278 | uint32_t size = getTypeSize(info) + 16; |
| 279 | char * ptr = context->allocate(size); |
| 280 | context->heap->mark_comment(ptr, "lambda (via bin serializer)"); |
| 281 | memset ( ptr, 0, size ); |
| 282 | *((TypeInfo **)ptr) = info; |
| 283 | ptr += 16; |
| 284 | lambda->capture = ptr; |
| 285 | } else { |
| 286 | info = lambda->getTypeInfo(); |
| 287 | serialize(info->hash); |
| 288 | } |
| 289 | } |
| 290 | }; |
| 291 | |
| 292 | // save ( obj, block<(bytesAt)> ) |
nothing calls this directly
no test coverage detected