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
hausner@google.com
ed2e198b99
Mixins with Generics
...
This change adds support for generics to mixins. It's not a particularly elegant
implementation, so I expect to change how it works internally in later checkins.
Also, there is still one aspect of the implementation that is incorrect. In the
case of typedef, the newly introduced name is not yet an alias for the
mixin application. Instead, the MA is a superclass of the typedef name. That
will need to be fixed in a later checkin. I don't want to make this change
bigger.
Review URL: https://codereview.chromium.org//12779008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20084 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-15 15:59:24 +00:00
regis@google.com
f644ba9791
Complete implementation of bounds checking in the vm, by introducing a vm object
...
BoundedType that represents a type that could not be checked against an upper
bound at compile time. A BoundedType is verified at run time when used,
typically when it (and/or its bound) gets instantiated.
This fixes issues 7075 and 7625.
Added one test.
Review URL: https://codereview.chromium.org//12473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19519 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 22:04:23 +00:00
hausner@google.com
b4527a7465
First stab at mixins in VM compiler
...
Things not yet supported:
- Type parameters for super class and mixin class
- super call limitation check
Review URL: https://codereview.chromium.org//12210127
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18479 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:08:15 +00:00
regis@google.com
6665f3c92c
Include super type in interface list for cycle detection (issue 4318).
...
Report an error if a type appears in both extends clause and implements clause.
Add language test.
Close old pending issue 4905685.
Review URL: https://codereview.chromium.org//11613007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16237 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 00:13:33 +00:00
regis@google.com
7e9531a1d2
Remove support for default factory classes.
...
For now, disable tests using obsolete syntax. More will get disabled as support
for interfaces is completely removed. We may then permanently remove some tests,
while updating and reenabling others whose purpose is not related to interfaces.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15480 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 23:39:27 +00:00
regis@google.com
c2b4cccaee
Ambiguous type references require a compile time error in some special cases
...
(fix issue 6741).
Review URL: https://codereview.chromium.org//11348188
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15233 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 00:14:08 +00:00
regis@google.com
d00ed7fbc6
Ambiguous references do not necessarily cause compilation errors (issue 5736).
...
Triage related co19 test failures.
Review URL: https://codereview.chromium.org//11232071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13987 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 22:29:44 +00:00
hausner@google.com
1811a6b913
Support for type dynamic in VM
...
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.
VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
regis@google.com
1b8e614d7d
Change compile-time errors into dynamic errors in instance creation expression
...
(issue 3085).
Change compile-time errors into dynamic errors in static getter and setter
calls (issues 3088, 3094).
Fix a crash in flow graph builder for missing static getter (issue 4360).
Add support in VM for NoSuchMethodError.
Remove support in VM for StaticResolutionException.
Add, remove, update related language tests.
Triage related co19 tests.
Review URL: https://codereview.chromium.org//11049038
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13208 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:15:38 +00:00
regis@google.com
ccacc62ec6
Change many instance creation errors from compile-time errors to dynamic errors
...
per revised spec (issue 3801).
Add negative tests for factory redirection.
Review URL: https://codereview.chromium.org//10979053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12975 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 17:52:35 +00:00
regis@google.com
61297238fb
Support redirecting factory constructors in the VM (issue 3969).
...
Add test (negative tests still missing).
Some more work is needed regarding when to throw a dynamic error and when to
report a compile-time error. Some questions are not answered by the spec.
Review URL: https://codereview.chromium.org//10964058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12791 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 17:28:37 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
regis@google.com
55c106f812
Make ClassFinalizer indifferent on whether we are generating a snapshot or not.
...
Add flag --error_on_malformed_type.
Remove obsolete flag --verify_implements.
Support snapshotting of LanguageError (for malformed types) and ApiError.
Review URL: https://chromiumcodereview.appspot.com//10871005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11198 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:27:49 +00:00
regis@google.com
e6e70d7bb2
Allocate types in proper heap space.
...
Allow type finalization without canonicalization.
Review URL: https://chromiumcodereview.appspot.com//10696155
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9529 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-10 21:54:13 +00:00
regis@google.com
5d9dab620c
Implement latest rules prohibiting some self referencing typedefs.
...
Update tests.
Review URL: https://chromiumcodereview.appspot.com//10377095
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7524 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-10 23:03:36 +00:00
regis@google.com
9ff0afa50e
Do not require upper bounds to be resolved and finalized before comparing them
...
between the expected and actual factory class (issue 2431).
Add test.
Review URL: https://chromiumcodereview.appspot.com//10008017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6236 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-05 18:11:42 +00:00
regis@google.com
5282e44fb2
Use null type argument vector instead of vector of Dynamic for a generic raw
...
type when possible.
Fix type finalization of type parameters (always finalize in the context of the
class being parameterized and not in the enclosing class where the type
parameter is used).
Fix wrong generic optimization and added a test (a generic type instantiated
from a raw instantiator is not always raw).
Added printing of type argument vectors.
Review URL: https://chromiumcodereview.appspot.com//9939003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6068 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-30 22:16:52 +00:00
asiva@google.com
e4d024664e
Add a first class GrowableObjectArray type in the VM and use it internally in the VM at all spots were we use GrowableArray first and then copy the contents into an Array object.
...
Next step is to use this type in growable_array.dart
Review URL: https://chromiumcodereview.appspot.com//9594028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5109 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:14:02 +00:00
regis@google.com
f4ddc43cdf
Generate dynamic type errors according to spec.
...
Fix a few bad tests.
Turn a couple negative tests in multi-tests.
Triage a few co19 failing tests.
Still to do:
Check bounds of generic types at runtime in checked mode.
Stop reporting bounds error in new operator as a compile time error.
Review URL: https://chromiumcodereview.appspot.com//9615035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5064 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 02:23:12 +00:00
regis@google.com
47724a8491
Add support for malformed types and postpone some related errors from compile
...
time to execution time.
Still to do (once spec is clarified):
- properly handle generic type bounds errors
- properly handle 'instance of' type checks involving malformed types
- fix bad tests
Review URL: https://chromiumcodereview.appspot.com//9515011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4732 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 02:14:18 +00:00
regis@google.com
25fcaf5044
Generic bound errors are static type errors not to be reported by the VM.
...
Review URL: https://chromiumcodereview.appspot.com//9428015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4476 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 17:48:05 +00:00
regis@google.com
2edb4ae9c7
Add token index position to classes and types for more accurate error reporting.
...
Review URL: https://chromiumcodereview.appspot.com//9325047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3965 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-06 19:52:02 +00:00
turnidge@google.com
53ba5c402e
Make the "sticky error" an Error instead of a String.
...
I do this in preparation for using the sticky error to implement
isolate unwinding.
Review URL: https://chromiumcodereview.appspot.com//9186058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3367 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-17 19:54:02 +00:00
iposva@google.com
5b509684e3
- Fix outdated use of factory clause.
...
- Update error messages.
Review URL: http://codereview.chromium.org//8949043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2707 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-21 17:26:02 +00:00
regis@google.com
dd32effb72
Adjust index of type parameters at finalization time (fix issue 718).
...
Add test.
Review URL: http://codereview.chromium.org//8872037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2286 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:00:55 +00:00
srdjan@google.com
d07087ce77
Ongoing renaming of type classes:
...
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8776020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2002 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:19:59 +00:00
srdjan@google.com
2ff4d8a207
Address Regis' comments, replace AbstractType with Type where possible.
...
Review URL: http://codereview.chromium.org//8772009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1992 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 21:14:48 +00:00
srdjan@google.com
17552e9a3c
Renaming type classes as discussed:
...
Type -> AbstractType
ParameterizedType -> Type
TODO:
TypeArguments -> AbstractTypeArguments
TypeArray -> TypeArguments
Review URL: http://codereview.chromium.org//8761011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1987 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 16:54:52 +00:00