Kevin Millikin
896cf38eca
Stop using some deprecated APIs
...
Change-Id: Id75c317c6728fb2bd5f374e00c8a8f2e8556ded2
Reviewed-on: https://dart-review.googlesource.com/54840
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Kevin Millikin <kmillikin@google.com >
2018-05-14 08:42:07 +00:00
Peter von der Ahé
4f2bdff90b
Rename Program to Component
...
Change-Id: I1a3cc03fba9783807fa637a9d42fdbad68ee7686
Reviewed-on: https://dart-review.googlesource.com/31040
Commit-Queue: Peter von der Ahé <ahe@google.com >
Reviewed-by: Kevin Millikin <kmillikin@google.com >
2018-03-15 12:22:23 +00:00
Kevin Millikin
6fa813d818
Change handling of Kernel static errors
...
Before: Kernel static errors were represented by throwing a distinguished
error or else by calling a distinguished library const constructor.
Now: Kernel static errors are represented by InvalidExpression. To support
error reporting, InvalidExpression has an optional message and a file
offset. A back end can choose to signal these errors at any time; for
example, when deserializing the binary, or when compiling the procedure
containing the static error, or when the erroneous expression is evaluated
at run time.
InvalidStatement is removed because it can be encoded as ExpressionStatement
of InvalidExpression.
Future work:
* supporting static errors where an expression cannot appear in the AST
* allowing InvalidExpression to contain an Expression for error recovery
* adding a top-level list of static errors and warnings to the binary
Bug: https://github.com/dart-lang/sdk/issues/29840
Change-Id: Ifdfe9a76cee6cefed28061bf245be70531d2f413
Reviewed-on: https://dart-review.googlesource.com/31320
Commit-Queue: Kevin Millikin <kmillikin@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Reviewed-by: Konstantin Shcheglov <scheglov@google.com >
2018-01-04 11:00:25 +00:00
Konstantin Shcheglov
50e1444644
Fix fuzzy arrow warnings in kernel.
...
R=ahe@google.com , kmillikin@google.com , paulberry@google.com , sigmund@google.com
Change-Id: Iea7360e5c80342e303ff1bd261754676ac3a057a
Reviewed-on: https://dart-review.googlesource.com/3081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
Reviewed-by: Dan Rubel <danrubel@google.com >
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com >
2017-09-05 17:07:46 +00:00
Zhivka Gucevska
984382b64e
Add support for catch statements.
...
BUG=
R=ashlaura02@gmail.com , dmitryas@google.com
Review-Url: https://codereview.chromium.org/3002003002 .
2017-08-25 13:53:54 +02:00
Zhivka Gucevska
c237e6dbcd
Fix initialization of instance fields.
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/3002013002 .
2017-08-21 18:54:33 +02:00
Zhivka Gucevska
3cac905c54
Implement support for property accessors
...
- Evaluation of PropertyGet expression by accessing a field,
execution of a getter or creating a method tearoff.
- Evaluation of PropertySet expression by setting a field or
execution of a setter.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2999673002 .
2017-08-21 08:38:47 +02:00
Zhivka Gucevska
e89bbf96a5
Implement support for static accessors
...
- Evaluation of StaticPropertyGet expression by reading a value stored in
the main environment, execution of static getter or creating a method tear off.
- Evaluation of StaticPropertySet expression by modifying the value
stored in main environment or execution of static setter.
BUG=
R=dmitryas@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2997563002 .
2017-08-21 08:24:18 +02:00
Zhivka Gucevska
e09b3830cf
Add support for function declarations and function expressions
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2997443002 .
2017-08-21 07:52:20 +02:00
Zhivka Gucevska
115232ada2
Add support for finalizer of TryFinally in labeled statements
...
When a break is encountered in the body of a TryFinally statement to an
enclosing label, the finalizer statement of the TryFinally is executed.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2991113002 .
2017-08-03 16:17:17 +02:00
Zhivka Gucevska
72ba4f6c1c
Add partial support for TryFinally and TryCatch statements
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2985383002 .
2017-08-03 12:51:39 +02:00
Zhivka Gucevska
5e241d86b2
Add support for 'throw' expression
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2987153002 .
2017-08-03 12:36:03 +02:00
Zhivka Gucevska
dde7ce2ab0
Add components for handling of exceptions
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2988153002 .
2017-08-03 11:35:49 +02:00
Zhivka Gucevska
a04c14da7d
Add support for redirecting constructors
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2984423002 .
2017-08-03 11:12:16 +02:00
Zhivka Gucevska
4aab6a4a49
Add support for super initializers in constructor initializer list
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2990943002 .
2017-08-03 09:00:16 +02:00
Zhivka Gucevska
66426a2b1c
Add support for initializers in constructor invocation
...
This adds support for field and local initialziers
for constructor invocation.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2986973002 .
2017-08-02 12:57:23 +02:00
Zhivka Gucevska
2331199968
Add support for field initialization in objects
...
Fields declared as T f = E are now initialized to the value
expression E evaluates to.
Fields without initalizer expression are intialized with null.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2985883002 .
2017-07-27 13:47:12 +02:00
Zhivka Gucevska
43cf49a717
Add support for running constructors with new
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2984903002 .
2017-07-25 17:24:15 +02:00
Zhivka Gucevska
3e563c6e9e
Modify class definition in interpreter according to spec:
...
- Populate implicit getters and setters.
- Populate instance methods, getters and setters.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2987573002 .
2017-07-21 12:37:11 +02:00
Zhivka Gucevska
0e07361eb5
Store field locations instead of values in objects
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2979293002 .
2017-07-20 10:35:26 +02:00
Zhivka Gucevska
cbafc38513
Remove unused private methods in interpreter
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2978193002 .
2017-07-18 13:48:09 +02:00
Zhivka Gucevska
d62ff42f0e
Add support for binding 'this'
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2978893002 .
2017-07-18 13:18:54 +02:00
Zhivka Gucevska
1288ece5c8
Introduce statement continuations following the specification
...
The next statement to be executed is captured by a statement
continuation.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2975173002 .
2017-07-18 13:03:39 +02:00
Zhivka Gucevska
77ae919a46
Rename continuations according to Kernel semantics specification
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2979843002 .
2017-07-13 10:48:08 +02:00
Zhivka Gucevska
76ff97880b
Rename configurations according to specification
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2975893002 .
2017-07-13 10:09:35 +02:00
Zhivka Gucevska
8e52eea681
Modify environment binding to bind variable declarations to locations
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2980483002 .
2017-07-13 09:54:43 +02:00
Zhivka Gucevska
e68b664383
Add support for execution of constructor body
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2880343002 .
2017-05-18 15:30:22 +02:00
Zhivka Gucevska
4030e2de6c
Modify new instance allocation
...
A fresh new instance should be allocated after the evaluation of the
argument list for the constructor.
This change modifies the ConstructorInvocation application continuation
to allocate a new object and introduces :
* continuation applications for Redirecting and Super constructor
invocations, applied on evaluated arguments for Redirecting and Super
constructors respectively
* expression continuation for instance initialization, applied to the
new instance
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2888913002 .
2017-05-18 12:31:20 +02:00
Dmitry Stefantsov
60be18b4a9
Add tool to extract LaTeX-formatted text from comments in Dart programs
...
R=zhivkag@google.com
Review-Url: https://codereview.chromium.org/2889953002 .
2017-05-18 10:48:29 +02:00
Zhivka Gucevska
d4b73fd9ee
Refactor string concatenation evaluation
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2883813004 .
2017-05-16 12:53:44 +02:00
Zhivka Gucevska
614f9207b6
Add support for super constructor invocation
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2881053002 .
2017-05-15 13:58:42 +02:00
Zhivka Gucevska
c545954a2a
Add tests for initializer list execution in object initialization
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2883823003 .
2017-05-15 12:14:18 +02:00
Zhivka Gucevska
1dc564bc13
Fix local initializer execution
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2874253002 .
2017-05-15 09:54:09 +02:00
Zhivka Gucevska
eae9c60eb7
Add suport for initializer list execution in constructor invocation
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2877733002 .
2017-05-11 12:39:24 +02:00
Zhivka Gucevska
62c0be200e
Add support for redirecting constructors and instance field initialization
...
Instance fields only in immediately enclosing class are initialized.
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2870263003 .
2017-05-11 11:45:31 +02:00
Zhivka Gucevska
8ea3c3b3e6
Refactor argument evaluation for static invocation
...
BUG=
R=dmitryas@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2871953002 .
2017-05-10 11:11:32 +02:00
Zhivka Gucevska
184cc25766
Add initial tests for Kernel interpreter
...
Add logging in the Interpreter for:
- StaticInvocationExpression, including calls to print
- ReturnStatement
- IfStatement
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2841803002 .
2017-05-01 16:12:27 +02:00
Zhivka Gucevska
2860c9cb1b
Add support for static invocation with arguments
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2832873004 .
2017-04-24 10:14:23 +02:00
Zhivka Gucevska
4f59c41c5f
Remove state for expression evaluation
...
BUG=
R=dmitryas@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2833733003 .
2017-04-21 10:11:06 +02:00
Zhivka Gucevska
b00a85231e
Parametrize over the additional agrument type for StatementVisitor1 and ExpressionVisitor1
...
BUG=
R=dmitryas@google.com
Review-Url: https://codereview.chromium.org/2835453002 .
2017-04-20 18:03:15 +02:00
Zhivka Gucevska
feb38e4c8b
Implement expression evaluation in Coninuation Passing Style
...
This enables support for Return statements.
BUG=
R=dmitryas@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2806483003 .
2017-04-20 15:22:33 +02:00
Zhivka Gucevska
c91fd31036
Implement flow control with breaks
...
BUG=
R=dmitryas@google.com , kmillikin@google.com
Review-Url: https://codereview.chromium.org/2790063002 .
2017-04-05 13:00:44 +02:00
Zhivka Gucevska
b01acf32d7
Fix Setter lookup
...
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2795883003 .
2017-04-04 14:52:50 +02:00
Zhivka Gucevska
1851ca685e
Change layout of fields in a object values
...
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2781453002 .
2017-03-28 11:19:16 +02:00
Zhivka Gucevska
23cc114c2f
Implements simple statement executer
...
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 .
2017-03-28 10:23:15 +02:00
Zhivka Gucevska
02251a05eb
Add support for implicit getters and setters
...
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2764073002 .
2017-03-24 16:04:02 +01:00
Zhivka Gucevska
80a334512a
Add representation for object values
...
It also adds few operators for the Basic literals for testing purposes.
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2764823002 .
2017-03-21 13:17:33 +01:00
Zhivka Gucevska
bd3cfd6979
Implements support for variables and evaluation of logic expressions
...
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2740433006 .
2017-03-15 12:50:16 +01:00
Zhivka Gucevska
1b82e0c3a0
Initial implementation of interpreter for Kernel
...
Basic framework, evaluation of BasicLiterals and dummy evaluation
of print.
BUG=
R=kmillikin@google.com
Review-Url: https://codereview.chromium.org/2722283003 .
2017-03-02 13:19:27 +01:00