Coder Social home page Coder Social logo

avi-d-coder / sundial-gc Goto Github PK

View Code? Open in Web Editor NEW
7.0 3.0 0.0 530 KB

WIP: my Tweag open source fellowship project

Home Page: https://github.com/Avi-D-coder/sundial-gc-design

License: Apache License 2.0

Rust 100.00%
gc rust fp garbage-collection

sundial-gc's People

Contributors

avi-d-coder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sundial-gc's Issues

Compilation failed for nightly version

I want to experiment with GC in my project, but I did not compile successfully.

Rust version: 1.55-nightly

Can i get some updates?

error[E0557]: feature has been removed
 --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\lib.rs:1:12
  |
1 | #![feature(optin_builtin_traits)]
  |            ^^^^^^^^^^^^^^^^^^^^ feature has been removed
  |
  = note: renamed to `auto_traits`


error[E0583]: file not found for module `life`
  --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\lib.rs:34:1
   |
34 | pub mod life;
   | ^^^^^^^^^^^^^
   |
   = help: to create the module `life`, create file ".cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\life.rs"


error[E0432]: unresolved import `crate::AsStatic`
 --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\arena.rs:9:5
  |
9 |     AsStatic, NoGc,
  |     ^^^^^^^^ no `AsStatic` in the root


error[E0412]: cannot find type `Of` in this scope
   --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\gc.rs:108:48
    |
108 | impl<'r, T: AsStatic> From<Gc<'r, T>> for Root<Of<T>> {
    |                                                ^^ not found in this scope


error[E0405]: cannot find trait `AsStatic` in this scope
   --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\gc.rs:108:13
    |
108 | impl<'r, T: AsStatic> From<Gc<'r, T>> for Root<Of<T>> {
    |             ^^^^^^^^ not found in this scope


error[E0412]: cannot find type `Of` in this scope
   --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\gc.rs:109:36
    |
109 |     fn from(gc: Gc<'r, T>) -> Root<Of<T>> {
    |                                    ^^ not found in this scope


error[E0658]: auto traits are experimental and possibly buggy
 --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\auto_traits.rs:4:1
  |
4 | pub unsafe auto trait NoGc {}
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
  = help: add `#![feature(auto_traits)]` to the crate attributes to enable


error[E0658]: auto traits are experimental and possibly buggy
  --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\auto_traits.rs:21:1
   |
21 | pub unsafe auto trait Immutable {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` to the crate attributes to enable


error[E0658]: auto traits are experimental and possibly buggy
  --> .cargo\git\checkouts\sundial-gc-f90bf5ac980e951a\d09e780\sundial-gc\src\auto_traits.rs:29:1
   |
29 | pub auto trait NotDerived {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #13231 <https://github.com/rust-lang/rust/issues/13231> for more information
   = help: add `#![feature(auto_traits)]` to the crate attributes to enable

Rust does not expose padding

This is not good, I was planning on using padding to contain the traced bit. Without a traced bit trace must fallback to a lookup.
On unpadded structs the plan is to add a probabilistic bit set by the header, but this will never be in the same cache line as the struct being traced.
A faster cache friendly UB workaround might be adding a const unpadded to Traceequal to the sum of size_of for all fields.

https://users.rust-lang.org/t/size-of-type-without-alignment-padding/24183/5
rust-lang/rfcs#1397

There's a way to make Arena::{new, drop} relaxed

Currently they use a mutex, but the design calls for a Acquire Release CAS.
An ordering can be established, by with the traditional approach of guarding the Acquire read with a Relaxed read.
Each GC imperative will be sent with a epoch bit, the Relaxed drop message will contain the last read epoch bit. A ordering of the transferred memory range will only be established with a Release drop. This will be issued, when worker owns no Arenas of the previous epoch.

Note: A Release could issued on every drop, or at an even lower frequency. I will benchmark to determine the best approach, in theory it could even be sellected by profile guided optimization.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.