Updates #1

wants to merge 48 commits into


None yet

1 participant


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.
@SPARTAN563 SPARTAN563 Updated LuaTests_Errors
Added a test to ensure that errors that are thrown from within child
functions are correctly reported.
@SPARTAN563 SPARTAN563 Updated Sample Program
Just testing some additional changes to the stack trace reporting code.
@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.
@SPARTAN563 SPARTAN563 Fixed spelling (itterate -> iterate)
@SPARTAN563 SPARTAN563 Fixed spelling (itterate -> iterate)
More fixes in InteropLibTests.lua, broke some of the tests.
@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.
@SPARTAN563 SPARTAN563 Updated LuaRuntimeException
Now formats message as "<file>:<line>:<error result as string>"
@SPARTAN563 SPARTAN563 Updated LuaScriptCode
Now wraps certain exception types in LuaRuntimeException objects to make
them easier to trace.
@SPARTAN563 SPARTAN563 Updated LuaBinder
Overriding more methods to provide Lua specific functionality
@SPARTAN563 SPARTAN563 Updated InteropLibTests
Now testing for missing method exceptions in a logical manner.
@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.
@SPARTAN563 SPARTAN563 Updated BasicTests
Enabled a number of "broken" tests, which are now functional given
updates to IronLua.
@SPARTAN563 SPARTAN563 Updated DLR Libraries
Now making use of latest SPARTAN563/main builds, allow LanguageContext
to control Scope creation.
@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.
@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).
@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.
@SPARTAN563 SPARTAN563 Updated LuaTable
Added checks for null keys, return null and throw no error.
@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.
@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.
@SPARTAN563 SPARTAN563 Updated LuaContext
Removed GetScope(path) override, falls back on the default
implementation since it is no longer necessary.
@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.
@SPARTAN563 SPARTAN563 Updated LuaContext
Now copies all the values from Globals into a new scope's values set
@SPARTAN563 SPARTAN563 Removed crunchsolution.cache file
Was already in index when ignore was added to .gitignore.
This is just doing some housekeeping
@SPARTAN563 SPARTAN563 Added IDictionary interface
Allows you to access LuaTable as an IDictionary object, and provides CLR
enumeration support over the table.
@SPARTAN563 SPARTAN563 Added DebugLibrary
No actual functionality just yet.
@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.
@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.
@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.
@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.
@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.
@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.
@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.
@SPARTAN563 SPARTAN563 Updated MathLibrary
Fixed random function, now accepts variable numbers of parameters and
returns the correct values.
@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
@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.
@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).
@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.
@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).
@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.
@SPARTAN563 SPARTAN563 Updated LuaTable
Added missing value (and null parent) tests for new changes.
@SPARTAN563 SPARTAN563 Added DLR Debug Builds
Added debug builds of the DLR (for .NET4) to make debugging easier.
@SPARTAN563 SPARTAN563 Added LuaCodeDomGen
Initial work towards allowing IronLua to generate its own source code
from expressions through the DLR's standard interface.
@SPARTAN563 SPARTAN563 Updated
A number of small changes, no need to enumerate them all here...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment