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
asiva@google.com
245a288c29
Check for presence of native resolver in library for classes which have native fields only in regular run mode not while generating snapshots.
...
While generating snapshots the native resolver is not set and would trigger this error.
Review URL: http://codereview.chromium.org//8618011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1728 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 01:22:07 +00:00
regis@google.com
314a89e16c
Update comments in core lib showing proper factory syntax.
...
Improve error messages reported from class finalizer.
Fix parser error reporting to be thread safe.
Reformat type error and failed assertion messages to be consistent.
Add one more new factory syntax test.
Review URL: http://codereview.chromium.org//8549033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1708 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 17:06:52 +00:00
regis@google.com
3c64ffe9a3
Support correct factory syntax in the VM as decribed in the spec.
...
Change the default value of --silent_warnings from true to false, so that
warnings are visible when legacy factory syntax is used.
In order to facilitate transition of libraries and user programs, legacy factory
syntax is still supported by 2 workarounds, but warnings are printed.
The first workaround allows the factory clause to omit the type
parameter list, which otherwise has to match exactly with the list of
type parameters in the factory class declaration.
The second workaround allows a factory method to omit the type
parameter list. In that case, the type parameter list of the enclosing
class is used instead.
Workarounds will be removed to enforce correct factory syntax at a later time.
Review URL: http://codereview.chromium.org//8585004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1595 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 23:49:04 +00:00
regis@google.com
8b9ebb3528
Second attempt at finalizing all classes in the VM (fix issue 364).
...
Review URL: http://codereview.chromium.org//8491055
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1475 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-11 21:38:49 +00:00
regis@google.com
a6282231eb
Revert r1380 that is breaking frog.
...
Review URL: http://codereview.chromium.org//8509031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1382 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-10 01:39:06 +00:00
regis@google.com
8dd26ba9f6
Finalize all classes (fix issue 364).
...
Review URL: http://codereview.chromium.org//8506001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1380 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-09 23:33:48 +00:00
regis@google.com
23552a0e14
Perform type canonicalization as part of type finalization.
...
Remove signature type cache from signature classes, since type canonicalization
has the same effect.
Review URL: http://codereview.chromium.org//8437028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1064 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-02 01:40:34 +00:00
regis@google.com
3125475ef8
Canonicalize types.
...
Review URL: http://codereview.chromium.org//8372041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1045 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-01 22:00:06 +00:00
regis@google.com
a019951eb9
Fix member overriding rules in VM according to latest spec.
...
Fix tests accordingly.
Review URL: http://codereview.chromium.org//8360022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@607 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-21 17:44:04 +00:00
asiva@google.com
60f1913eb2
Changes to handle unresolved qualified identifiers.
...
Review URL: http://codereview.chromium.org//8247014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@411 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 20:09:21 +00:00
dgrove@google.com
4c0f559d23
Initial checkin.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00