Erik Corry
c6a199e40b
Sort class IDs before training AppJIT snapshots
...
R=fschneider@google.com , rmacnak@google.com
BUG=
Review-Url: https://codereview.chromium.org/2699853002 .
2017-02-20 12:14:17 +01:00
Regis Crelier
2037e7e884
Properly resolve upper bounds of generic function's type parameters.
...
Various minor cleanup related to generic functions.
Add flag in preparation of future work to fully support generic methods.
R=hausner@google.com
Review-Url: https://codereview.chromium.org/2696783002 .
2017-02-14 01:50:02 -08:00
Regis Crelier
97f968de1c
Implement generic function type syntax in the VM ( fixes #27966 ).
...
The new function type syntax is allowed everywhere and not just in typedef.
R=hausner@google.com
Review-Url: https://codereview.chromium.org/2643523002 .
2017-01-27 08:45:03 -08:00
Regis Crelier
97c42acc30
Support FutureOr<T> in the VM ( fixes #28010 ).
...
R=asiva@google.com , rmacnak@google.com
Review-Url: https://codereview.chromium.org/2642443002 .
2017-01-17 10:27:21 -08:00
Matthias Hausner
47a479741f
Update assertion in finalizer
...
Kernel IR omits the implicit constructor when it is not needed,
e.g. in abstract classes. Update assertion in finalizer.
BUG=
R=regis@google.com
Review-Url: https://codereview.chromium.org/2624543002 .
2017-01-09 13:29:28 -08:00
Regis Crelier
98f28c1624
Always finalize the super class of a class before cloning the super class
...
constructor and cloning the mixin functions.
The fragile finalization order was disrupted by the use of the
--error-on-bad-override flag (fixes #28252 ).
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2609393005 .
2017-01-05 09:09:52 -08:00
Regis Crelier
3334c2402a
Second try: Fix resolution and canonicalization of typedefs and function types
...
in preparation of the new typedef syntax.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2606993002 .
2016-12-28 14:53:23 -08:00
Regis Crelier
4980107a96
Revert "Fix resolution and canonicalization of typedefs and function types..."
...
Review-Url: https://codereview.chromium.org/2600313002 .
2016-12-27 17:54:00 -08:00
Regis Crelier
291ed0c545
Fix resolution and canonicalization of typedefs and function types in
...
preparation of the new typedef syntax.
R=asiva@google.com
Review-Url: https://codereview.chromium.org/2592263004 .
2016-12-27 16:55:21 -08:00
Regis Crelier
3276a2ea26
Decorate mixin application class name with private keys of libraries of super
...
type and mixin types if they are imported from a different library than the
library defining the mixin application class (fixes #27957 ).
R=hausner@google.com
Review URL: https://codereview.chromium.org/2540323005 .
2016-12-02 08:46:29 -08:00
Martin Kustermann
63af3f56ee
VM: [Kernel] Cherry-pick from dart-lang/kernel_sdk
...
Fix a trio of issues in type finalization.
1. We were using is_type_finalized to detect classes that had already been
initialized by DilReader::ReadPreliminaryClass. This state is not
guaranteed by this function, however is_cycle_free is.
2. In the VM, classes that were created type finalized were not marked as
cycle free because finalization did not consider them so cycle-freeness
didn't matter. We would therefore try to initialize these classes with
DilReader::ReadPreliminaryClass and mutate types in them. This causes
them to have unfinalized types but still have is_type_finalized true.
3. Types in top-level procedures were not necessarily finalized. A simple
way to achieve this is to finalize each library's top-level class.
Review URL: https://chromereviews.googleplex.com/520437013 .
R=kmillikin@google.com
Review URL: https://codereview.chromium.org/2514373002 .
2016-11-21 16:38:30 +01:00
Florian Schneider
86d62d66f2
Allocate generic types in new-space before canonicalizing.
...
A previous CL missed the second allocation site (https://github.com/dart-lang/sdk/commit/6418f8f36caf4f6af2f575c2f1a7ca828d82ee00 ) in Instance::GetType.
Pass space used in GetType() explicitly to use old-space when invoked from the background compiler.
Fixes #27663 .
R=regis@google.com
Review URL: https://codereview.chromium.org/2509013002 .
2016-11-16 12:41:32 -08:00
Vyacheslav Egorov
23fd1a184b
VM: Support bootstrapping core libraries from Kernel binaries instead of source.
...
BUG=http://dartbug.com/27590
R=asiva@google.com
Review URL: https://codereview.chromium.org/2485993002 .
2016-11-16 13:56:20 +01:00
John McCutchan
f0f32a0e29
Map deleted enum values to a sentinel value.
...
Fixes #27802
BUG=
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/2498863002 .
2016-11-15 14:15:36 -08:00
Zachary Anderson
a1bcf051d8
clang-format runtime/vm
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Regis Crelier
11562f6874
Support generic method syntax ( fixes #25869 ).
...
Function type parameters are parsed and resolved, but mapped to malformed types
(i.e. dynamic) until full support is implemented.
R=hausner@google.com
Review URL: https://codereview.chromium.org/2349593003 .
2016-09-19 15:17:33 -07:00
John McCutchan
c692a64e5a
Rework how enums are implemented and reloaded
...
- Enum instances now hold their index and their label. Before the labels were held in a static array to the side and the index was used to look up the label.
- Before and after reload enum instances are now paired (by label) and put into the 'become' table.
Fixes https://github.com/dart-lang/sdk/issues/26877
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/2153143002 .
2016-07-15 10:52:20 -07:00
Ryan Macnak
5026d03a75
More live edit timeline events.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/2105023007 .
2016-06-30 10:59:54 -07:00
John McCutchan
48c8ffa7f3
Initial isolate reload support
...
This is a cut of the work that Todd and I collaborated on in the reload branch.
In this CL, we've dropped the loader port hacks, in other words, on stack reloading in the standalone embedder does not work yet.
- [x] Support for hot reloading of isolate source code
- [x] Unit test harness and many tests
- [x] Service protocol and Observatory support
- [x] Product build does not include support for hot reloading.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1965823002 .
2016-05-17 12:19:06 -07:00
Ryan Macnak
f731dd0615
Reapply "- Use a hash table to canonicalize instances/arrays to avoid having to iterate over a linear list and search for canonical instances."
...
- Rehash constants table during tree-shaking.
- Rehash constants table on snapshot load.
R=regis@google.com
Review URL: https://codereview.chromium.org/1900863002 .
2016-04-18 16:46:26 -07:00
Siva Annamalai
8ce7b6291a
Revert "- Use a hash table to canonicalize instances/arrays to avoid having to iterate over a linear list and search for canonical instances."
...
This reverts commit 95a2b02a9e .
Once the tree shaker in precompiled code is fixed to treat the constants array in a class as a hash table this CL can be re-applied.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1888593003 .
2016-04-13 18:49:53 -07:00
Siva Annamalai
95a2b02a9e
- Use a hash table to canonicalize instances/arrays to avoid having to iterate over a linear list and search for canonical instances.
...
- Some minor cleanups
- Return an empty array right away in the parser instead of creating an
empty array and canonicalizing it
- The canonical bit was not being set for some of the singleton objects.
R=regis@google.com
Review URL: https://codereview.chromium.org/1873143003 .
2016-04-13 10:26:17 -07:00
Regis Crelier
b8bcb5587b
Properly handle unfinalized type parameters of generic mixins ( fixes #26230 ).
...
Finalize upper bounds of unfinalized classes earlier in order to reduce the
number of BoundedType allocations.
Add regression test.
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1886633002 .
2016-04-13 10:04:53 -07:00
Ivan Posva
5be5d54529
- Refactor Symbol allocation to expect a thread parameter.
...
- Preallocate all tokens as symbols to avoid repeated lookups.
- Pass thread/zone where useful while doing this change.
- Avoid allocating symbols for error messages.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1870343002 .
2016-04-11 16:28:29 -07:00
Siva Annamalai
78a6b46155
Provide ability to patch external functions in a class that has already been finalized. The following restrictions are in place:
...
- No new fields or patching of existing fields can be done
- Only external methods that have not already executed (i.e code for it has been generated) can be patched
This change enables patching of JS Interop methods into a class and provides close to 5 sec drop in start up times for Green Tea app.
R=hausner@google.com , regis@google.com
Review URL: https://codereview.chromium.org/1850653003 .
2016-03-31 20:06:44 -07:00
Regis Crelier
966aea003b
Remove recently introduced FunctionType vm class by merging it into class Type.
...
Fix syntax used when printing function type with optional named parameters.
Fix several issues discovered with cloning function types.
R=hausner@google.com
Review URL: https://codereview.chromium.org/1815733003 .
2016-03-21 14:08:57 -07:00
Ivan Posva
f95b15eaa1
- Undo experiment.
...
BUG=
Review URL: https://codereview.chromium.org/1797393004 .
2016-03-16 05:01:15 -07:00
Ivan Posva
1413ef7a75
- REI experiment.
...
BUG=
Review URL: https://codereview.chromium.org/1804363002 .
2016-03-16 01:48:17 -07:00
Regis Crelier
ea7929d2fb
Ignore bounds in compile time type tests, since they will have been checked at
...
run time (fixes issue 25935).
Add regression test.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1780333002 .
2016-03-10 14:22:44 -08:00
Regis Crelier
699890db11
Introduce experimental flag --reify in the vm.
...
Note that many tests will fail when using --no-reify, since expected type errors
are not reported.
R=iposva@google.com
Review URL: https://codereview.chromium.org/1517153004 .
2016-03-01 10:03:18 -08:00
Ivan Posva
8d18298fed
- Remove Isolate::Flags structure and store flags directly in isolate.
...
- Make enable_asserts, enable_type_checks, error_on_bad_override and
error_on_bad_type release mode flags only.
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1737693003 .
2016-02-25 18:06:56 -08:00
Regis Crelier
3ffe9922b7
Simplify various name flavors in VM.
...
R=asiva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1723733002 .
2016-02-25 11:21:27 -08:00
Florian Schneider
b870dafa4f
VM: Separate precompilation-specific code, make flags const.
...
Move optimizations for precompilation into separate file.
Remove precompilation-specific code from flow_graph_optimizer.cc.
Add precompilation-flags: They are const in the precompiled runtime. Started moving flags to use the new flag-definition macros.
Add libdart_lib_precompiled target.
Define PRECOMPILED_RUNTIME_MACRO in more places (dart_precompiled_runtime)
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1714743002 .
2016-02-23 08:48:08 -08:00
Jacob Richman
6a0b321026
Allow factory constructors on mixin classes.
...
This mitigates a breaking change impacting real users caused by 851b4a995c .
The spec will be updated to allow factory constructors on mixins.
R=gbracha@google.com , iposva@google.com
Review URL: https://codereview.chromium.org/1699233002 .
2016-02-22 10:19:49 -08:00
John McCutchan
fda3a9bc2b
Remove more things
...
(stripped) dart_product before: 5307888
(stripped) dart_product after: 5275088
Reduction in size: 32800 bytes.
Removed entirely:
- debuginfo*
- elfgen*
- gdbjit*
- TraceBuffer
- vtune support
Removed in product:
- Compiler stats
- Code observers
R=asiva@google.com
Review URL: https://codereview.chromium.org/1711163002 .
2016-02-22 08:53:11 -08:00
Regis Crelier
7ab578d21f
Keep a trail while checking upper bounds in the VM in order to properly handle
...
cycles via bounds (fixes #25568 ).
Add a regression test.
Improve handling of recursive types with trails.
Make sure we do not modify already canonicalized types.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1674383002 .
2016-02-09 10:49:43 -08:00
Srdjan Mitrovic
4316d1bd17
Move sticky_error_ from isolate to thread
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org/1672853002 .
2016-02-05 15:46:55 -08:00
John McCutchan
d77d376124
Replace intptr_t with TokenDescriptor
...
- Use TokenDescriptor instead of intptr_t for all token positions.
- Use TokenDescriptor in raw_object instead of int32_t.
- TokenDescriptor is a POD with an int32_t (this shrinks the size of AST and IR nodes by 32-bits on 64-bit architectures).
There are some cleanups I plan on doing as a follow up CL:
- Replace TokenDescriptor::value() with TokenDescriptor::TokenPos()
R=iposva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1644793002 .
2016-02-02 10:15:44 -08:00
Regis Crelier
48fc233896
Fix typedef cycle check ( fixes #25620 ).
...
Add regression test.
Fix BuildName for function types.
R=asiva@google.com
Review URL: https://codereview.chromium.org/1654273003 .
2016-02-01 14:43:37 -08:00
Regis Crelier
daf672405c
Relax assert when applying a mixin application alias ( fixes #25617 ).
...
Update status file.
R=hausner@google.com
Review URL: https://codereview.chromium.org/1653593002 .
2016-01-29 15:17:35 -08:00
Regis Crelier
220f8c57b3
Resolve signature from correct scope class ( fix #25609 ).
...
Add regression test.
R=asiva@google.com
Review URL: https://codereview.chromium.org/1647653007 .
2016-01-28 13:29:28 -08:00
Matthias Hausner
851b4a995c
Compile-time error if mixin class has a factory
...
The VM now reports the location of the mixin application as well as
the location of the illegal constructor in the mixin class.
Update test language/mixin_illegal_constructor_test to follow the spec.
BUG=
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1638923002 .
2016-01-26 12:43:48 -08:00
Regis Crelier
7f57ebcfa1
Remove signature classes from the VM.
...
They were used as the class of closure instances and as the type class of
function types.
All closure instances now have class _Closure and function types are represented
by a new class FunctionType extending AbstractType.
Fix issue 24567 and add regression test.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1584223006 .
2016-01-19 16:32:59 -08:00
Regis Crelier
096843b648
Allow super type to be malformed (fixes issue 25426).
...
Update co19 status file.
Review URL: https://codereview.chromium.org/1588723002 .
2016-01-19 15:45:30 -08:00
Matthias Hausner
782f7b268b
Report missing semicolons after function declarations
...
Also take the opportunity to add the ability to report an error after a given token position. This way, the missing semicolon gets reported where it should: at the end of the line rather than the first token on the following line, when the error is actually detected.
BUG= 23761
R=regis@google.com
Review URL: https://codereview.chromium.org/1574213005 .
2016-01-19 09:31:33 -08:00
Srdjan Mitrovic
1595117898
Investigate & fix issues around usage_count and deoptimization_count
...
BUG=
R=fschneider@google.com
Review URL: https://codereview.chromium.org/1559653002 .
2016-01-05 09:40:23 -08:00
Matthias Hausner
8293e9665b
Fix owner of mixin forwarding constructors
...
Not sure why the new test appears to be a change to existing files, rather than an new files. I'm too dumb for git.
BUG=25246
R=regis@google.com
Review URL: https://codereview.chromium.org/1533823004 .
2015-12-17 14:16:40 -08:00
Regis Crelier
173c1aed51
Improve upper bound finalization in VM and fix #25122 .
...
Add regression test.
R=rmacnak@google.com
Review URL: https://codereview.chromium.org/1513493002 .
2015-12-08 14:38:27 -08:00
Srdjan Mitrovic
c4aee38224
Pass type argument to Field construction, thus freezing that field, denoting it cannot be changed later.
...
BUG=
R=regis@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/1406943006 .
2015-11-09 13:54:57 -08:00
Siva Annamalai
99abe7d883
- Some cleanup of dynamic_type usage.
...
- Avoid egregious creation of handles in Class::CreateInvocationDispatcher
R=regis@google.com
Review URL: https://codereview.chromium.org/1409113006 .
2015-10-21 17:24:10 -07:00