Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tracing of embedded data #384

Merged
merged 1 commit into from
Apr 18, 2016
Merged

Add tracing of embedded data #384

merged 1 commit into from
Apr 18, 2016

Conversation

EliasC
Copy link
Contributor

@EliasC EliasC commented Apr 16, 2016

This commit adds support for tracing embedded data. Since there is no
way of knowing how this data looks, it is assumed to be a single block
of memory with no pointers. Users who want to embed linked data need to
define their own tracing functions and call it in the wrapping class:

class Foo
  f : embed linked_t* end

  def Foo_trace() : void {
    let f = this.f;
    embed void
      my_trace_function(_ctx, #{f});
    end
  }

The test stringTrace.enc will trigger a garbage collection in Foo
that earlier caused one of the strings' embedded data to be prematurely
collected.

This commit adds support for tracing embedded data. Since there is no
way of knowing how this data looks, it is assumed to be a single block
of memory with no pointers. Users who want to embed linked data need to
define their own tracing functions and call it the wrapping class:

```
class Foo
  f : embed linked_t* end

  def Foo_trace() : void {
    let f = this.f;
    embed void
      my_trace_function(_ctx, #{f});
    end
  }
```

The test `stringTrace.enc` will trigger a garbage collection in `Foo`
that earlier caused one of the strings' embedded data to be prematurely
collected.
@albertnetymk
Copy link
Contributor

I would merge it at 11:00 if no objections.

@albertnetymk albertnetymk merged commit f0a1bef into parapluu:development Apr 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants