Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [DEV-7086] TAMER: Remove WIP linker warningMike Gerwitz2020-04-062-3/+0
| | | | | While it is true that this is still being finalized, the warnings originally existed because tameld was not feature complete. It is now.
* [DEV-7086] TAMER: ir::asg::base::test Add missing set_fragment failure testMike Gerwitz2020-04-061-1/+39
| | | | Results the last remaining BaseAsg test TODO.
* [DEV-7086] TAMER: ir::asg::TransitionError::BadFragmentDest tuple=>structMike Gerwitz2020-04-061-4/+4
| | | | Consistency.
* [DEV-7086] TAMER: Disallow IdentObject::resolve redeclarationsMike Gerwitz2020-04-061-24/+63
| | | | Except under well-defined circumstances.
* [DEV-7086] Proper handling of identifier overridesMike Gerwitz2020-04-062-107/+521
| | | | | | | | This is an awkward system that I'd like to remove at some point. It adds complexity. For the meantime, overrides have been arbitrarily restricted to a single override (no override-override). But it's needed being until we rework maps and can handle the illusion of overrides using the template system.
* [DEV-7086] TAMER: TransitionError::Incompatible: Remove unusedMike Gerwitz2020-04-012-13/+10
|
* [DEV-7086] .gitignore (a.out, perf.data): IgnoreMike Gerwitz2020-03-311-0/+5
|
* [DEV-7086] TAMER: BaseAsg::set_fragment: Remove duplicate codeMike Gerwitz2020-03-311-29/+24
| | | | | | Benchmark performance for this method is still substantially slower. And oddly, this nearly doubled the speed of the other two calls (granted, at that speed, it doesn't matter).
* [DEV-7086] ASG benchmarksMike Gerwitz2020-03-312-3/+494
|
* TAMER: BaseAsg test: Remove fulfilled stub TODOMike Gerwitz2020-03-261-1/+0
|
* Proper extern resolutionMike Gerwitz2020-03-2611-201/+560
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | This properly checks identifier types when resolving externs. It also includes a bit of refactoring. Note that some of that refactoring was already merged into master. The old linker was missing some things, so there are template changes in here as well. An example of an error currently: error: extern `__retry` of type `cgen[boolean; 1]` is incompatible with type `cgen[boolean; 0]`
| * [DEV-7087] TAMER: Add Source to IdentObject::ExternMike Gerwitz2020-03-262-17/+42
| | | | | | | | | | | | | | | | All of these refactoring commits to arrive at this one final change: the ability to store the source location for externs so that we can report on what package is expecting an identifier to be defined. Phew. Goodnight.
| * [DEV-7087] TAMER: Object{State,Data}: API representative of state transitionsMike Gerwitz2020-03-263-92/+80
| | | | | | | | | | The API now enforces beginning at Missing and transitioning through states. Methods have been renamed to reflect this.
| * [DEV-7087] TAMER: BaseAsg: Refactor duplicate declare{,_extern} codeMike Gerwitz2020-03-261-34/+40
| |
| * [DEV-7087] TAMER: Remote optional Source from ASG and ObjectMike Gerwitz2020-03-265-220/+163
| | | | | | | | | | | | | | | | | | This undoes work I did earlier today...but now we'll be able to support a Source on an extern. There is duplicate code between `BaseAsg::declare{,_extern}` that will be resolved in an upcoming commit. Upcoming commits will also simplify terminology and clean up methods on ObjectState.
| * [DEV-7087] TAMER: Asg: Reintroduce declare_externMike Gerwitz2020-03-264-20/+146
| | | | | | | | | | | | | | There is some duplication here with `declare` that will be cleared up in a following commit. Reintroducing this method is necessary so that Source can be used to represent the source location of the extern itself; it's currently None to indicate an extern in `declare`.
| * [DEV-7087] TAMER: ObjectState: Introduce extern transitionMike Gerwitz2020-03-262-37/+69
| | | | | | | | | | | | | | | | | | | | | | This is the first step in a more incremental refactoring that previous commits to undo the optional Source in `ObjectState::ident`. This provides an explicit transition to an extern, with the intent of requiring an initial missing state. This will simplify logic on the ASG. Note that the Source provided to this new method is not yet used. That too will come in a following commit and will represent the source of the defined extern rather than the concrete identifier.
| * [DEV-7087] TAMER: Type compatability check during extern resolutionMike Gerwitz2020-03-265-222/+304
| | | | | | | | | | | | | | | | | | | | This properly verifies extern types, and cleans up Asg's API a little so that externs aren't handled much differently than other declarations. With that said, after making src optional, I realized that we will indeed want source information for externs themselves so we can direct the user to what package is expecting that symbol (as the old linker does). So this approach will not work, and I'll have to undo some of those changes.
| * [DEV-7087] core: Fix extern dim defaultsMike Gerwitz2020-03-262-2/+8
| |
| * [DEV-7087] core/retry (__retry): dim=0Mike Gerwitz2020-03-261-1/+1
| | | | | | | | | | Now that we will be doing extern type checks, this must be properly set.
| * [DEV-7087] TAMER: tameld: Format error outputMike Gerwitz2020-03-262-3/+11
| | | | | | | | We will want an option for verbose debug output in the future.
| * [DEV-7087] Beginning of extern type verification and reportingMike Gerwitz2020-03-263-8/+157
| | | | | | | | | | This only verifies when externs are defined _before_ they need to be resolved. See a future commit for the rest of this.
| * [DEV-7087] TAMER: AsgError: Wrap TransitionErrorMike Gerwitz2020-03-263-28/+22
|/ | | | See next commit.
* [DEV-7133] Check for cyclic dependenciesJoseph Frazer2020-03-265-38/+598
|\ | | | | | | | | | | | | | | | | | | Merge branch 'jira-7133' * jira-7133: [DEV-7133] Clearly show the cycles in the output [DEV-7133] Check for cyclic dependencies [DEV-7133] Remove dependency from "lv:function/lv:param" [DEV-7133] Add AsgError::Cycle
| * [DEV-7133] Clearly show the cycles in the outputJoseph Frazer2020-03-262-6/+30
| |
| * [DEV-7133] Check for cyclic dependenciesJoseph Frazer2020-03-263-35/+568
| | | | | | | | | | | | | | We want the linker to show an error when a cyclic dependency is encountered. Co-authored-by: Mike Gerwitz <mike.gerwitz@ryansg.com>
| * [DEV-7133] Remove dependency from "lv:function/lv:param"Joseph Frazer2020-03-261-3/+1
| | | | | | | | | | | | These dependencies do not matter and can be safely ignored. The linker will catch these cycles in future versions so we need to remove the deps now.
| * [DEV-7133] Add AsgError::CycleJoseph Frazer2020-03-261-0/+5
|/ | | | We want a special error type when we detect cyclic dependencies.
* [DEV-7087] TAMER: symbol_dummy! macroMike Gerwitz2020-03-246-61/+70
|
* [DEV-7087] TAMER: {=>Ident}Object{,State,Data}Mike Gerwitz2020-03-249-296/+669
| | | | | | This is essential to clarify what exactly the different object types represent with the new generic abstractions. For example, we will have expressions as an object type.
* TAMER: Make Asg generic over objectMike Gerwitz2020-03-249-158/+311
| | | | | | | | | | | | | | | | | | | | | | | | There's a lot here to make the object stored on the `Asg` generic. This introduces `ObjectState` for state transitions and `ObjectData` for pure data retrieval. This will allow not only for mocking, but will be useful to enforce compile-time restrictions on the type of objects expected by the linker vs. the compiler (e.g. the linker will not have expressions). This commit intentionally leaves the corresponding tests in their original location to prove that the functionality has not changed; they'll be moved in a future commit. This also leaves the names as "Object" to reduce the number the cognative overhead of this commit. It will be renamed to something like "IdentObject" in the near future to clarify the intent of the current object type and to open the way for expressions and a type that marries both of them in the future. Once all of this is done, we'll finally be able to make changes to the compatibility logic in state transitions to implement extern compatibility checks during resolution. DEV-7087
* TAMER: Extract identifier transitions into ObjectMike Gerwitz2020-03-193-75/+183
| | | | | | | | | | | | | | | | The next commit will generalize this further. This moves logic out of BaseAsg so that we can implement more sophisticated transitions for compatability checks. The logic is still tested as part of BaseAsg; the next commit will change that as it's generalized further. * tamer/src/ir/asg/base.rs: Extract object transitions. * tamer/src/ir/asg/graph.rs (AsgError)[IncompatibleIdent]: New variant. (From<TransitionError> for AsgError): Basic type translation. * tamer/src/ir/asg/object.rs (TransitionResult): New type. (impl Object): Transition methods. (TransitionError): New enum.
* TAMER: ld/poc: Simplify {get_interner_value=>get_ident}Mike Gerwitz2020-03-191-27/+17
|
* ir::asg::Object::Empty: Remove variantMike Gerwitz2020-03-197-29/+27
| | | | | | | | | | | | | | | | | | | | | This variant is unnecessary, as it was used only by the indexer to represent the absence of a node, for which was can simply use `None` in the containing `Option`. * tamer/Cargo.toml: Add `lazy_static`. * tamer/Cargo.lock: Update. * tamer/src/ir/asg/base.rs (with_capacity): Use `None` in place of `Some(Object::Empty)`. * tamer/src/ir/asg/object.rs: Adjust state machine graphic. (Empty): Remove variant. (Missing): Remove reference to variance. * tamer/src/lib.rs: Import `lazy_static` for test builds. * tamer/obj/xmle/writer/writer.rs (Section::iter): Remove `Object::Empty` from documentation. (test::): Remove references to `Object::Missing`. `lazy_static!` used here. * tamer/obj/xmle/writer/xmle.rs (test::write_section_catch_missing): Replace reference to `Object::Missing`.
* [DEV-7085] Create `SortableAsg` traitJoseph Frazer2020-03-168-323/+481
|\ | | | | | | | | | | | | | | | | | | Merge branch 'jira-7085' * jira-7085: TAMER: Tidy up graph_sort test [DEV-7085] Create `SortableAsg` trait [DEV-7085] Implement `PartialEq` for `Sections` [DEV-7085] Move sections to IR module
| * TAMER: Tidy up graph_sort testMike Gerwitz2020-03-131-53/+43
| | | | | | | | | | | | This still isn't comprehensive. Further, it won't be able to be, because we'd have to rely on Petgraph implementation details: there are potentially many acceptable orderings for a given graph.
| * [DEV-7085] Create `SortableAsg` traitJoseph Frazer2020-03-134-59/+205
| | | | | | | | | | | | Create a trait that sorts a graph into `Sections` that can then be used as an IR. The `BaseAsg` should implement the trait using what was originally in the POC.
| * [DEV-7085] Implement `PartialEq` for `Sections`Joseph Frazer2020-03-131-2/+2
| | | | | | | | | | | | We want to be able to easily compare `Sections` in tests, so implementing `PartialEq` (and `Debug`) for both `Sections` and `Section` is required.
| * [DEV-7085] Move sections to IR moduleJoseph Frazer2020-03-136-265/+287
|/ | | | | We need to use `Sections` in both the writer and the ASG so it needs to be in a place that makes sense.
* Allow yaml tests to evaluate assertions and prohibitsAustin Schaffer2020-03-123-9/+28
|\
| * [DEV-7160] Do not allow terminating classifications for test runnerAustin Schaffer2020-03-123-9/+27
| |
| * [DEV-7160] Set neg-yields param in retry templateAustin Schaffer2020-03-121-1/+2
|/
* [DEV-7134] Propagate errorsJoseph Frazer2020-03-097-62/+171
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge branch 'jira-7134' * jira-7134: [DEV-7134] Remove unnecessary node replacement [DEV-7134] Propagate errors from the writer [DEV-7134] Propagate sorting errors [DEV-7134] Propagate errors setting fragments [DEV-7134] Pass read event errors up the stack [DEV-7134] Return error for XmloEvent::SymDecl [DEV-7134] Add alias for LoadResult [DEV-7134] Remove unwrap so we can bubble up error messages [DEV-7134] Escalate the error from finding the absolute path
| * [DEV-7134] Remove unnecessary node replacementJoseph Frazer2020-03-091-20/+4
| | | | | | | | | | The node was being replaced before we were catching errors properly. Now that they are propagated, we should not need the replacement.
| * [DEV-7134] Propagate errors from the writerJoseph Frazer2020-03-092-15/+36
| | | | | | | | | | When an error occurs during the XML writing, they should be shown to the user.
| * [DEV-7134] Propagate sorting errorsJoseph Frazer2020-03-093-7/+18
| | | | | | | | | | If a node is found while sorting that is not expected, we should show the error to the user.
| * [DEV-7134] Propagate errors setting fragmentsJoseph Frazer2020-03-093-12/+106
| | | | | | | | | | | | | | | | If we cannot set a fragment, we need to display the error to the user. We are currently ignoring "___head", "___tail", and objects that are both virtual and overridden. Those will be corrected in with future changes.
| * [DEV-7134] Pass read event errors up the stackJoseph Frazer2020-03-061-5/+1
| |
| * [DEV-7134] Return error for XmloEvent::SymDeclJoseph Frazer2020-03-061-2/+1
| | | | | | | | | | We want more than warnings when a XmloEvent::SymDecl symbol has an unknown "kind".
| * [DEV-7134] Add alias for LoadResultJoseph Frazer2020-03-061-1/+4
| | | | | | | | It looks better and was recommended by Rust's linter.