You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to simplify the implementation of stepping through the drawing instructions, setting break points, and the nesting of pictures inside each other (modeled as procedure calls) it seems like a good idea to build a simple VM layer specialized on doing vector math.
But it's just a rough sketch and it's not in use yet.
It would work as follows:
A picture consists of a Procedure containing the drawing instructions (represented as AST)
The Drawing instructions would be compiled into VM byte code
That byte code would then be executed by the VM/runtime
The result would be a list of shapes
Currently the AST is executed by the runtime directly.
Converting the AST into a linear sequence of instructions would also allow better tracking of runtime errors and preventing long running code (loops, recursion) by injecting control points into the sequence.
The text was updated successfully, but these errors were encountered:
In order to simplify the implementation of stepping through the drawing instructions, setting break points, and the nesting of pictures inside each other (modeled as procedure calls) it seems like a good idea to build a simple VM layer specialized on doing vector math.
I already started to implement that here:
https://github.com/laszlokorte/reform-swift/blob/master/ReformCore/ReformCore/VM.swift
But it's just a rough sketch and it's not in use yet.
It would work as follows:
A picture consists of a Procedure containing the drawing instructions (represented as AST)
The Drawing instructions would be compiled into VM byte code
That byte code would then be executed by the VM/runtime
The result would be a list of shapes
Currently the AST is executed by the runtime directly.
Converting the AST into a linear sequence of instructions would also allow better tracking of runtime errors and preventing long running code (loops, recursion) by injecting control points into the sequence.
The text was updated successfully, but these errors were encountered: