Skip to content

Updates#1

Open
notheotherben wants to merge 49 commits intofgretief:masterfrom
notheotherben:master
Open

Updates#1
notheotherben wants to merge 49 commits intofgretief:masterfrom
notheotherben:master

Conversation

@notheotherben
Copy link
Copy Markdown

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.

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.
Added a test to ensure that errors that are thrown from within child
functions are correctly reported.
Just testing some additional changes to the stack trace reporting code.
Itteration of CLR enumerable objects is now supported through the
clr.itterate function, which returns an itterator to move over a CLR
IEnumerable type.
More fixes in InteropLibTests.lua, broke some of the tests.
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.
Now formats message as "<file>:<line>:<error result as string>"
Now wraps certain exception types in LuaRuntimeException objects to make
them easier to trace.
Overriding more methods to provide Lua specific functionality
Now testing for missing method exceptions in a logical manner.
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.
Enabled a number of "broken" tests, which are now functional given
updates to IronLua.
Now making use of latest SPARTAN563/main builds, allow LanguageContext
to control 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.
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).
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.
Added checks for null keys, return null and throw no error.
Now provides support for tracing variable value get and set operations,
as well as computing the full path to the currently accessed object.
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.
Removed GetScope(path) override, falls back on the default
implementation since it is no longer necessary.
_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.
Now copies all the values from Globals into a new scope's values set
Was already in index when ignore was added to .gitignore.
This is just doing some housekeeping
Allows you to access LuaTable as an IDictionary object, and provides CLR
enumeration support over the table.
No actual functionality just yet.
Provided IDictionary<object,object> and IDictionary<string,object>
interfaces for access to the elements in the table.
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.
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.
notheotherben and others added 19 commits September 21, 2012 00:28
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.
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.
Fixed local function variable definition order to fix possible failure
to access a recursive local function.
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.
Fixed random function, now accepts variable numbers of parameters and
returns the correct values.
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.
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.
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).
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.
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).
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.
Added missing value (and null parent) tests for new changes.
Added debug builds of the DLR (for .NET4) to make debugging easier.
Initial work towards allowing IronLua to generate its own source code
from expressions through the DLR's standard interface.
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant