joshvera
4769c2cb24
regenerate javascript fixtures
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 13:27:37 -05:00
joshvera
5c4dde8d54
fix up test fixtures
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 13:24:46 -05:00
joshvera
80f7c6585d
Fix up tests
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-15 13:17:22 -05:00
joshvera
c7040f6131
fix test type errors
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:46:30 -05:00
joshvera
dba7f17d48
spoke too soon
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:20:35 -05:00
joshvera
680681f944
fix up EvalError in tests
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:19:42 -05:00
joshvera
8a4aa24889
Add a function call example
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:18:52 -05:00
joshvera
0cfd04905a
Add Evaluatable instance for RequiredParameter
...
Declares the name of the param in the scope graph and assigns the Rval's associated scope to the lval's declaration and the rval's value to the lval's slot.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:17:42 -05:00
joshvera
22e1822185
Defer declaring names in the scope graph to param
...
Parameter syntax evaluatable instances are now responsible for adding declarations to the scope graph.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:16:26 -05:00
joshvera
b0d0e2706b
Add putSlotDeclarationScope
...
so we can set the associated scope of a slot
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:15:39 -05:00
joshvera
5c861f412f
Add putDeclarationScopeAtPosition
...
So we can set the associated scope for the declaration of a slot
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:14:58 -05:00
joshvera
fe30b926f7
EvalError types
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:14:31 -05:00
joshvera
127552dbfc
parameterize EvalError by address and value
...
so that we can throw AssignmentRvalError within Assignment or RequiredParameter Evaluatable instances
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:14:02 -05:00
joshvera
3223c97548
Add non-lexical StatementBlock
...
to differentiate between syntax that creates a new lexical scope and function bodies etc.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 19:13:22 -05:00
joshvera
c0be5b6da2
Remove Assignment from RequiredParameter
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 18:57:31 -05:00
joshvera
b690585a78
Add statementTerm for lexical blocks
...
Change statementBlock to construct non-lexical syntax blocks
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-14 18:57:15 -05:00
joshvera
3f4c5d961d
Create a lexical edge to its parent's declaration frame when calling a closure
2018-11-14 15:15:31 -05:00
joshvera
eebae6a1fc
Add pathDeclarationScope
2018-11-14 15:14:58 -05:00
joshvera
4c2716f817
Add lookupDeclarationFrame
2018-11-14 15:14:50 -05:00
joshvera
6877ef1a5e
Add lookupDeclarationScope
2018-11-14 15:14:43 -05:00
joshvera
4da5b012da
Construct a frame for the intermediate import scope
...
So we can look up declarations across heap boundaries
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 18:00:00 -05:00
joshvera
519a6db035
Implement Return
...
impements Return in terms of eval and earlyReturn now that eval returns a ValueRef
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:59:25 -05:00
joshvera
12a038869a
Export Heap and Frame accessors
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:58:49 -05:00
joshvera
1f09735902
Add insertFrameLink
...
in order to add frames that are reachable from the current frame
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:58:37 -05:00
joshvera
0a35a5eee7
Add bindFrames to merge heap frames for now
...
This may not be an ideal solution but populates the current heap with enough information to traverse frames to correct slots
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 17:58:06 -05:00
joshvera
fb5e4400a1
modify test files
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:09:20 -05:00
joshvera
ddb9b31a09
Add imports functions test
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:09:13 -05:00
joshvera
56b85b1070
Don't construct intermediate current scope in QualifedExport eval
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:09:05 -05:00
joshvera
567fe790c9
Construct an import reference from correct start scope
...
Construct an import reference starting from the currentAddress of the target scope graph
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:08:42 -05:00
joshvera
4aac61ea70
Insert a list of scope if label doesn't exist in edge map of target scope
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:08:06 -05:00
joshvera
24720f9f06
Look within references when constructing paths
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 14:07:38 -05:00
joshvera
eb54f7743f
add some heap tests
2018-11-13 12:17:52 -05:00
joshvera
1cb513e441
bind scope graphs in side effect imports without constructing an edge
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-13 12:06:44 -05:00
joshvera
71a73150c9
Ensure we can't look up baz from side effect imports
2018-11-13 12:06:22 -05:00
joshvera
4fed5eb1e7
export baz in a.ts
2018-11-13 12:06:05 -05:00
Rick Winfrey
9d54e063ac
First real passing test 🎉
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:48:11 -08:00
Rick Winfrey
1e88378a51
Return an Rval representing the function body as a closure, instead of returning a Heap address
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:47:44 -08:00
Rick Winfrey
12d27b436c
Update an existing function declaration scope
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:47:24 -08:00
Rick Winfrey
21a9e29b0c
bindAll after evaluating a sideEffectImport
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:46:52 -08:00
Rick Winfrey
7103ba94b7
Declare a function using its name and the full span of the function
...
⚠️ this is a hack to get around the problem of evaluating a functionName (term) in order to retrieve its Span to properly declare the function.
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:46:14 -08:00
Rick Winfrey
d020f71862
Set currentScope and currentFrame after running an initial action
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:43:35 -08:00
Rick Winfrey
cbafcd8114
Add (Show address) for debugging
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-11-09 12:42:43 -08:00
joshvera
f9c6590f61
Remove baz export
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:05:48 -05:00
joshvera
4c02f11edc
add main3.ts
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:05:26 -05:00
joshvera
b28876b8d9
Add imports functions test
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:05:14 -05:00
joshvera
a37c10b7fb
Implement Call in terms of call effect
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:05:04 -05:00
joshvera
ce91cf71db
Remove self argument from call effect
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 13:04:52 -05:00
joshvera
c663c6a2ea
Stub in pathPosition with Position 0
...
⚠️ : This is really bad because we never want to erroneously index into a sequence.
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 12:03:05 -05:00
joshvera
90f37e206b
throw heap errors on Hole paths
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 11:47:15 -05:00
joshvera
ba3b90ab12
resume from heap errors
...
Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
2018-11-09 11:47:04 -05:00