Commit Graph

160 Commits

Author SHA1 Message Date
smok@google.com 0168cbb59a [dart2dart] In placeholder collector skip non top-level elements from dart:* libraries.
Protects us from double-prefixing things like:
import('dart:io');
Platform.operatingSystem;

Review URL: https://chromiumcodereview.appspot.com//10868020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11174 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 16:42:15 +00:00
smok@google.com 582730cb6d [dart2dart] Fix type variables for interfaces and default classes if they are in different libs.
Example:
lib1: interface I<K> default C<K> {...}
lib2: class C<K> {...}

Review URL: https://chromiumcodereview.appspot.com//10875009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11168 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 15:55:39 +00:00
smok@google.com 6a44ac9411 dart2dart Rename statics as globals.
Review URL: https://chromiumcodereview.appspot.com//10870008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11159 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 15:10:01 +00:00
ahe@google.com d96c58598a Reify partial metadata.
Review URL: https://chromiumcodereview.appspot.com//10869013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11152 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:17:55 +00:00
ahe@google.com 234caf4849 Create an outline of metadata API in dart2js.
Review URL: https://chromiumcodereview.appspot.com//10879006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11147 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 13:37:13 +00:00
sgjesse@google.com d354eb558b Fix issue 4639
See comment#3 on http://code.google.com/p/dart/issues/detail?id=4639

R=kasperl@google.com

BUG=dart:4639
TEST=tests/compiler/dart2js_extra/regress/4639_test.dart

Review URL: https://chromiumcodereview.appspot.com//10879007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11144 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 13:07:11 +00:00
smok@google.com 16f3d80d74 dart2dart Fix type variables rename
Review URL: https://chromiumcodereview.appspot.com//10866017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11140 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 12:47:25 +00:00
antonm@google.com cfddb2fc3b Properly rename main methods declared in imported libs.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10878004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11127 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 09:03:22 +00:00
messick@google.com a46d823c7a Add a field to ClassNode that holds a NodeList of its members.
Modify Unparser to print the class body.
Add (simple) tests to verify the body is being recorded.
Review URL: https://chromiumcodereview.appspot.com//10834374

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11122 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 03:11:41 +00:00
smok@google.com d182624b92 Make ClassNode visit type parameters in visitChildren
Review URL: https://chromiumcodereview.appspot.com//10831406

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11057 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 15:18:28 +00:00
antonm@google.com 8d83a49879 Enable somehow disabled test.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10855264

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11055 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 15:11:19 +00:00
antonm@google.com 1b4e931081 Properly rename type variables.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10861029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11054 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 14:46:53 +00:00
ngeoffray@google.com a13af7eb1f When replacing an instruction with another in GVN-like optimizations, try to find a better user of it, that knows more about the type.
Review URL: https://chromiumcodereview.appspot.com//10831404

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11039 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:19:10 +00:00
antonm@google.com a9b8ec430e Rename elements after sorting.
That makes renaming more stable.

R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10834416

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11038 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 13:18:06 +00:00
lrn@google.com d0145b687f Make patching of classes lazy.
Review URL: https://chromiumcodereview.appspot.com//10855262

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11036 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 12:53:53 +00:00
ahe@google.com da3dfb92a0 Update dart2js_foreign startus files.
Review URL: https://chromiumcodereview.appspot.com//10831405

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11035 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 11:57:53 +00:00
smok@google.com d49ad937bb dart2dart Fix factory for interfaces renames
Review URL: https://chromiumcodereview.appspot.com//10828390

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11033 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 11:33:39 +00:00
ager@google.com 000b295a00 Make sure that libraries loaded from dart:core gets dart:core implicitly loaded.
This is in preparation for deprecating the corelib Math object
in favor of the dart:math library.

R=ahe@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10836355

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11032 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 11:24:23 +00:00
ahe@google.com a6b6565123 Parse metadata, but ignore it.
Review URL: https://chromiumcodereview.appspot.com//10836351

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11029 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 10:55:54 +00:00
ahe@google.com 62e962bfbc Change dart2js_foreign suite to use metadata.
Review URL: https://chromiumcodereview.appspot.com//10823423

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11026 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 10:16:24 +00:00
johnniwinther@google.com 647498e74c Full typedef support in dartdoc.
Review URL: https://chromiumcodereview.appspot.com//10823390

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11024 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 09:31:18 +00:00
antonm@google.com 21702e9066 Do not create placeholders for elements that won't be later renamed.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10827424

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11023 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 09:18:55 +00:00
ahe@google.com d1af3e7465 Copy all frog/native tests to dart2js_foreign.
Review URL: https://chromiumcodereview.appspot.com//10855248

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11020 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 08:56:36 +00:00
ngeoffray@google.com 5e0a986566 If an instruction is known to already by a number, the integer check will try to make it an integer.
Review URL: https://chromiumcodereview.appspot.com//10831392

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11014 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-21 07:39:00 +00:00
antonm@google.com a269efc993 Split collecting and traversing.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10837289

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10985 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 16:20:49 +00:00
antonm@google.com c9ef98f9c4 Fix the test to follow new getter syntax.
R=ahe@google.com,smok@google.com
BUG=4604

Review URL: https://chromiumcodereview.appspot.com//10860042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10975 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 15:10:48 +00:00
smok@google.com 8a001293f1 dart2dart Collect type placeholder for default class.
Review URL: https://chromiumcodereview.appspot.com//10854218

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10967 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 14:12:21 +00:00
ngeoffray@google.com 2e1e48a4ed Add an optional parameter to the dominatedUsers function in case we want to analyze the whole block, and not only from an instruction. Fixes bug 4069.
Review URL: https://chromiumcodereview.appspot.com//10824371

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10957 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 13:32:50 +00:00
ahe@google.com 19851497ff Support new getter syntax.
Review URL: https://chromiumcodereview.appspot.com//10831332

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10956 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 13:26:38 +00:00
smok@google.com 42c5cae4b1 dart2dart Fix renaming of top-level setters.
Review URL: https://chromiumcodereview.appspot.com//10825445

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10942 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 11:15:39 +00:00
ngeoffray@google.com cd00d770ca Update status file to point to the right bug.
Review URL: https://chromiumcodereview.appspot.com//10855241

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10938 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 07:49:41 +00:00
efortuna@google.com ec3695113c Fix IE bot status for this_phi_elimination_test.
Review URL: https://chromiumcodereview.appspot.com//10855224

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10906 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 17:23:28 +00:00
lrn@google.com ed1ed6472d Make top-level patch injections be compilation unit under library.
Review URL: https://chromiumcodereview.appspot.com//10824347

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10895 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 13:08:00 +00:00
ngeoffray@google.com e1ab242119 String+ does not exist anymore. Fix issue #3710.
Review URL: https://chromiumcodereview.appspot.com//10827397

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10886 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 11:49:19 +00:00
kasperl@google.com 65a3704df5 Fix issue 4562 by giving a proper error message rather than crashing.
R=karlklose@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10855220

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10883 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 11:32:22 +00:00
johnniwinther@google.com d1cdeaf426 Change line endings from Windows to Unix
Review URL: https://chromiumcodereview.appspot.com//10827394

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10881 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 11:21:55 +00:00
sgjesse@google.com 210cb22f51 Start inferring return types for static functions
Types propagated to the function exit are recorded in the code generator
and optimisticly used at call sites. If this optimistic assumption fails
the callers have to be recompiled.

R=kasperl, ngeoffray, floitsch

Review URL: https://chromiumcodereview.appspot.com//10823389

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10876 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-17 10:32:54 +00:00
smok@google.com e37f9208d2 dart2dart Fix collecting type of class fields
Review URL: https://chromiumcodereview.appspot.com//10830359

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10835 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 16:42:20 +00:00
antonm@google.com 1fd8d20236 Fix the order in which elements are emitted.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10830356

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10829 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 16:28:28 +00:00
floitsch@google.com 1c89511be4 Move types out of the HInstructions.
Review URL: https://chromiumcodereview.appspot.com//10827180

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10823 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 14:25:00 +00:00
antonm@google.com 699cdc7fd2 Refactor program traversing logic.
R=smok@google.com

Review URL: https://chromiumcodereview.appspot.com//10855199

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10821 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 14:07:31 +00:00
smok@google.com 3e70eed6a9 dart2dart Fix setter ref with library prefix.
Review URL: https://chromiumcodereview.appspot.com//10834359

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10816 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 13:32:27 +00:00
kasperl@google.com 80152788e8 Make sure to register +/- when we're using ++/--.
R=antonm@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10857033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10812 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 13:19:08 +00:00
kasperl@google.com dd6e1044d7 Update type annotations in resolver test.
R=ahe@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10828343

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10811 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 12:42:02 +00:00
smok@google.com cfac8bee02 dart2dart properly collect top level fields
Review URL: https://chromiumcodereview.appspot.com//10824329

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10810 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 12:37:44 +00:00
kasperl@google.com 3b87631a1c Make selector registration in the resolver and code generator more explicit.
Get rid of registerFieldClosureInvocations() in the enqueuer by explicit
registering the closure call selectors when we may be calling a getter in
the resolver and the code generator.

R=floitsch@google.com,ahe@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10854158

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10805 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 11:52:44 +00:00
dgrove@google.com 39889f6270 Move dartdoc from lib/ to pkg/ .
Reviewed at desk by rnystrom, since gcl upload fails when there
are binary images in the change.

TBR=rnystrom@google.com



git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10776 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 22:59:55 +00:00
smok@google.com f9ad908a1e dart2dart Preproces placeholders instead of renaming them lazily,
just form a map <node,string> for future renames.

Review URL: https://chromiumcodereview.appspot.com//10836261

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10730 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 14:01:08 +00:00
sgjesse@google.com 90ef467e0e Track types for arguments passed to calls to static functions
This uses the same mechanism as is currently used for tracking the types of
arguments passed to non-static functions. The type collection has been
refactored to support both.

For static functions the type information for a function is invalidated if
the function is used for anything else than a direct call.

The test LibTest/core/int/operator_truncating_division_A01_t01 now has
the "problem" that the statement

  Expect.isTrue(actual is int);

never fails even though actual might not be an int in the generated JavaScript
even though the inferred type for actual is int.

R=floitsch@google.com, kasperl@google.com

Review URL: https://chromiumcodereview.appspot.com//10855170

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10726 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 13:52:06 +00:00
efortuna@google.com 47e32b2193 Change status file for test 4492.
Review URL: https://chromiumcodereview.appspot.com//10827329

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10667 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 19:22:59 +00:00