Updates #1

Open
wants to merge 48 commits into
from

Projects

None yet

1 participant

@SPARTAN563

Keep This Open

Figured I would start a pull request here so we have a line of communication about where the project is headed?

What I'm Working On [SPARTAN563]

Currently rewriting most of the debug code again (going to try and make use of Microsoft.Scripting.Runtime.DebugContext and all of its linked stuff. Looks like to do so I will need to change a number of things in how we handle LuaContext.
I am also working towards making it safe to run multiple concurrent (and non-conflicting) code paths off the same engine. At the moment that isn't possible with the way engine Globals are handled and how we do metamethod lookups. I'm planning on implementing a CodeContext object which will act as a go between between LuaContext (our engine) and the actual code. This should allow us to manage nice separate stacks for the debug library, and even permit us to enable setenv() functionality. I'll update this post as I continue work on it.

SPARTAN563 added some commits Sep 16, 2012
@SPARTAN563 SPARTAN563 Updated LuaTrace Support
Now capable of tracing a lot more information about the execution of a
script. This includes:
- Function names for Lua functions
- Variable access
- Host variables for non-Lua functions (for stack traces)
- Current document filename
- Currently evaluating source code
- Tracing calls to metamethods

Also updated LuaRuntimeException to print well formatted merged stack
traces which cross CLR->Lua->CLR boundaries in a sensical way.
eef062e
@SPARTAN563 SPARTAN563 Updated LuaTests_Errors
Added a test to ensure that errors that are thrown from within child
functions are correctly reported.
b53d3fb
@SPARTAN563 SPARTAN563 Updated Sample Program
Just testing some additional changes to the stack trace reporting code.
b274c37
@SPARTAN563 SPARTAN563 Added tests and support for IEnumerable itteration
Itteration of CLR enumerable objects is now supported through the
clr.itterate function, which returns an itterator to move over a CLR
IEnumerable type.
c7bd433
@SPARTAN563 SPARTAN563 Fixed spelling (itterate -> iterate)
Woops...
6e60f57
@SPARTAN563 SPARTAN563 Fixed spelling (itterate -> iterate)
More fixes in InteropLibTests.lua, broke some of the tests.
860bf10
@SPARTAN563 SPARTAN563 Updated InteropLibrary
Added support for Enumeration types, allowing access as either a member
or index.
Added error catching for get and set value operations, as well as more
descriptive error messages for these errors.
563649d
@SPARTAN563 SPARTAN563 Updated LuaRuntimeException
Now formats message as "<file>:<line>:<error result as string>"
428836a
@SPARTAN563 SPARTAN563 Updated LuaScriptCode
Now wraps certain exception types in LuaRuntimeException objects to make
them easier to trace.
167a841
@SPARTAN563 SPARTAN563 Updated LuaBinder
Overriding more methods to provide Lua specific functionality
8513a28
@SPARTAN563 SPARTAN563 Updated InteropLibTests
Now testing for missing method exceptions in a logical manner.
6a2689f
@SPARTAN563 SPARTAN563 Default ScriptScope storage is now LuaTable
Added an extension method which allows you to create a "LuaScope", which
is a ScriptScope object using a LuaTable as the backing store for
variables. This allows the use of metatables, and metamethods and
generally allows the ScriptScope to behave as the Lua _G object should.

Updated tests and other methods to support this, as well as adding
custom support for this particular scope type into LuaContext for
[Get,TryGet,Get<T> and Set]ScopeVariable operations.
d3af4b0
@SPARTAN563 SPARTAN563 Updated BasicTests
Enabled a number of "broken" tests, which are now functional given
updates to IronLua.
9602eb7
@SPARTAN563 SPARTAN563 Updated DLR Libraries
Now making use of latest SPARTAN563/main builds, allow LanguageContext
to control Scope creation.
8827107
@SPARTAN563 SPARTAN563 Updated LanguageContext to support Scope creation
Supports the latest changes in the DLR which allow a LanguageContext to
control creation of its own scopes, thus allowing us to set LuaTable as
the default scope backing store for all created scopes.
74c1462
@SPARTAN563 SPARTAN563 Updated DLR Libraries
Now making use of the latest SPARTAN563/main builds. No changes since
the last update, but recompiled from the latest HEAD (rebuilt due to
Encoding issues).
095af93
@SPARTAN563 SPARTAN563 Updated Generator and LuaScope
Fixed issues with returning to parent scope for DO<block>END statements
(also no longer creates unused scope).
Fixed GlobalGet instructions being registered as GlobalSets.
Added variable names for local variable expressions to make debugging
errors easier.
795f10a
@SPARTAN563 SPARTAN563 Updated LuaTable
Added checks for null keys, return null and throw no error.
d2c7e24
@SPARTAN563 SPARTAN563 Updated LuaTrace
Now provides support for tracing variable value get and set operations,
as well as computing the full path to the currently accessed object.
537bf50
@SPARTAN563 SPARTAN563 Updated LuaTrace
Traces scope entry and exit to allow local variable access information
to be dumped from the variable access stack as soon as the current scope
is left. Also added a test to LuaTests_Errors which tests this
information for correctness.
ba310f7
@SPARTAN563 SPARTAN563 Updated LuaContext
Removed GetScope(path) override, falls back on the default
implementation since it is no longer necessary.
156d5d7
@SPARTAN563 SPARTAN563 Updated BaseLibrary and LuaContext
_G and _ENV are now set by BaseLibrary on every scope which is
initialized by LuaContext. This allows each context to redefine
functions in its scope without breaking global values.
d2f9597
@SPARTAN563 SPARTAN563 Updated LuaContext
Now copies all the values from Globals into a new scope's values set
21b358b
@SPARTAN563 SPARTAN563 Removed crunchsolution.cache file
Was already in index when ignore was added to .gitignore.
This is just doing some housekeeping
2c1c1af
@SPARTAN563 SPARTAN563 Added IDictionary interface
Allows you to access LuaTable as an IDictionary object, and provides CLR
enumeration support over the table.
c7d951e
@SPARTAN563 SPARTAN563 Added DebugLibrary
No actual functionality just yet.
880c9dc
@SPARTAN563 SPARTAN563 Merge remote-tracking branch 'upstream/master' 62b592f
@SPARTAN563 SPARTAN563 Updated LuaTable
Provided IDictionary<object,object> and IDictionary<string,object>
interfaces for access to the elements in the table.
44f8188
@SPARTAN563 SPARTAN563 Start work on CodeContext Implementation
Uses CodeContext to provide code-instance specific storage, for example
stack storage. This allows multiple simultaneous execution paths using
different code instances, without the possibility of one execution scope
manipulating another's data.
Also moving towards implementing
Microsoft.Scripting.Runtime.DebugContext as the debugger/tracer instead
of our custom implementation in LuaTrace.
eed016e
@SPARTAN563 SPARTAN563 Continuing work on CodeContext Implementation
Massive overhauls of large portions of the code, as well as implementing
custom Expression types for internal operations.
Currently in a non-compilable state, with a lot of errors which need to
be fixed, and new functionality which needs to be added before it is
ready for testing.
47c96d1
@SPARTAN563 SPARTAN563 Continuing work on CodeContext Implementation
Currently working on getting IronLua back to a compilable (and runnable)
state. It currently passes most tests, but fails on syntax trees where
NaN checking is done (since the LuaRuntimeException constructors are
marked as internal. We will need to fix that before we can continue.
When that is done, then we need to add support for rewriting lambda
expressions for debug operations, and run some tests for closure support
(should work given how the DLR is written, out of the box, but we will
need to see). Also need to add tests for custom environments for
different functions (it is now present in CodeContext, and just needs to
be enabled in BaseLibrary).

Then I need to clean up the code, and remove some expression types which
I added but am not using. Maybe also add some new expression types to
represent different things which may change, and which we can optimize
the Expression tree by formatting depending on those changes.
9fd1df7
@SPARTAN563 SPARTAN563 Merge remote-tracking branch 'upstream/master' bfa3b5d
@SPARTAN563 SPARTAN563 Merge remote-tracking branch 'upstream/master' into codecontext 1380ec7
@SPARTAN563 SPARTAN563 Continuing work on CodeContext Implementation
Fully functional now, all tests passing as they should as well as some
new tests to ensure that closures and function environments are working
correctly. We still need to get debug tracing working correctly, and
implement the DebugContext handlers before we have most of the TODO
stuff completed, but the backend is now correctly rewritten.
be34eaf
@SPARTAN563 SPARTAN563 Merge remote-tracking branch 'origin/codecontext' 82b49c0
@SPARTAN563 SPARTAN563 Updated Generator
Fixed local function variable definition order to fix possible failure
to access a recursive local function.
51e03eb
@SPARTAN563 SPARTAN563 Added Tests
Added tests for a number of advanced scenarios, including redefining
functions, and getting a quick performance benchmark. Also testing
MathLibrary and some quirky function behaviours.
859761f
@SPARTAN563 SPARTAN563 Updated MathLibrary
Fixed random function, now accepts variable numbers of parameters and
returns the correct values.
132923f
@SPARTAN563 SPARTAN563 Updated CodeContext and LuaContext
Made requests for libraries initialize them on demand, that way
preventing the overhead of loading a base library if the user doesn't
ever use it. Also fixed "math" initializing a new BaseLibrary instead of
MathLibrary.
01ec10b
@SPARTAN563 SPARTAN563 Updated Lua
Added extension method for ScriptEngine which allows you to compile a
given code snippet into a ScriptCode object which can be executed
repeatedly without needing to parse the syntax tree again.
6699578
@SPARTAN563 SPARTAN563 Performance Optimizations
Added some compile-time optimizations for global member access (in
particular, determining at compile time whether an identifier represents
a native library or not). This has shaved a massive amount of time off
of our global member accesses, particularly on the first run (which is
now almost as fast a subsequent runs).
81d950a
@SPARTAN563 SPARTAN563 Updated
General housekeeping and fixing of test-breaking bugs. Attempting to get
IronLua to run some of Lua 5.2.1's test fixtures without failing, and
generally fixing things that were modified in the latest large patch.
562791f
@SPARTAN563 SPARTAN563 Performance Optimizations + Tests
Added caching to LuaTable, will now remember the last index that was
accessed, this provides a rather large performance increase when
performing the same access on the table (for example, accessing the same
function from within a loop).
ed65847
@SPARTAN563 SPARTAN563 Updated LuaTable
Added readonly parent table functionality, should allow us to use static
C# code for handling decisions regarding which tables to access for
Global/Library functions. Should also ensure that the correct values are
returned when selecting a key present in both tables.
eeedc5a
@SPARTAN563 SPARTAN563 Updated LuaTable
Added missing value (and null parent) tests for new changes.
61fcc1d
@SPARTAN563 SPARTAN563 Added DLR Debug Builds
Added debug builds of the DLR (for .NET4) to make debugging easier.
5c52b80
@SPARTAN563 SPARTAN563 Added LuaCodeDomGen
Initial work towards allowing IronLua to generate its own source code
from expressions through the DLR's standard interface.
ebf92d4
@SPARTAN563 SPARTAN563 Updated
A number of small changes, no need to enumerate them all here...
637bdac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment