Daniel Andersson
ea46192ca3
VM-internalize the default Map implementation.
...
Make the compact linked hash map, which is the default implementation for Map
(including map literals), a VM-internal class.
This makes it easy to have more efficient serialization of maps (although for
now, the implementation is straight-forward).
Refactor the compact hash class hierarchy to enable the VM-internal class and
the rest (also the Set classes) to share a maximal amount of code, by using
two different bases for implicit/explicit fields.
Remove existing proof-of-concept, C++-based internal VM-class.
BUG=http://dartbug.com/22982
R=asiva@google.com
Review URL: https://codereview.chromium.org//1151523002
2015-05-28 09:32:54 -07:00
Ryan Macnak
7c02eae5ec
Actually use canonicalized parameter and return types.
...
149.4kB -> 43.5kB (-70%) of Type, TypeArgument and TypeParameter in hello world
R=regis@google.com
Review URL: https://codereview.chromium.org//1162513002
2015-05-27 18:11:44 -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
srdjan@google.com
3ac643115f
Remove unneeded flag declaratiosn (enable_type_checks, enable_asserts).
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//1133793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45647 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 16:48:43 +00:00
regis@google.com
52b19e2b14
Make sure the bound of a mixin type parameter is finalized before instantiating
...
it during finalization (fix issue 23385).
Print more info in ToCString() for an unresolved type.
Review URL: https://codereview.chromium.org//1124253004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45598 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 16:08:11 +00:00
johnmccutchan@google.com
2f7cff7170
Display isolate message queue in Observatory debugger
...
- Log the parameters to RPCs
- Display messages like stack frames
- handler function and script visible
- message preview instead of local variables
- Expanded and previewed messages do not collapse when stepping within the existing message
- Mark patch classes as finalized to avoid ASSERT on class_finalizer.cc:2358 **
- Support iterating over message queues
- Support printing the message queue as JSON
- Inhibit OOB messages from being handled if we are iterating over the message queue
- avoids dead lock when looking up port handler (done in Dart code with message handler locked) and a stack overflow trigger to handle OOB messages
- make getObject understand message ids
- Fix dartbug.com/23355
** Need to discuss with Ivan and Matthias (reviewed code differs from committed code but matches my fix):
https://codereview.chromium.org//828353002
https://code.google.com/p/dart/source/detail?r=42612
R=turnidge@google.com
Review URL: https://codereview.chromium.org//1122503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45505 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 20:20:44 +00:00
regis@google.com
11fb39533c
Make sure declared upper bounds are resolved when finalizing a type containing a
...
cycle via bounds (issue 23089).
Add regression test.
R=asiva@google.com
Review URL: https://codereview.chromium.org//1066043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44956 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 00:59:52 +00:00
regis@google.com
47b17b78e4
Make sure the mixin class is finalized immediately (and not some time later)
...
before applying mixin members (issue 22719).
Add regression test.
R=asiva@google.com
Review URL: https://codereview.chromium.org//994103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44383 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-10 18:39:50 +00:00
rmacnak@google.com
4de5f89b99
Rename IsConstructor to IsGenerativeConstructor.
...
This matches the terminology in the spec, and it avoids confusion with the function kind kConstructor, which indicates either a generative constructor or a factory constructor.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//910313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43673 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-11 00:59:19 +00:00
zra@google.com
1299ad1485
Allows turning on checked mode on a per-isolate basis
...
using the embedding API.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//883263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43481 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 18:32:48 +00:00
hausner@google.com
6488a19c90
Patch classes do not need to be finalized
...
The fields and functions of a patch class are copied to the
patched class after parsing. There is nothing to do when finalizing
a patch class, so return immediately.
The debugger ran into an overly strict assertion when finalizing
a patch class. This fixes the issue. (Issue 21039).
Review URL: https://codereview.chromium.org//828353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42612 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 20:51:52 +00:00
hausner@google.com
ab3af6ec00
Introduce is_debuggable state bit on function objects
...
Simplify debugger logic. Any function can be marked as
non-debuggable when is is created. The debugger no longer
needs a heuristic which functions are debuggable.
Mostly used for synthetic, generated functions that
have no source code, e.g. async code, implicit getters and
setters, implicit constructors, forwarding constructors,
dispatcher functions.
Review URL: https://codereview.chromium.org//789643006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42570 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-29 22:31:17 +00:00
fschneider@google.com
6fc87187a6
Fix implementation of the Iterable interface for typed data lists.
...
Return an Iterable with the correct type arguments (instead of <dynamic>)
when calling Iterable methods.
R=lrn@google.com
Review URL: https://codereview.chromium.org//763443005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42066 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 13:25:36 +00:00
iposva@google.com
1ee14fee2e
Fix dartbug.com/21671:
...
- Properly canonicalize enum values.
- Ensure canonical objects are deserialized properly.
R=asiva@google.com
Review URL: https://codereview.chromium.org//745023002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41874 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 23:31:10 +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
5c55e61647
Resubmit fix for Function::Clone() and Field::Clone() to adjust the class owner
...
of type parameters (issue 18630).
Make sure to clone the parameter type array as well.
Add regression tests.
R=iposva@google.com
Review URL: https://codereview.chromium.org//693693003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41474 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 23:16:33 +00:00
iposva@google.com
6266f1d4a0
- Do not attempt to set parameter types if they
...
were already finalized.
R=zra@google.com
Review URL: https://codereview.chromium.org//652743007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41182 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 21:50:28 +00:00
regis@google.com
0220e41d72
New bigint implementation in the vm.
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//509153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +00:00
asiva@google.com
2c7cb613ab
Use isolate parameter while creating handles during class finalizers.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//506683003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39568 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 20:54:16 +00:00
hausner@google.com
0bbf6c5b16
Runtime support for evaluation of static field initializer expressions
...
Eliminates the generation of field initializer functions by the parser.
Adds a runtime call that creates a one-shot function to evaluate the
initializer of a static field. The runtime function gets called from
the implicit static getter function for the field.
R=srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//471283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39387 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:53:44 +00:00
fschneider@google.com
54a7410866
Fix bug with CHA dependencies by recording a set of classes for registering code.
...
CHA is not only used with the receiver class, but also with other classes
when doing type propagation. The optimized code has to be registered with
all classes that are affected by CHA so that deoptimization occurs whenever
the set of subclasses changes for these classes.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//463103002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39194 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-13 12:43:03 +00:00
fschneider@google.com
a908179df8
VM: Fix bug in CHA for signature classes.
...
The subclasses for the _FunctionImpl class were not tracked in the VM.
As a result, CHA would incorrectly assume that _FunctionImpl does not have
any subclasses.
This may cause incorrect optimization and caused unnecessary deoptimizations.
R=vegorov@google.com
Review URL: https://codereview.chromium.org//446373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38981 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 12:46:18 +00:00
regis@google.com
7800e258ca
Finalize the redirection type of a redirecting factory when the class of the
...
factory is finalized.
R=asiva@google.com
Review URL: https://codereview.chromium.org//412543003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38468 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-22 18:17:24 +00:00
asiva@google.com
a323a9c9db
The dart version of typeddata library has changed to be compatible with the dart2js implementation
...
(typeddata does not implement ByteBuffer anymore).
Added new Dart API functions to account for this change.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//392043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38351 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 22:08:07 +00:00
iposva@google.com
0ab6d72ffb
Fix bug 20078:
...
- Do not use shared code or variables after a setjmp.
R=kustermann@google.com
Review URL: https://codereview.chromium.org//397273003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38327 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 13:12:34 +00:00
regis@google.com
aac127e4dd
Add missing call to finalize type parameters when finalizing upper bounds.
...
Fixes issue 19757.
Review URL: https://codereview.chromium.org//367113002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37953 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-02 18:06:42 +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
rmacnak@google.com
f4f4713eb8
Put metadata fields in their owner class to maintain the class-field bidirectional relationship asserted Field::PrintJSON.
...
Extended metadata scope test based on suspicions regarding the ordering of adding type parameters metadata fields versus ordinary fields of a class.
BUG=http://dartbug.com/18652
R=iposva@google.com , regis@google.com
Review URL: https://codereview.chromium.org//269253005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35926 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 18:15:33 +00:00
regis@google.com
91388a5f79
Simplify and fix instantiation of recursive types.
...
Add tests for non-contractive types.
Cleanup language tests status file.
Enhance tracing of type finalization.
R=hausner@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//224793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34739 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 18:27:53 +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
hausner@google.com
a7d344aa79
Fix checked tests
...
Follow-on change to implicit static getter elimination. Class finalizer
needed to be updated accordingly so type checks are made on non-final
fields as well.
TBR
Review URL: https://codereview.chromium.org//191063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33435 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-07 16:59:17 +00:00
srdjan@google.com
3ffe7579ce
Minor VM performance improvements based on profiling.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//185553015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33333 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-05 17:42:40 +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
9380c54628
Make cycle checking of super interfaces linear instead of quadratic by marking
...
classes as checked (issue 16343).
R=asiva@google.com
Review URL: https://codereview.chromium.org//162163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32636 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-13 00:14:36 +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
srdjan@google.com
8b7ebed54f
Mark optimized code that used CHA for optimization so that lazy class 'finalization' does not invalidate that code.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//150923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32335 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 20:31:57 +00:00
regis@google.com
8aac3612cf
Share the same type parameters of a mixin application class to propagate
...
identical type arguments to the super type and to the mixin type, thereby
allowing for further optimizations, such as instantiator vector reuse or
sharing of type arguments with the super class.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//149723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32140 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 21:10:53 +00:00
regis@google.com
17196f6467
Make a type malbounded if one of its type arguments is malbounded, even if
...
independently of the declared bounds for the type (fix issue 16149).
R=srdjan@google.com
Review URL: https://codereview.chromium.org//140913005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31901 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 22:56:35 +00:00
regis@google.com
5fdae0d636
Leave uninitialized type arguments of a type being finalized as null instead of
...
temporarily setting them to dynamic for improved code robustness, since dealing
with a null type is less forgiving than dealing with dynamic.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//137983006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31843 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 18:56:10 +00:00
regis@google.com
b48d1455c2
Share mixin type with interface type in mixin application classes.
...
R=hausner@google.com
Review URL: https://codereview.chromium.org//138273005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31807 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-14 22:30:59 +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
srdjan@google.com
b7d93c342a
Fix 15721: When checking for bad overrides we must eagerly finalize superclasses.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//128263005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31628 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 21:45:05 +00:00
zra@google.com
fdeff1ba17
Replaces LongJump with LongJumpScope.
...
LongJump required explicitly restoring the old
long jump base before function return. This was
sometimes forgotten, leading to crashes. This
change puts the base restoration into the
destructor so that it happens automatically on
return.
R=iposva@google.com
Review URL: https://codereview.chromium.org//108383007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31463 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-04 01:23:43 +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
fschneider@google.com
cd54507fc2
Mark native functions when they are created.
...
Until now the parser marked native functions as native when parsing.
This may be too late for some functions. E.g. the native typed list
constructor may not be invoked because the intrinsic code is executed
instead (unless for example new-space allocation fails).
This causes missing type information when optimizing functions using
those recognized factory functions like Uint8List._new.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//99373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30846 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 10:32:43 +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
d1e945994e
Improve type test and type equality for generics (issue 15148).
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//81363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30546 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 21:30:51 +00:00