Commit Graph

262 Commits

Author SHA1 Message Date
johnniwinther@google.com 1f1ecff14d Handle @proxy classes in type checker.
BUG=http://dartbug.com/15049
R=karlklose@google.com

Review URL: https://codereview.chromium.org//98533005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31011 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 09:34:25 +00:00
ahe@google.com 8375ade7c4 Check that non-abstract classes implement all methods.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//18029018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30859 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 17:17:23 +00:00
ngeoffray@google.com a0b92e0357 Add another type JSPositiveInt to show a range analysis in the inferrer would be very beneficial :-).
R=kasperl@google.com

Review URL: https://codereview.chromium.org//94303002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30759 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-28 11:22:35 +00:00
ngeoffray@google.com ca1cf5e831 Add UInt32 and UInt31 types to better infer bit operations.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//87783003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30693 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 07:41:52 +00:00
sra@google.com c4993e4b62 Reapply "This change makes it easier to put type parameters on JavaScript Arrays."
Updates recursive_import_test

Review URL: https://codereview.chromium.org//75453004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30380 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 22:06:48 +00:00
sra@google.com 34fefd2715 Revert "This change makes it easier to put type parameters on JavaScript Arrays."
Review URL: https://codereview.chromium.org//75703002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30377 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 21:53:27 +00:00
sra@google.com 483cb2553a This change makes it easier to put type parameters on JavaScript Arrays.
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
2013-11-18 21:06:48 +00:00
kustermann@google.com 94ebff2225 Bugfix in test.dart, adding of specialized test outcomes for analyzer
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
2013-10-28 10:39:38 +00:00
kasperl@google.com 0c7d191c0d Fix warnings in dart2js.
R=ngeoffray@google.com
BUG=http://dartbug.com/14469

Review URL: https://codereview.chromium.org//48213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29345 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 08:23:11 +00:00
lrn@google.com 3a01260611 Remove dart:json
BUG= http://dartbug.com/12843
R=floitsch@google.com, fschneider@google.com

Review URL: https://codereview.chromium.org//40323002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29240 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 10:30:34 +00:00
scheglov@google.com 581b368515 New analyzer_experimental snapshot.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//27278004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28831 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 22:14:19 +00:00
kustermann@google.com e6077d093a Remove pixel/layout tests in tests/utils + special casing in the testing scripts for pixel/layout tests
R=ricow@google.com

Review URL: https://codereview.chromium.org//26998002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28502 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 10:29:46 +00:00
scheglov@google.com afb3cc7f01 Issue 13918. final fields induce setters that are illegal to call
https://code.google.com/p/dart/issues/detail?id=13918

R=brianwilkerson@google.com, jwren@google.com
BUG=

Review URL: https://codereview.chromium.org//26746002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28415 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 20:30:42 +00:00
kustermann@google.com 22d20313b4 Implement testing support for "--compiler=none --runtime=dartium"
This is implemented without the broken unittest-based wrapping of tests.

R=kasperl@google.com

Review URL: https://codereview.chromium.org//25514002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28141 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 07:37:50 +00:00
kustermann@google.com af7db12f52 Mark utils/png_layout_test as failing
TBR=ricow@google.com

Review URL: https://codereview.chromium.org//24256006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27809 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 11:39:06 +00:00
johnniwinther@google.com 776bd8ef05 Call asyncEnd only on success.
BUG=
R=ahe@google.com, kustermann@google.com

Review URL: https://codereview.chromium.org//23512008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27465 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 07:36:02 +00:00
ngeoffray@google.com 72e13620a7 Turn a Dart String + String into a JavaScript String + String.
R=ahe@google.com

Review URL: https://codereview.chromium.org//23496037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27281 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 09:37:08 +00:00
ngeoffray@google.com 1c1ffb93ad Remove analyzer warning in dart2js.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//23768003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27230 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-06 07:34:15 +00:00
scheglov@google.com e6ce94adab java2dart improvement - use field if getter/setter are trivial.
Also analyzer_experimental snapshot.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//23769004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27138 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 19:17:38 +00:00
ngeoffray@google.com 70c7a01592 Fix dart2analyzer warnings, and mark a test as fail because of a false warning in dartanalyzer.
Review URL: https://codereview.chromium.org//23943002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27097 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 07:27:20 +00:00
johnniwinther@google.com 3d22a350b3 First pass at asynchronous input loading in dart2js.
R=ahe@google.com, johnniwinther@google.com

Review URL: https://codereview.chromium.org//17759007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27028 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 08:04:38 +00:00
ngeoffray@google.com 64b784b17c Fix unit test to add required classes.
Review URL: https://codereview.chromium.org//23620009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26854 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 11:06:13 +00:00
blois@google.com 42b7e14b5e Further fixes from Safe HTML integration
The table construction tests are failing on IE9 because innerHTML isn't supported on IE9

The png_layout test (only run on Dartium) is failing because inline styles are not supported by default.

BUG=

Review URL: https://codereview.chromium.org//23475003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26761 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 02:12:06 +00:00
zra@google.com f088d812b1 Enables isolate and utils tests for arm and mips.
R=regis@google.com

Review URL: https://codereview.chromium.org//23506006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26745 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-27 20:59:52 +00:00
zarah@google.com 1823463b97 Add renames in output when using the mirror helper library.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//22791002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26623 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 08:21:33 +00:00
regis@google.com 5024da5a5d Skip over unfinalized interface types during a compile-time subtype check in
order to postpone bound checking to run time (fix issue 12501).

R=asiva@google.com

Review URL: https://codereview.chromium.org//23102006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26331 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 00:17:49 +00:00
kevmoo@j832.com 178afc3105 because Kasper cares
R=kasperl@google.com

Review URL: https://codereview.chromium.org//22904004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26286 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 18:04:48 +00:00
vsm@google.com af37e8db9c Mark recursive_import_test fail
TBR=asiva@google.com

BUG=12501

Review URL: https://codereview.chromium.org//23264003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26250 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 01:03:43 +00:00
sra@google.com 28dd6944b7 First cut at extending native classes.
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
2013-08-15 19:09:12 +00:00
kustermann@google.com 3614eeb271 Fix in test_runner_test, moved dependency_graph_test to standalone/io
R=ricow@google.com

Review URL: https://codereview.chromium.org//22156002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25761 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 08:22:55 +00:00
kustermann@google.com 92303dffda test.py: First step towards support of caching dart2js compilations across runtimes
This CL changes the way we run tests completely: When enqueueing TestCases we
build up a dependency graph of Commands. This has the advantage that if more
TestCases share common commands, we only execute it once.

R=ricow@google.com

Review URL: https://codereview.chromium.org//21001003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25760 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-05 07:54:17 +00:00
ngeoffray@google.com 6d7b2a169e Rewrite how we handle synthesized constructors in the compiler. This was motivated by issue https://code.google.com/p/dart/issues/detail?id=11822.
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
2013-07-18 15:51:40 +00:00
johnniwinther@google.com c13ac06bbe Remove support for conflicting constructors.
This removes the support for constructors with the same name as members. For instance:

class Foo {
 Foo.bar();
 static bar() {}
}

R=ahe@google.com

Review URL: https://codereview.chromium.org//18670003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24914 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 13:05:05 +00:00
ahe@google.com 4976228c46 Warn about overriding operator== but not hashCode.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//17588005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24463 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-26 11:20:04 +00:00
iposva@google.com 287f80bb1f - Make sure BoundedType and MixinAppType have a name.
- Reenable test from r23964.

Review URL: https://codereview.chromium.org//16924005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23975 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 13:02:46 +00:00
ricow@google.com 09b382dd32 Revert revision 23964
It is causing crashes on 64 bit linux, win32 and mac.

R=kustermann@google.com

Review URL: https://codereview.chromium.org//16934006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23968 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 11:30:26 +00:00
ricow@google.com 34cb83a0bf Run dummy compiler test with --print-object-histogramy on the vm
To test the functionality introduced in r23954

R=iposva@google.com

Review URL: https://codereview.chromium.org//16960002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23964 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 11:15:41 +00:00
ngeoffray@google.com 1f791bdd69 Move array and string related HType from const to a field in the backend.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//15724021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23900 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-12 10:20:30 +00:00
kasperl@google.com c379f3485e Update utils.status. More stuff passing!
R=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//16310005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23733 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-07 08:41:37 +00:00
scheglov@google.com 80fea8fd8e More fixes for java2dart and status files.
Now DDA passes/fails the same tests as Java version.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org//15675016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23705 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 18:13:44 +00:00
jwren@google.com 104baea740 Fix for the broken analyzer-FYI bot
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org//16410006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23697 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-06 16:57:58 +00:00
regis@google.com b7eb5aedbe Cleanup various test status files.
R=zra@google.com

Review URL: https://codereview.chromium.org//16232012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23450 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 00:39:37 +00:00
antonm@google.com cec85b4ec4 Fix a typo.
TBR=sigmund@google.com

Review URL: https://codereview.chromium.org//15792005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23416 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 14:04:36 +00:00
antonm@google.com d28b51e1a6 Skip layout test.
TBR=sigmund@google.com

Review URL: https://codereview.chromium.org//15901009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23410 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 13:30:08 +00:00
ngeoffray@google.com 91297abbfa Re-apply "Implement operator== and hashCode for bound closures.". The emitter should not try to share a bound closure class between an intercepted method and a non-intercepted method because the call has different calling conventions: the intercepted version pass an extra argument, which is the actual receiver.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//15888010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23387 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 08:27:28 +00:00
ngeoffray@google.com 76f4ae07ba Revert r23380, some browser tests fail.
Review URL: https://codereview.chromium.org//15987007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23383 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 07:05:38 +00:00
ngeoffray@google.com 6ed50f8a6b Implement operator== and hashCode for bound closures.
R=kasperl@google.com

Review URL: https://codereview.chromium.org//16042014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 06:48:38 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
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
2013-05-28 13:35:01 +00:00
kustermann@google.com a8857ed49c Status file updates for arm -> remove Skip markers
R=ricow@google.com

Review URL: https://codereview.chromium.org//15956005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23242 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 09:09:38 +00:00
johnniwinther@google.com b8fac0a378 Add StackTrace to mock corelib.
BUG=

Review URL: https://codereview.chromium.org//16105002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23223 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-27 13:13:24 +00:00