Commit Graph

97 Commits

Author SHA1 Message Date
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
aprelev@gmail.com 4c67d2a994 Enabled use of snapshot for dart2js on Windows.
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14185 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 11:49:03 +00:00
erikcorry@google.com 38be5a3dea Revert "Minifying renamer for classes, methods and instance variables."
This reverts r14132.
TBR=floitsch
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14138 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 13:51:08 +00:00
erikcorry@google.com a33aa90ee0 Minifying renamer for classes, methods and instance variables.
R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14132 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 12:49:04 +00:00
ahe@google.com 93021fe221 Decrease swarm compile-time by 20%...
...by turning off inlining :-(

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14083 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-25 15:41:47 +00:00
rnystrom@google.com 9049103355 Add script for pub buildbots.
Also modify annotated_steps to invoke it on the right bots.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14032 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 17:53:06 +00:00
efortuna@google.com ce3543f212 Reapply ie to ie9 rename.
Review URL: https://codereview.chromium.org//11231081

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13978 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 17:17:30 +00:00
efortuna@google.com 920589055f Revert rename ie to ie9.
Review URL: https://codereview.chromium.org//11249003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13976 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 16:28:33 +00:00
efortuna@google.com 31fb4a0c74 Complete renaming of ie bots to ie9, to add ie10.
Review URL: https://codereview.chromium.org//11189101

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13908 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 20:59:01 +00:00
ricow@google.com bb04388ecc Temporary fix to make IE bots green.
There is a bigger cl doing all of the renaming here:
https://codereview.chromium.org/11189101/
Review URL: https://codereview.chromium.org//11234026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13860 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-22 10:58:52 +00:00
ahe@google.com 755abed9dc Generate snapshot for dartj2s; use it in the SDK.
Review URL: https://codereview.chromium.org//11187028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13773 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-18 11:25:11 +00:00
efortuna@google.com 4839206863 Rename ie to ie9.
Review URL: https://codereview.chromium.org//11184015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13748 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 17:44:38 +00:00
efortuna@google.com f8948ae8b9 Delete temporary files on Opera bot.
Review URL: https://codereview.chromium.org//11186012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13714 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 00:54:35 +00:00
efortuna@google.com 5c4c062a2f Delete temporary profile files for Opera as well as Firefox.
Review URL: https://codereview.chromium.org//11137007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13640 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-13 00:04:23 +00:00
ricow@google.com 1bde0bc06d Update buildbot.py to support jsshell builders.
Review URL: https://codereview.chromium.org//11029048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13342 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-08 05:49:13 +00:00
dgrove@google.com 71a2d4d913 Second attempt to fix issue 3402. It turns out that we can't use
$_, because that contains the original script name (in the case
test.py, $_ contains .../test.py when this script is executed.

Using $0 will work fine, as pwd -P will give the absolute
physical path of the dart script.
Review URL: https://codereview.chromium.org//10981070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13030 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 17:18:40 +00:00
dgrove@google.com c2d8dd6e68 revert change 13025.
Review URL: https://codereview.chromium.org//10990112

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13027 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 16:26:53 +00:00
dgrove@google.com ba55e7aa71 Fix issue 3402 . The initial suggestion of using readlink doesn't
work on MacOS, so I went this slightly more obtuse solution, which
does work on MacOS and Linux.
Review URL: https://codereview.chromium.org//10985068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13025 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-28 16:18:33 +00:00
ricow@google.com fff3024962 Make copy of flags before passing it to TestCompiler
We are adding to the flags in the TestCompiler function and are duplicating flags since we might call it again.
Review URL: https://codereview.chromium.org//10944034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12579 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 17:27:39 +00:00
ricow@google.com a16b96fdec Run checked mode tests on the slow IE bot
Review URL: https://codereview.chromium.org//10946022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12544 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 09:19:59 +00:00
antonm@google.com 1834e21180 Reapply change which was reverted by mistake.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12543 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 09:15:20 +00:00
antonm@google.com 13de87215b Triaging dart2dart co19 tests.
TBR=smok@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12537 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 08:24:46 +00:00
ricow@google.com 81aafa62d9 Refactor utils/compiler/buildbot.py (partly to fix IE bots, partly because it needs it)
This change will:
Disallow bots starting with web-

Support the new naming schema for the ie bots (I explicitly set this
to html|all, but we can change it to a generic identifier if you like)

Introduces a new BuildInfo class that we return from GetBuildInfo
instead of a huge tupple; I want to start passing this around instead
of explicitly giving all the arguments to e.g., TestCompiler, but
currently I don't do it due to our special cases.

Removes the ie sharding todos since we now have an explicit way of passing allong which tests we want based on the name (I am not stating that this is a good solution, but until we have more bots to shard across I think this is better than what we had)
Review URL: https://codereview.chromium.org//10937024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12535 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 08:06:02 +00:00
ricow@google.com e4d7741572 Fix sharding index extraction for in browser testing.
Review URL: https://codereview.chromium.org//10942021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12531 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 05:10:31 +00:00
ricow@google.com 89a6921836 Change utils/compiler/buildbot.py to use our new naming schema.
Additionally, some cleanup and update of comments regarding return tupples and parameters. 
Review URL: https://codereview.chromium.org//10944010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12530 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 05:03:54 +00:00
ahe@google.com a6f34e5738 Hack to accept, but not use, colors option
BUG=http://dartbug.com/4996

Committed on behalf of Matthew Butler <butler.matthew@gmail.com>.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12384 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 13:34:02 +00:00
rnystrom@google.com 05dadf490e Reorganize dartdoc to new package layout.
Review URL: https://codereview.chromium.org//10919260

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12338 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 16:49:48 +00:00
ahe@google.com 722e7ce28d Add --step_name option to test.dart.
Review URL: https://chromiumcodereview.appspot.com//10905208

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12296 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 04:19:11 +00:00
antonm@google.com a1770a8bbd Sync .gitignore with the corresponding svn properties.
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12122 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 15:44:25 +00:00
ahe@google.com ebd6307d57 Scrub step names to avoid breaking buildbot features.
Review URL: https://chromiumcodereview.appspot.com//10919182

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12096 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 18:06:38 +00:00
ngeoffray@google.com fce3e2ec01 Fix checked mode on browser.
Review URL: https://chromiumcodereview.appspot.com//10912109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11933 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 10:48:22 +00:00
ahe@google.com f60c22adb8 Disable browser dart2js checked mode tests. Too broken.
Review URL: https://chromiumcodereview.appspot.com//10911107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11896 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 19:01:38 +00:00
ahe@google.com 2cb2b0161a Disable checked mode browser tests on platforms where they break test framework.
Review URL: https://chromiumcodereview.appspot.com//10919099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11885 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 16:21:37 +00:00
ahe@google.com c19adedfa5 Test dart2js checked mode.
Review URL: https://chromiumcodereview.appspot.com//10911094

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11873 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 12:02:53 +00:00
ahe@google.com e82ca32178 Improve [relativize] for Windows.
Review URL: https://chromiumcodereview.appspot.com//10914094

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11864 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-05 09:35:12 +00:00
ahe@google.com c1564e0114 Improve detection of when to use colors.
Review URL: https://chromiumcodereview.appspot.com//10910006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11628 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 17:03:10 +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
ahe@google.com 36dfc00144 Disable colors on Windows and non-ttys.
Review URL: https://chromiumcodereview.appspot.com//10860041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10980 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-20 15:25:56 +00:00
efortuna@google.com 1a5e39d4eb Remove dysfunctional "always clobber" from Windows build.
Review URL: https://chromiumcodereview.appspot.com//10837269

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10836 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 16:51:09 +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
ricow@google.com 13cafea03d Address additional review comments for annotated steps in r10644
TBR=ahe
Review URL: https://chromiumcodereview.appspot.com//10855169

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10701 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 07:21:40 +00:00