from front_end/lib/src/fasta/analyzer/
to analyzer/lib/src/fasta/
analyzer_compile and compile_platform_dartk moved
from front_end/lib/src/fasta/analyzer/
to front_end/tool/_fasta/
front_end/src/fasta/testing/* continues to have some shared testing logic,
- logic to compute the patched sdk is moved up one level
- TestContext, Run, and suite.dart (which depend on analyzer) moved to pkg/front_end/test/fasta/testing/
- only a copy of TestContext is duplicated under pkg/kernel/test/closure/.
R=ahe@google.com, paulberry@google.com
Review-Url: https://codereview.chromium.org/2828583003 .
1. A --platform flag is added to dart to give a path to a Kernel
binary for the platform libraries (as produced by building the
runtime_kernel target).
2. This binary is used for bootstrapping. Since it contains libraries
other then the VM's bootstrap libraries, they are also loaded.
3. The frontend does not send any library with a dart: import URI
scheme. Note that it does not (yet) prune the canonical name
table, which will contain a lot of unnecessary names used for
internal linkages in the platform libraries.
4. There is a single dependency in the platform libraries on the
script: _getMainClosure in dart:_builtin. This is patched after
the script is loaded.
BUG=
R=ahe@google.com, kustermann@google.com, vegorov@google.com
Review-Url: https://codereview.chromium.org/2786083002 .
This CL makes four classes:
- TypeInferrer, which is the API for type inference within a method
body or field initializer, used by BodyBuilder.
- TypeInferrerImpl, which is the generic implementation of
TypeInferrer.
- TypeInferenceEngine, which is the API for top level type inference
and for creating TypeInferrers.
- TypeInferenceEngineImpl, which is the generic implementation of
TypeInferenceEngine.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2830313002 .
This CL hooks up enough infrastructure for doing simple top level type
inference of variables whose initializer is an int.
Additional type inference rules will be added in follow-up CLs.
R=karlklose@google.com
Review-Url: https://codereview.chromium.org/2828253003 .
This is necessary because some of the TypeInferrer's roles (e.g. type
promotion and determination of the types of constants) are still
needed in non-strong mode.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2829683008 .
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 .
In a future CL I need to add an import to this file, and for reasons I
haven't been able to track down, doing so causes type inference
failures. This CL works around the problem by making the affected
types explicit.
Once the bug is fixed, I hope to be able to revert this.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2833563004 .
The framework will allow test source files to be annotated with
comments indicating where types are expected to be inferred, for
example:
var /*@type=dart.core::int*/ x = 1;
Other features of the testing framework:
- Normally only those expectations explicitly listed will be checked.
The special comment "/*@testedFeatures=inference*/" at the top of
the file turns on extra checking which will cause the test to fail
if any unexpected type inference occurs.
- Should be easy to extend to support other features, such as checking
that the proper errors and warnings are generated at the proper
locations.
- If the test is run with "-DupdateExpectations=true", the
expectations will be updated in place.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2824393002 .
Change the front_end's shadow class hierarchy so that instead of
containing implementation classes and mixin classes, it only contains
implementation classes. The mixins proved to be unnecessary.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2819423004 .
Retrying https://codereview.chromium.org/2803563003
* update analyzer.Keyword list to include all of the fasta keywords
* enhance the analyzer scanner keyword table to handle uppercase
keywords such as "Function"
* update analyzer's parser to process the new KeywordTokens
* fix analyzer error verification
* update translation of fasta <--> analyzer tokens
* update tests and cleanup analyzer warnings
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2799133003 .
* update analyzer.Keyword list to include all of the fasta keywords
* enhance the analyzer scanner keyword table to handle uppercase
keywords such as "Function"
* update analyzer's parser to process the new KeywordTokens
R=brianwilkerson@google.com
Review-Url: https://codereview.chromium.org/2803563003 .