Due to the tight coupling between analyzer and front_end, they need to
be published atomically. The last published version of kernel is old
enough that it needs to be published too.
I've bumped the versions to the following, and changed the
dependencies so that this set of versions is mutually compatible:
- analyzer: 0.30.0-alpha.3
- front_end: 0.1.0-alpha.2
- kernel: 0.2.0
(Note that kernel's version didn't need bumping since the most
recently published version of it is 0.1.0)
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2828273003 .
- Instead of a pointer to new'd memory, Kernel strings now have an
offset from the start of the string data.
- When the streaming reader encounters the string data it records the
offset from the start of the binary. This offset is stored in the
Kernel Program and is used to compute the offset for strings.
- When a KernelReader is constructed, the string data is copied into a
Uint8 array in the VM's heap.
- A pointer to the string data is put into every Kernel script so it
can be used for constructing VM strings at compile time.
The source table does not use Kernel strings any more because those
strings are not found in the raw string data. Instead, the source
table uses new'd buffers for strings (but this will be cleaned up
separately).
R=jensj@google.com
Review-Url: https://codereview.chromium.org/2820363002 .
This CL introduces Fasta's first type inference rule, and hooks it up
to all the necessary testing infrastructure. The rule is that a local
variable whose initializer is an integer literal should have an
inferred type of int.
Only variables occurring at top level within a method are inferred (we
don't yet recurse inside sub-blocks).
Additional type inference rules will be added in follow-up CLs.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2828693003 .
Instead of a list of strings given by their length and UTF-8 encoding,
restructure the string table to consist of a list of string ending
offsets followed by a blob of UTF-8 encoded strings without lengths.
This is a step toward copying the string blob into the VM's heap and
building a heap-allocated structure to give random access to them.
BUG=
R=asgerf@google.com, jensj@google.com
Review-Url: https://codereview.chromium.org/2790073004 .
A new AST node 'ClosureCreation' is added. It takes a name of a
top-level function, a context, and a closure function type and creates a
closure of the given type. The effect of this closure invocation is the
same as of the invocation of the given top-level function with the
contexts as the first argument.
In order to use 'ClosureCreation', the closure conversion pass now
transforms closures into top-level functions, not closure classes. These
functions receive the context as the first argument.
The type of the expression represented by 'ClosureCreation' is its third
parameter. It its the responsibility of closure conversion pass to
create the correct types for 'ClosureCreation' nodes based on types of
closures transformed into top-level functions.
R=asgerf@google.com
Review-Url: https://codereview.chromium.org/2778223002 .
Before: Canonical names contained pointers to the corresponding Kernel
tree which assumed that the whole tree was in memory whenever the
canonical names were.
Now: Canonical names do not contain these pointers. They were only
really used to perform name-based lookup in the VM's heap so the
canonical name itself is enough.
If we later find that we need to get from a canonical name to its
Kernel tree we can add an offset in the binary (for instance) to the
canonical name or in a separate mapping on the side.
BUG=
R=asgerf@google.com, jensj@google.com, vegorov@google.com
Committed: https://github.com/dart-lang/sdk/commit/ed77783cd32d55fdad61bf9bc749030847ba9384
Review-Url: https://codereview.chromium.org/2781893004 .
Before: Canonical names contained pointers to the corresponding Kernel
tree which assumed that the whole tree was in memory whenever the
canonical names were.
Now: Canonical names do not contain these pointers. They were only
really used to perform name-based lookup in the VM's heap so the
canonical name itself is enough.
If we later find that we need to get from a canonical name to its
Kernel tree we can add an offset in the binary (for instance) to the
canonical name or in a separate mapping on the side.
BUG=
R=asgerf@google.com, vegorov@google.com
Review-Url: https://codereview.chromium.org/2781893004 .
This change adds support for executing:
- BlockStatement
- ExpressionStatement
- IfStatement
- VariableDeclaration
Currently only BlockStatement introduces a new environment and
VariableDeclaration modifies the environment.
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2775293002 .
There are four operations that work on Vectors: Vector creation, looking
up an item in a Vector, assigning a value to an item in a Vector, and
copying a Vector. The first three operations are allowed to only use
integer literals as number operands (length for Vector creation, index
for item lookup and assignment). Corresponding AST nodes are created for
these operations.
Vectors are used to represent contexts in Closure Conversion. The parent
context is stored as item 0 in its children contexts. The "golden" tests
for this transformation are adjusted accordingly.
The support for Vectors is added to ast-to-text, ast-to-binary, and
binary-to-ast transformations.
R=asgerf@google.com, kmillikin@google.com
Review-Url: https://codereview.chromium.org/2767773004 .
This CL moves many of the files from
pkg/front_end/lib/src/fasta/analyzer/ to pkg/analyzer/lib/src/fasta/.
It also moves two files from pkg/kernel/lib/analyzer/ to
pkg/analyzer/lib/src/kernel/.
This reduces the amount of circularity between analyzer and
front_end/kernel so that there are no files in front_end or kernel
which are both dependend upon by analyzer and depend upon analyzer. I
will clean up the remaining circularities in future CLs.
There should be no functional change.
R=ahe@google.com, asgerf@google.com, kmillikin@google.com, scheglov@google.com, sigmund@google.com
Review-Url: https://codereview.chromium.org/2756593004 .
All generic methods are equipped with one extra named parameter for
passing type arguments as a list of type values.
Additinally, this change forces strong mode usage for 'dartk' in
'reified_dart'. Strong mode is required for loader to not strip away
type arguments from generic methods. In future, a command line argument
may be implemented for that (e.g. --generic-methods), if generic method
support will land before the strong mode.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2713163002 .
After 89b68e905b debugging of async
functions via kernel haven't worked.
Prior to this the dartAsyncMarker for e.g. a rewritte async function
would have been Sync, after it was Yielding.
This changes it back in the continuations rewriting cases.
An alternative fix would be to change
function.set_is_debuggable(
kernel_procedure->function()->dart_async_marker() == FunctionNode::kSync);
to something like
function.set_is_debuggable(
kernel_procedure->function()->dart_async_marker() == FunctionNode::kSync ||
kernel_procedure->function()->dart_async_marker() == FunctionNode::kYielding);
in the C++ code.
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2743283002 .