-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Nonzeroing Move Hints (take3 branch) #26173
Commits on Jul 28, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 3eb7dd7 - Browse repository at this point
Copy the full SHA 3eb7dd7View commit details -
Prep for dropflag hints: refactor
trans:_match
to pass around `Matc……hInput` rather than `ValueRef`. (already thumbs-upped pre-rebase by nikomatsakis) The refactoring here is trivial because `trans::datum::Lvalue` currently carries no payload. However, future commits will start adding a payload to `Lvalue`, and thus will force us either 1. to thread the payload through the `_match` code (a long term goal), or 2. to ensure the payload has some reasonable default value.
Configuration menu - View commit details
-
Copy full SHA for 9ef61f1 - Browse repository at this point
Copy the full SHA 9ef61f1View commit details -
debugflag to turn off nonzeroing move hint optimization.
(already thumbs-upped pre-rebase by nikomatsakis)
Configuration menu - View commit details
-
Copy full SHA for 20aa27b - Browse repository at this point
Copy the full SHA 20aa27bView commit details -
Extend
trans::datum::Lvalue
so that it carrys an optional dropflag ……hint. Instrumented calls sites that construct Lvalues to ease tracking down cases that we might need to change whether or not they carry a hint. Note that this commit does not do anything to actually *construct* the `lldropflag_hints` map, nor does it change anything about codegen itself. Those parts are in follow-on commits.
Configuration menu - View commit details
-
Copy full SHA for a0f3f2a - Browse repository at this point
Copy the full SHA a0f3f2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d3d552b - Browse repository at this point
Copy the full SHA d3d552bView commit details -
Add dropflag hints (stack-local booleans) for unfragmented paths in t…
…rans. Added code to maintain these hints at runtime, and to conditionalize drop-filling and calls to destructors. In this early stage, we are using hints, so we are always free to leave out a flag for a path -- then we just pass `None` as the dropflag hint in the corresponding schedule cleanup call. But, once a path has a hint, we must at least maintain it: i.e. if the hint exists, we must ensure it is never set to "moved" if the data in question might actually have been initialized. It remains sound to conservatively set the hint to "initialized" as long as the true drop-flag embedded in the value itself is up-to-date. ---- Here are some high-level details I want to point out: * We maintain the hint in Lvalue::post_store, marking the lvalue as moved. (But also continue drop-filling if necessary.) * We update the hint on ExprAssign. * We pass along the hint in once closures that capture-by-move. * You only call `drop_ty` for state that does not have an associated hint. If you have a hint, you must call `drop_ty_core` instead. (Originally I passed the hint into `drop_ty` as well, to make the connection to a hint more apparent, but the vast majority of current calls to `drop_ty` are in contexts where no hint is available, so it just seemed like noise in the resulting diff.)
Configuration menu - View commit details
-
Copy full SHA for dce1c61 - Browse repository at this point
Copy the full SHA dce1c61View commit details -
During my own review, I convinced myself this was indeed a bug.
Testing indicates bug would have been caught, albeit later than one might hope, during `sync::mpsc::tests::smoke_shared_port_gone2` test.
Configuration menu - View commit details
-
Copy full SHA for e25427a - Browse repository at this point
Copy the full SHA e25427aView commit details -
Revise intrinsic-move-val test to not require knowledge of whether fi…
…lling drop is in use.
Configuration menu - View commit details
-
Copy full SHA for ff14eaf - Browse repository at this point
Copy the full SHA ff14eafView commit details -
Reduced the Lvalue constructors to a kernel of three constructors.
Updated all call sites that used the other contructors to uniformly call `Lvalue::new_with_hint`, passing along the appropriate kind of hint for each context. Placated tidy in a few other places in datum.rs.
Configuration menu - View commit details
-
Copy full SHA for 494ce37 - Browse repository at this point
Copy the full SHA 494ce37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22796c8 - Browse repository at this point
Copy the full SHA 22796c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b4dd765 - Browse repository at this point
Copy the full SHA b4dd765View commit details