There is one special factory constructor for putting the type on an existing Array, and some higher level factory constructors that implement the common List subtypes.
The effect of this is to move the type parameter assignment from every "new List" site to a handful of site within JSArray. This shrinks some programs by half a percent, e,g, 3k of swarm.
JSArray.toList() and JSArray.sublist() now return JSArrays with the expected type parameters.
R=karlklose@google.com, ngeoffray@google.com
Review URL: https://codereview.chromium.org//70703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30374 260f80e4-7a28-3924-810f-c04153c831b5
This CL will:
- fix a bug in the legacy AnalyzerCommandOutputImpl class (in certain cases
we did not report that the analyzer was missing a warning).
- make the outcome of running the analyzer on a test be one of:
* CompileTimeError
* MissingCompileTimeError
* StaticWarning
* MissingStaticWarning
- Make status file updates using the new Expectation markers
- Remove support for '@static-clean':
Previously running the analyer on a test could either result in
'Pass' or in 'Fail'. The '@static-clean' annotation has been used
as a (poor) mechanism to distinguish between errors and warnings.
Having the 4 markers mentioned above means we can remove '@static-clean'
- Remove 100 lines of rotted legacy code in our testing scripts.
- Make a status file entry for every test that has analyzer errors or warnings
R=ricow@google.com
Review URL: https://codereview.chromium.org//46163002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29350 260f80e4-7a28-3924-810f-c04153c831b5
Subclasses of native classes have to be treated largely like native classes since they require interceptors.
The ugly part is collecting the set of subclasses of native classes without resolving all classes. Only plausible classes are resolved. Plausible classes have a superclass name that is native class (or subclass of native class). The name-keyed graph is collected and inverted to identify the true subclasses of native classes.
Things that are missing from this CL:
1. I discussed with Peter a better way of finding which classes are subclasses of native classes by resolving the superclass. Peter's proposal will still require the graph inversion step but should be more precise.
2. It would be a good idea to replace the 'defineNativeSubclass' calls with more declarative static data on the class and post-process the classes.
3. We need to make sure that fields of subclasses of native classes do not conflict with any (potentially undeclared) properties of the base native class.
4. The compiler should do additional checking
- The constructor must be a factory constructor.
- No fields can have initializers.
R=ahe@google.com
Review URL: https://codereview.chromium.org//15026006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26208 260f80e4-7a28-3924-810f-c04153c831b5
This change:
- Removes the need to create synthesized nodes for the default constructor.
- Treats the default constructor and forwarding constructors in mixins uniformaly: they both are synthesized constructors that call a super constructor.
- Makes the compiler aware that some elements may not have nodes, and acts accordingly. Before, the default constructor had a synthesized node, so the compiler was happy with it. And the forwarding constructors were handled specially to just skip to a non-synthesized constructor. The latter behavior was the cause of issue 11822, and type inference problems.
- Makes the resolver implement what is specified in the specification for forwarding constructors: we create one synthesized constructor per generative constructor of the super class.
- Implements forwarding constructor in named (aka typedef) mixin applications. See builder.dart, and mixin_typedef_constructor_test.dart
- Implements const classes in the presence of mixins: tests/language/const_constructor_mixin_test.dart.
- Fixes type inference in the presence of forwarding constructors: tests/language/inference_mixin_field_test.dart.
R=ahe@google.com, karlklose@google.com
Review URL: https://codereview.chromium.org//19754002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25148 260f80e4-7a28-3924-810f-c04153c831b5
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.
* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization
R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=
Review URL: https://codereview.chromium.org//16019002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5