Commit graph

137 commits

Author SHA1 Message Date
Zachary Anderson
ee21a2261d Use list_dart_files.py instead of list_files.py in GN build.
To track https://codereview.chromium.org/2391863002/ on the
gyp side, and use it in more places.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392253002 .
2016-10-05 07:50:40 -07:00
Zachary Anderson
7c784cea9f Linux create_sdk GN build for host
This CL enables GN builds of all targets from dart.gyp
on Linux for the host (i.e. ia32, x64).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2379803002 .
2016-09-29 13:23:00 -07:00
William Hesse
1f97819b25 Add --packages flag when compiling dart2js snapshot
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org/2368073004 .
2016-09-26 18:48:26 +02:00
William Hesse
79b682b885 Add explicit package spec to snapshot build steps
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2372573002 .
2016-09-26 15:52:31 +02:00
William Hesse
0695b1db3a Remove package root target and support scripts
BUG=https://github.com/dart-lang/sdk/issues/23565
R=kustermann@google.com

Review URL: https://codereview.chromium.org/2346163005 .
2016-09-20 13:32:50 +02:00
William Hesse
61eee9ee52 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

BUG=https://github.com/dart-lang/sdk/issues/23565
R=rnystrom@google.com

Committed: 5d3e356ca7

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

Reverted: 6d238ba197
2016-09-16 15:03:18 +02:00
William Hesse
6d238ba197 Revert "Use checked-in .package file for building and testing"
This reverts commit 5d3e356ca7.

BUG=
R=eernst@google.com

Review URL: https://codereview.chromium.org/2340813004 .
2016-09-15 15:46:49 +02:00
William Hesse
5d3e356ca7 Use checked-in .package file for building and testing
Stop creating [build dir]/packages directory with symbolic links.

BUG=https://github.com/dart-lang/sdk/issues/23565
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/1746743002 .
2016-09-15 14:50:30 +02:00
keertip
c775149a5a remove docgen source and targets from build
BUG=
R=alanknight@google.com

Review URL: https://codereview.chromium.org//1364553002 .
2015-09-22 15:10:18 -07:00
Sigmund Cherem
b18c5a3e7c sdk files reorganization to make dart2js a proper package
BUG=
R=brianwilkerson@google.com, floitsch@google.com, whesse@google.com

Review URL: https://codereview.chromium.org//1212513002.
2015-06-29 10:21:14 -07:00
johnniwinther@google.com
09fbe78e71 Move dart2js from sdk/lib/_internal/compiler to pkg/compiler
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41514 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 08:51:01 +00:00
johnniwinther@google.com
8637cfd322 Revert "Move dart2js from sdk/lib/_internal/compiler to pkg/compiler"
This reverts commit r41512.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41513 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 08:15:26 +00:00
johnniwinther@google.com
2b336e17f0 Move dart2js from sdk/lib/_internal/compiler to pkg/compiler
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41512 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 07:09:04 +00:00
ricow@google.com
5080e18fc4 Create targets for dart2js files, pub files, pkg files.
We are seeing issues on mac 10.7 where the list of inputPaths in xcode files becomes to long (this is also dependent depth of your build directory).
The build silently fails without giving any error.

BUG:18333

Also see:
http://build.chromium.org/p/client.dart/builders/dart2js-safari-mac10.7-1-3-be/builds/4640/steps/Build%20SDK/logs/stdio

R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35255 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 11:34:13 +00:00
dgrove@google.com
7bed1bc4e9 Remove dartdoc.
R=alanknight@google.com, efortuna@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32388 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 22:47:26 +00:00
alanknight@google.com
3730236bdf Add a snapshot for docgen and use it in the build
R=efortuna@google.com, ricow@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32025 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-27 18:40:34 +00:00
ricow@google.com
b55717e38c Land VERSION dependency for dart2js and dartdoc snapshot generation
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30144 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 08:53:06 +00:00
ricow@google.com
a7b6c3e9c0 Reland 30137 - Fix version generation for dart2js
Not, without eating the first command line argument to dart2js

R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30142 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 07:32:24 +00:00
ricow@google.com
93b46fd26f Revert 30138
Review URL: https://codereview.chromium.org//67943004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30139 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-10 12:15:44 +00:00
ricow@google.com
c65bcc6816 Fix version generation for dart2js
Review notes:
This is not at all nice code, and create_snapthot.dart can be rafactored to make this nicer.
This is the least intrusive way I could do this.

R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30138 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-10 12:02:06 +00:00
sgjesse@google.com
c38de04d0c Change dart:io Platform.script to return a Uri.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29651 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 07:29:01 +00:00
whesse@google.com
4f08151090 Revert "Change dart:io Platform.script to return a Uri."
This reverts r29619 and r29624.  The changes look fine on the buildbot,
but need review before adding to the repository.

BUG=

TBR=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29627 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:17:37 +00:00
whesse@google.com
cb0110350a Change dart:io Platform.script to return a URI. Change all uses of Platform.script to work with the new value.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 01:08:11 +00:00
lrn@google.com
f0a1c922a2 Reapply "Remove @deprecated features."
R=scheglov@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29535 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:09:15 +00:00
whesse@google.com
13dad66877 Remove uses of dart:io Options in dart2js and dartdoc.
BUG=
R=ahe@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29456 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 16:36:19 +00:00
sgjesse@google.com
ff7a0b95bd Fix Windows bugs in r26181
TBR=ahe@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26191 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 12:10:03 +00:00
sgjesse@google.com
353428a918 Remove the Path class from dart:io
The Path class in dart:io has been deprecated for some time
now. It was scheduled to be removed on August 11th, so here it
goes.

dart:io still uses the Path class internally, but now it is
private. I will trim it down to what is actually used in a
follow-up change.

R=ahe@google.com, devoncarew@google.com, whesse@google.com
BUG=http://dartbug.com/11666

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26181 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 10:10:53 +00:00
kustermann@google.com
315daf1d72 First CL for removing our dependency on the checked-in binary for building
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25809 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 10:52:57 +00:00
ahe@google.com
216289bcb1 dart2js has its own snapshot.
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25344 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 14:58:28 +00:00
asiva@google.com
a12382dc22 Fix for issue 11112 align flags to formats used by other tools.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23831 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-10 21:57:49 +00:00
ricow@google.com
93e817b16c Add packages as a dependency for dart2js target
Since dartdoc depeneds on packages and we include it in the snapshot we need packages as a depenedency.

Currently tools/build.py -mrelease dart2js is broken if you do a clean build.

R=ahe@google.com, kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23804 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-10 11:57:06 +00:00
amouravski@google.com
6c96878cda Add dartdoc to the generated utils snapshot.
Lots of bad patches should be fixed in this change.

R=dgrove@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23655 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 20:32:11 +00:00
amouravski@google.com
d86c72348b Roll back 16364004 and 16206027.
Review URL: https://codereview.chromium.org//16387004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23625 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 01:14:04 +00:00
amouravski@google.com
0d1be28061 Add dartdoc to the generated utils snapshot.
This is the same as r23575 (14135007), but fixed.

R=dgrove@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23622 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 00:32:31 +00:00
ricow@google.com
604f2ace70 Revert revision 23575.
This is causing failures in the test of dartdoc (on the editor bot)

The reason seems to be that we are generating a temporary nav.dart
file relative to the dartdocPath in sdk/lib/_internal/dartdoc/lib/
which we claim to be part of in
sdk/lib/_internal/dartdoc/lib/src/client/client-static.dart. 

This will not work since actual code has been snapshot.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23583 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 09:36:20 +00:00
ricow@google.com
950934a7e7 Add dartdoc to the generated utils snapshot
R=amouravski@google.com, kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23575 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 06:06:29 +00:00
sgjesse@google.com
7841206de5 Change File.directory to not do any IO
Removed the File.directory and File.directorySync methods and added a
File.directory getter. The File.directory getter does not do any IO,
but just calculates the directory of the file from the path.

R=whesse@google.com
BUG=http://dartbug.com/9926

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23349 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 12:38:27 +00:00
kustermann@google.com
0cd25239ef Use checked-in binary to call tools/version.dart
BUG=http://dartbug.com/10193

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22033 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 14:43:21 +00:00
ricow@google.com
00da866b33 Move the dart2js snapshot into bin directory of sdk root.
This is the first step in eliminating lib/_internal.
Review URL: https://codereview.chromium.org//13945008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21247 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 05:47:24 +00:00
ricow@google.com
14a6ddcacc Remove some old leftover cleanup code
Review URL: https://codereview.chromium.org//13841010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21156 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-09 16:04:02 +00:00
asiva@google.com
d313a1243f 1. Change option --use_script_snapshot to --use-script-snapshot (easier to type).
2. Use dart binary with the --generate-script-snapshot option to generate dart2js snapshot
Review URL: https://codereview.chromium.org//12084010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17686 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-26 05:47:56 +00:00
ahe@google.com
0301e91b94 Remove stale dependencies on dart2js scripts.
Also, add build rule to delete old dart2js scripts.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15841 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 10:04:38 +00:00
ahe@google.com
57cd87d9f7 Don't build dart2js scripts.
Users of dart2js are expected to use the scripts in sdk/bin instead.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15773 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 09:04:14 +00:00
whesse@google.com
34771fb64c Clean up svn:ignore property and .gitignore in dart, dart/pkg, dart/runtime, and dart/samples.
Review URL: https://codereview.chromium.org//11421093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15392 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 14:07:53 +00:00
ahe@google.com
3380a673cb Remove unnecessary option.
Review URL: https://codereview.chromium.org//11419148

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15384 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 11:50:18 +00:00
ahe@google.com
5c2839d6c9 Increase the heap growth rate as it decreases compile-time by as much as 10%.
Review URL: https://codereview.chromium.org//11414144

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15377 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 09:56:29 +00:00
aprelev@gmail.com
aa82516264 Fixed snapshot name in dart2js.bat, dartdoc.bat invocation scripts.
BUG=dartbug.com/6916
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15363 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 02:45:29 +00:00
erikcorry@google.com
fe0c55a728 Rename classes, methods and fields when minifying
This is a retry of a change that was reverted due to test failures.  The
difference to last time you saw this is:

diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 9de758e..19fb966 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -689,9 +689,9 @@ class JavaScriptBackend extends Backend {
   }

   static Namer determineNamer(Compiler compiler) {
-    // TODO(erikcorry): Use the MinifyNamer depending on
-    // compiler.enableMinification.
-    return new Namer(compiler);
+    return compiler.enableMinification ?
+        new MinifyNamer(compiler) :
+        new Namer(compiler);
   }

   Element get cyclicThrowHelper {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index 9056858..9485bc1 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -795,7 +795,7 @@ function(prototype, staticName, fieldName, getterName, lazyValue) {
       additionalArgument = ", '${namer.operatorIs(type.element)}'";
     }
     String setterName =
-        namer.setterName(member.getLibrary(), new SourceString(accessorName));
+        namer.publicSetterName(new SourceString(accessorName));
     buffer.add("$setterName: function(v) { "
         "this.$fieldName = $helperName(v$additionalArgument); }");
   }
@@ -1348,11 +1348,14 @@ $classesCollector.$mangledName = {'':
       }
       String internalName = namer.instanceMethodInvocationName(
           selector.library, new SourceString(methodName), selector);
+      Element createInvocationMirror =
+          compiler.findHelper(const SourceString('createInvocationMirror'));
       CodeBuffer buffer = new CodeBuffer();
       buffer.add('function($args) {\n');
       buffer.add('  return this.$noSuchMethodName('
-                     '\$.createInvocationMirror("$methodName", "$internalName",'
-                     ' $type, [$args], [$argNames]));\n');
+                        '${namer.isolateAccess(createInvocationMirror)}('
+                            '"$methodName", "$internalName",'
+                            '$type, [$args], [$argNames]));\n');
       buffer.add(' }');
       return buffer;
     }
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
index 4ca0554..cd0529f 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
@@ -16,7 +16,14 @@ class MinifyNamer extends Namer {
   const ALPHANUMERIC_CHARACTERS = 62;  // a-zA-Z0-9.

   String getFreshName(String proposedName, Set<String> usedNames) {
-    var freshName = _getUnusedName(proposedName, usedNames);
+    var freshName;
+    if (proposedName.startsWith(r'call$')) {
+      // We don't mangle the closure invoking function name because it is
+      // generated in applyFunction.
+      freshName = proposedName;
+    } else {
+      freshName = _getUnusedName(proposedName, usedNames);
+    }
     usedNames.add(freshName);
     return freshName;
   }
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index c8522a0..9f5b65d 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -211,6 +211,13 @@ class Namer {
     return 'get\$$fieldName';
   }

+  String publicSetterName(SourceString name) {
+    // We dynamically create setter from the field-name. The setter name must
+    // therefore be derived from the instance field-name.
+    String fieldName = name.slowToString();
+    return 'set\$$fieldName';
+  }
+
   String getMappedGlobalName(String proposedName) {
     var newName = globalNameMap[proposedName];
     if (newName == null) {
diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
index 1c9d772..1d50aa4 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
@@ -188,9 +188,9 @@ class _Manager {
   }

   void _nativeDetectEnvironment() {
-    JS("void", r"#.isWorker = $isWorker", this);
-    JS("void", r"#.supportsWorkers = $supportsWorkers", this);
-    JS("void", r"#.fromCommandLine = typeof(window) == 'undefined'", this);
+    JS("void", r"# = $isWorker", isWorker);
+    JS("void", r"# = $supportsWorkers", supportsWorkers);
+    JS("void", r"# = typeof(window) == 'undefined'", fromCommandLine);
   }

   void _nativeInitWorkerMessageHandler() {

R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15005 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 10:41:07 +00:00
dgrove@google.com
7897a78551 Changes outside pkg/ and lib/ for directory refactoring
Review URL: https://codereview.chromium.org//11358024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14475 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 15:18:11 +00:00
ahe@google.com
9ed60805f4 Don't depend on V8 when creating the SDK.
Review URL: https://codereview.chromium.org//11301019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14266 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 11:42:42 +00:00