Siva Chandra
9f0175059e
Load class members lazily when loading from kernel.
...
This change brings down core snapshot size by ~750KB, and brings
down app-jit snapshot size of simple "Hello, World" dart script by
~650KB. The bot cycle times will also come down by around ~20%.
Change-Id: I2a01c98bedc7ebfa2a653983995486a71504daf3
Reviewed-on: https://dart-review.googlesource.com/16323
Commit-Queue: Siva Chandra <sivachandra@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2017-10-31 19:19:25 +00:00
Regis Crelier
063dd6d03f
Make sure the signature of the call method is finalized before involving it
...
in bound checkings of its owner class (fixes #29025 ).
Add regression test and mark as failing for the analyzer (issue filed).
Add missing trail argument in 2 locations (not related to the fixed issue).
Cleanup: Remove ClassFinalizer::kCanonicalizeWellFormed which is not treated
differently than ClassFinalizer::kCanonicalize anymore after earlier changes in
the spec on how to handle malformed types.
R=asiva@google.com , hausner@google.com
Review-Url: https://codereview.chromium.org/2755723003 .
2017-03-15 16:44:33 -07:00
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
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
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
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
Zachary Anderson
103881d01c
Make header include guards great again
...
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -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
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
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
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
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
Srdjan Mitrovic
7fb555045a
Remove allocation in old space ....
...
Eliminate need for GrowableObjectArray, allocate constants in old space.
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1305223006 .
2015-09-02 08:59:33 -07:00
Srdjan Mitrovic
d732b68b8c
oneee# Enter a description of the change.
...
Collect interfaces without GrowableObjectArray
Concat to symbol without temporary String creation
BUG=
R=koda@google.com
Review URL: https://codereview.chromium.org//1311693003 .
2015-08-28 08:24:17 -07:00
Srdjan Mitrovic
42f32322cb
Change trail from GrowableObjectArray to ZoneGrowableArray.
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1309113004 .
2015-08-27 09:56:36 -07:00
Regis Crelier
15de03e2d5
Allow super calls in mixins (for now behind a --supermixin flag).
...
As a consequence, allow a mixin application alias as a mixin, even if it does
not extend Object.
Add new tests.
Fix an existing test.
Update status files.
Fixes #23771
R=hausner@google.com
Review URL: https://codereview.chromium.org//1232613005 .
2015-07-17 11:32:23 -07:00
asiva@google.com
8f9eee3f22
- Use conditional code inclusion for the dart_no_snapshot and dart executables using the MACRO DART_NO_SNAPSHOT
...
- Do some minor modifications to the intrinsifier code to not do redundant fingerprint checks and avoid code duplication.
These changes result in a text segment size savings of about 110k.
Old Sizes:
text data bss dec hex filename
3801418 7696 19261 3828375 3a6a97 (TOTALS)
New sizes:
text data bss dec hex filename
3690342 7696 19261 3717299 38b8b3 (TOTALS)
Review URL: https://codereview.chromium.org//1134623004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45704 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 18:31:55 +00:00
johnmccutchan@google.com
172baa03ff
Service isolate rework take 2
...
Review URL: https://codereview.chromium.org//889443002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43306 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 18:31:27 +00:00
johnmccutchan@google.com
db271b0477
Revert r43217, r43215, r43208, r43207, and r43202.
...
Reverting because of some isolate spawn issues (on Windows, and pub bots).
Review URL: https://codereview.chromium.org//867113003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43219 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 22:56:18 +00:00
johnmccutchan@google.com
66aa470fc6
* Create vm-service isolate at Dart_Initialize time.
...
* Remove Service create callback.
* Simplify creation of service isolate.
* Creation is done on thread pool.
* Use vm-service isolate for loading in standalone embedder.
* Remove import of dart:io from builtin library.
performance changes:
no service isolate:
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:27 | 100% | +12363 | - 0]
always start service isolate (as a thread pool task):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:45 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:44 | 100% | +12363 | - 0]
service does I/O (calls to Dart_LoadScript block until service is running):
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
$ ./tools/test.py -m release
Test configuration: none_vm_release_ia32
[01:55 | 100% | +12363 | - 0]
R=asiva@google.com
Review URL: https://codereview.chromium.org//584023004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43202 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-27 19:45:48 +00:00
hausner@google.com
4bf624ebc0
Implement enum types in VM
...
Fully support enum types as per language spec version 1.6.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//735723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41815 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 23:10:07 +00:00
regis@google.com
32f3e11d99
Cleanup of error and warning reporting.
...
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//340203003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37468 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-18 22:30:34 +00:00
regis@google.com
f60ab4dd11
Detect and reject illegal recursive types (non-contractive types).
...
Fixed instantiation and equality of recursive types.
Added many asserts to detect issues with recursive types.
Disabled bad tests. They declare illegal types and will be fixed in a later cl.
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//211963003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34460 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 23:38:18 +00:00
regis@google.com
9b13508243
Avoid repeated resolution of types by marking them as resolved.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//165523002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32706 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-14 17:43:11 +00:00
regis@google.com
2673ef210d
Do not resolve type arguments when only a resolved type class is needed to
...
calculate number of type arguments during type finalization (issue 16640).
Add regression test.
R=asiva@google.com
Review URL: https://codereview.chromium.org//160753004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32624 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-12 21:18:59 +00:00
regis@google.com
7830430adf
Implement eager instantiation and canonicalization of type arguments at run
...
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.
R=iposva@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//154393003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
regis@google.com
c2f0dec5ec
Support bounded mixins in the VM (fix issue 14453).
...
Add tests.
R=gbracha@google.com , hausner@google.com
Review URL: https://codereview.chromium.org//137543004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31794 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 18:41:27 +00:00
regis@google.com
3bdeaf9813
Add missing ResolveType call (fix issue 15738).
...
Remove unused parameter from ResolveType.
Review URL: https://codereview.chromium.org//113163008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31336 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 14:26:53 +00:00
regis@google.com
fb6d24945f
Introduce class TypeRef in the VM to fully support recursive types.
...
Fix issues 15244, 15148, 14869, 14000, and 13688 (was closed, but fragile).
Note that the current solution is not final as it may not be correct in more
complex cases not yet covered by language tests.
The final solution will require a 'trail' instead of a simple mark bit to
prevent operations involving recursive types to diverge.
R=asiva@google.com
Review URL: https://codereview.chromium.org//103913005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31087 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-11 22:51:19 +00:00
srdjan@google.com
3274f92827
Rename FinalizeTypeHierarchy to ProcessPendingClasses.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//83983004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30688 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 00:11:32 +00:00
srdjan@google.com
3485989ae7
Do not eagerly finalize classes in CHA, instead regard unfinalized classes as ’non-existent’ and only invalidate optimized code at finalization of the class.
...
Rename FinalizePendingClasses to FinalizePendingClassInterfaces as the class finalization occurs lazily.
TODO: add dependency information to deoptimize/remove only relevant optimized code.
R=regis@google.com
Review URL: https://codereview.chromium.org//81333003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30582 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-22 17:59:23 +00:00
regis@google.com
db2cec593d
Distinguish between malformed and malbounded types more efficiently using the
...
recently introduced LanguageError 'kind' field.
R=hausner@google.com
Review URL: https://codereview.chromium.org//75713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30383 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 23:31:12 +00:00
regis@google.com
694401d38e
Rename mixin typedef to mixin application alias in VM.
...
R=hausner@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//71693003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30277 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 17:42:39 +00:00
regis@google.com
65379851a8
Implement stricter rule about self referencing typedefs (fix issue 13675).
...
R=rmacnak@google.com
Review URL: https://codereview.chromium.org//49853004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29460 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:04:21 +00:00
regis@google.com
20badfb06e
Register synthesized mixin application classes in the library and reuse them
...
when possible (fix issue 14318).
R=asiva@google.com , hausner@google.com , rmacnak@google.com
Review URL: https://codereview.chromium.org//42723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29276 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:46:32 +00:00
regis@google.com
2f900dab13
Cache number of type arguments in class object instead of recalculating it.
...
Reduce size of num_native_fields field in class object.
R=asiva@google.com
Review URL: https://codereview.chromium.org//26682003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28670 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 18:31:31 +00:00
regis@google.com
fcadf9fdd6
Overlap type arguments of a type with the type arguments of its super type
...
when possible. Overlapping may be partial.
Add flag --overlap-type-arguments controlling this optimization for debugging
and performance measurement (default is true).
R=hausner@google.com
Review URL: https://codereview.chromium.org//26955002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28539 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 18:36:25 +00:00
hausner@google.com
fcb84c8dc9
Fix expression evaluation in library context
...
- Use correct source for patch functions when class
finalizer reports error
- Reinstate support for class in Dart_EvaluateExpr
R=regis@google.com
Review URL: https://codereview.chromium.org//25284003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28064 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 18:49:32 +00:00
regis@google.com
3b5628fd1b
Support mixin application typedef as mixin in the VM (issues 9383, 12773).
...
Disallow Object as mixin (issue 10952).
Detect illegal cycles in mixins.
R=hausner@google.com
Review URL: https://codereview.chromium.org//24397002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27791 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 00:25:01 +00:00
hausner@google.com
fd57843900
Update handling of ambiguous name references
...
Update VM to latest spec. Referencing a name that is imported
from more than one library is no longer a compile-time error.
If one of the sources of an ambiguous reference is a dart library,
the dart library declaration is automatically hidden.
Also fixes a bug where looking up a getter name in a library
found the getter even though the name is filtered out in the
'hide' combinator.
Long-term we should fix the need for repeatedly convert between
the mangled getter and setter names and the untangled name.
Fixes 12915, 12913, 12724.
R=regis@google.com
Review URL: https://codereview.chromium.org//23484020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27312 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 21:52:40 +00:00
regis@google.com
765aac1496
Keep track of the application of a mixin type to a mixin application class,
...
which includes setting up its type parameters (fix issue 12871).
R=asiva@google.com
Review URL: https://codereview.chromium.org//23453024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27157 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 22:21:36 +00:00
regis@google.com
9eb12ad303
Implement updated method overriding rules in the vm (issue 11495).
...
Introduce --error-on-bad-override flag and use it when generating snapshots.
Fix signature checking when patching methods.
Fix errors in patch files.
Fix receiver type of constructors.
Fix finalization of mixin application typedefs.
Update tests and status files.
R=asiva@google.com
Review URL: https://codereview.chromium.org//22685007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26027 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-12 20:28:52 +00:00
regis@google.com
3b7cdf80a0
Update VM to handle malformed types according to revised spec (issues 9055,
...
12105, 7247).
Update language tests.
Update status files.
Allow map literals to specify a key type that is not a String.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//21049012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25666 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 15:20:28 +00:00
regis@google.com
b55b249409
Delay resolution of redirecting factory targets in order to avoid class
...
finalization cycles (issue 12041).
Ensure that a super class is finalized before the class extending it.
R=asiva@google.com
Review URL: https://codereview.chromium.org//20503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25532 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 18:18:56 +00:00
regis@google.com
7b9a84dfbb
Implement more restrictive checking of typedefs illegally referring to
...
themselves and fix vm issue 9611.
Update a test and add a test.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19997003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25382 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 23:17:42 +00:00
hausner@google.com
4c629b9b50
Implement forwarding constructors for mixins
...
By popular demand, fixes issue dartbug.com/9339
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19023005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24977 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 22:09:18 +00:00
regis@google.com
71f88546cc
Stop resolving classes prematurely in the vm (issue 11023).
...
Add missing class finalization to mirrors tests.
R=hausner@google.com
Review URL: https://codereview.chromium.org//19030004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24965 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 17:59:17 +00:00
asiva@google.com
e33c2d4254
Delay Class parsing until the class is actually used.
...
Prior to this change the initial heap sizes were as follows:
ia32:
Size of isolate snapshot = 1230921
New space (0k of 32768k) Old space (1446k of 1604k)
X64:
Size of isolate snapshot = 1223943
New space (0k of 32768k) Old space (2630k of 2692k)
After this change the initial heap sizes are as follows:
ia32:
Size of isolate snapshot = 686443
New space (0k of 32768k) Old space (677k of 836k)
X64:
Size of isolate snapshot = 684731
New space (0k of 32768k) Old space (1220k of 1412k)
R=hausner@google.com , iposva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//14820028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23115 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 00:13:10 +00:00
asiva@google.com
ecc5b67833
- Create an all static TypedDataView class which uses implicit field offset
...
values to get direct access to the fields of a typed data view object.
- Added a verification step after class finalization to ensure that the
implicit field offsets in TypedDataView match the actual values in the
dart instance.
Review URL: https://codereview.chromium.org//13472019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20948 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 05:19:36 +00:00
regis@google.com
158d90d50f
Prevent expensive and unnecessary error formatting in the case a bound check is
...
postponed to run time (issue 9106).
Eliminate bound check at compile time in some cases.
Fix bound checking of mutually referencing bounds.
Added test.
Review URL: https://codereview.chromium.org//13653005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20938 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 20:24:49 +00:00