Tom Alexander
71592a9a32
Switching back to a Vec because inserting multiple elements into the linked list structure while maintaining ownership of each node proved to be difficult.
2020-06-06 22:24:27 -04:00
Tom Alexander
77b842f8de
Implement IntoContextElement for ParametersContext.
2020-06-06 20:48:29 -04:00
Tom Alexander
02259b9bd6
Create from_borrowed and from_owned constructors for IceResult and BreadcrumbTreeElement.
...
In an effort to keep track of how often memory is getting heap allocated, I am implementing constructors for IceResult and BreadcrumbTreeElement. This should limit the places that I call Rc::new and allow me to place tracing code into it later to ensure all code paths doing heap allocation make sense.
2020-06-06 20:24:01 -04:00
Tom Alexander
3c15e35b67
Finished constructor for ParametersContext.
2020-06-06 20:02:50 -04:00
Tom Alexander
ed7d80de6c
Handling RVPath for ParametersContext constructor.
2020-06-06 19:57:33 -04:00
Tom Alexander
f9dea70d23
Implement conversion from IceResult into BreadcrumbTreeNode.
...
I believe this change will remove an extra heap allocation I was doing in the new_breadcrumbs_* functions for the explicit context by adding support for converting from Rc<dyn ContextElement> to Rc<dyn IntoContextElement> without copying the underlying data. This should allow conversion of the IceResult::Owned variant to the BreadcrumbTreeElement::Owned variant without extra copying.
2020-06-06 19:39:44 -04:00
Tom Alexander
7253c7d99e
Implement function to convert IceResult into a BreadcrumbTreeElement.
2020-06-06 18:37:35 -04:00
Tom Alexander
18c1687064
Starting the constructor for ParametersContext.
2020-06-06 18:15:11 -04:00
Tom Alexander
f4f309caad
Working implementation of into_context_element for RValue.
2020-06-06 18:10:30 -04:00
Tom Alexander
303f092c30
Running into lifetime issues again.
2020-05-31 23:47:20 -04:00
Tom Alexander
da15439946
Start of IceResult to return owned values from into_context_element.
2020-05-31 23:29:12 -04:00
Tom Alexander
7789e6245d
I need to be able to returned owned data from into_context_element.
2020-05-31 22:35:46 -04:00
Tom Alexander
064027e77b
Worked around a lifetime issue with into_context_element.
2020-05-31 22:31:05 -04:00
Tom Alexander
b74dc394a8
Switched to returning an Option for into_context_element().
2020-05-31 22:17:58 -04:00
Tom Alexander
3aaf7f9987
I think I need to make into_context_element return an Option.
...
The reason is, missing values for paths are not equal to null so I can't use an OwnedLiteral unless I create a special "walking failed" OwnedLiteral.
2020-05-31 22:06:12 -04:00
Tom Alexander
09e0b046a0
Copy over the implementation of ContextElement for OwnedLiteral which will be the result of calling IntoContextElement on RValues.
2020-05-31 21:59:24 -04:00
Tom Alexander
ff74d78fdb
Starting the new parameters context object.
2020-05-31 21:46:00 -04:00
Tom Alexander
a578b57f12
Switch the call for IntoContextElement back to a static integer so it compiles again.
2020-05-31 13:21:47 -04:00
Tom Alexander
21b9e9282b
Ran into issue: Can't returned owned data when its expecting a trait object.
2020-05-30 18:28:33 -04:00
Tom Alexander
737c98d8b7
Add the renderer to calls to convert to a context element.
2020-05-30 18:16:58 -04:00
Tom Alexander
917da5a073
Put IntoContextElement everywhere. It compiles again.
2020-05-30 17:50:27 -04:00
Tom Alexander
975ab278ef
Starting an IntoContextElement trait to allow for delayed evaluation.
2020-05-30 16:34:32 -04:00
Tom Alexander
3c9a369908
Skipping over pseudo contexts has fixed most of the tests.
2020-05-30 11:50:55 -04:00
Tom Alexander
966499db76
Switch the get_loop_elements implementation to only return populated arrays when its an array-like object.
2020-05-24 16:27:13 -04:00
Tom Alexander
59ee4f508f
Add a new trait to ContextElement for Truthiness.
...
Before I was relying on Loopable to both determine truthiness and get a list of elements to loop over. This will no longer work since I need to only set $idx and $len when iterating over actual arrays, as opposed to all truthy values, so I've finally made truthiness explicit.
2020-05-24 16:16:43 -04:00
Tom Alexander
39c579171b
Rename the new functions to replace the old functions.
2020-05-24 15:21:30 -04:00
Tom Alexander
4790ac77d6
Initial implementation combining owned_walk_path and walk_path. Works everywhere except one spot.
2020-05-24 14:56:09 -04:00
Tom Alexander
03a8328148
Fix the equality test.
2020-05-16 23:19:02 -04:00
Tom Alexander
c905e705ff
Transition to new literals compiling.
...
Tests still need work, as does the implementation for json.
2020-05-16 22:31:40 -04:00
Tom Alexander
bc25c1ee16
Starting to remove the old RValues.
2020-05-16 22:19:51 -04:00
Tom Alexander
16d8891452
Implement partial_compare for OwnedLiteral.
2020-05-16 22:08:03 -04:00
Tom Alexander
bf35fd0ae4
equals implementation for literal.
2020-05-16 22:02:58 -04:00
Tom Alexander
6519add838
Starting an OwnedLiteral type instead of using rust's built-in primitives.
2020-05-16 21:52:44 -04:00
Tom Alexander
dd160c5708
Hitting an infinite loop on compare string and int.
2020-05-16 21:34:45 -04:00
Tom Alexander
8748cb7063
Structure for ordering, need to implement for serde_json::Value.
2020-05-16 13:31:52 -04:00
Tom Alexander
9ee8f41022
Implement the render send of integer literals.
2020-05-10 23:11:16 -04:00
Tom Alexander
7dd824ab4f
cleaning up.
2020-05-10 22:40:47 -04:00
Tom Alexander
68639481f5
Implement a real clone for ParametersContext.
2020-05-10 22:35:17 -04:00
Tom Alexander
6297fa0189
Rename NewParametersContext to ParametersContext.
2020-05-10 22:21:18 -04:00
Tom Alexander
75ba35a422
Cleaning up.
2020-05-10 22:20:39 -04:00
Tom Alexander
2fb7ca9db7
Making CastToAny more generic.
2020-05-10 22:05:48 -04:00
Tom Alexander
9baa669dea
Separating out CastToAny.
2020-05-10 22:04:41 -04:00
Tom Alexander
dade738f55
The structure is all there, just need to implement owned_walk_path and clone on NewParametersContext.
2020-05-10 21:34:18 -04:00
Tom Alexander
4e274b9ea5
Running into the walking issue again.
2020-05-10 21:28:47 -04:00
Tom Alexander
32abe41e1a
Generic implementation of CompareContextElement.
2020-05-10 21:11:49 -04:00
Tom Alexander
256051220d
Generic implementation of CloneIntoBoxedContextElement.
2020-05-10 21:07:31 -04:00
Tom Alexander
8fd2a9cf39
tentatively seems to be working.
2020-05-10 19:16:55 -04:00
Tom Alexander
c96b2257d7
Compiling.
...
Need to see if I can do a generic implemented of IntoBoxedContextElement for all objects implementing Copy, and I need to implement the compare code to make sure this all works before I start integrating this more.
2020-05-10 19:07:41 -04:00
Tom Alexander
5c79b436a0
Commenting out the parameterscontext type.
2020-05-10 19:01:02 -04:00
Tom Alexander
6fb329388f
Not having much luck.
2020-05-10 18:45:54 -04:00