rust-js / rjs

Rust JavaScript interpreter
98 stars 6 forks source link

Local should have a lifetime #91

Open pvginkel opened 9 years ago

pvginkel commented 9 years ago

Local<T> should have a lifetime associated with the current LocalScope. However, introducing such a lifetime would very much complicate mess of lifetimes, lots of which are going to conflict. E.g. when a method takes a local and produces a local, the produced local would get its lifetime from the provided local scope, but the provided locals would have a different lifetime. And, there is no guarantee that the lifetime of the local scope is shorter than that of the provided, or the other way around, or that the lifetime of different provided local arguments are anywhere near the same.

pvginkel commented 9 years ago

Help is wanted with this, specifically: