Commit Graph

1458 Commits

Author SHA1 Message Date
nweiz@google.com 7137d14a03 Use HTTPS everywhere for "pub lish".
BUG=7115

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15658 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-03 21:16:38 +00:00
rnystrom@google.com 2b3c4cd639 Make directory renaming more resilient on Windows.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15608 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 22:39:45 +00:00
nweiz@google.com 7f9128e262 Restrict the set of files that will be pub lished.
This ensures that hidden directories, packages directories, and pubspec.lock
files aren't pub lished.

BUG=7001

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15602 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 21:37:37 +00:00
rnystrom@google.com 0c0d8d9dc7 Get curl uploads working on Mac.
Review URL: https://codereview.chromium.org//11411273

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15592 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 18:21:41 +00:00
nweiz@google.com 6a6c381b91 Use pkg/http pervasively in pub.
Review URL: https://codereview.chromium.org//11280246

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15559 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 01:15:23 +00:00
nweiz@google.com 5c7323f35d Keep around a copy of the http.Request that triggered each Response.
Review URL: https://codereview.chromium.org//11348309

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15555 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 00:09:18 +00:00
nweiz@google.com f7f4e8c458 Give all async exceptions in pub some sort of stack trace.
Review URL: https://codereview.chromium.org//11421159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15547 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:45:51 +00:00
rnystrom@google.com 816bcbff5e Fix relativeToPub() to work in the SDK too.
Review URL: https://codereview.chromium.org//11419236

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15545 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:19:27 +00:00
blois@google.com 76b1800cd6 Splitting the Audio types out of the HTML library.
BUG=3108

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15529 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 17:58:26 +00:00
nweiz@google.com 806e8a5432 Mark pub oauth2 and curl_client tests as skip on Windows.
Review URL: https://codereview.chromium.org//11308262

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15488 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 00:52:00 +00:00
nweiz@google.com ff3ab9a439 Mark the pub oauth2_test as failing on Windows.
Review URL: https://codereview.chromium.org//11418227

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15483 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 00:39:07 +00:00
rnystrom@google.com e7382431ba Get archive creation working on Windows.
Review URL: https://codereview.chromium.org//11348288

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15482 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 00:20:28 +00:00
nweiz@google.com 2df3fd15b2 The macos pub tests are working again.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15479 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 23:34:34 +00:00
nweiz@google.com 558ffd19bf Work around issue 6984.
This ensures that before an HTTP response is closed, its corresponding
request is drained of input.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15476 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 22:43:10 +00:00
nweiz@google.com a964e37605 Don't require users to copy-paste authorization codes when authorizing pub.
BUG=6951

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15468 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 19:45:06 +00:00
ajohnsen@google.com 50a4a92d22 Hide aliases when printing 'pub --help'.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15440 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 06:26:06 +00:00
nweiz@google.com 3b5ab2e81e Add support for pub command aliases.
BUG=6949

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15434 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:57:30 +00:00
nweiz@google.com c2d351b552 Mark pub Windows tests as failing.
Review URL: https://codereview.chromium.org//11348266

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15432 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:46:55 +00:00
rnystrom@google.com d2213763e0 Make pub git tests fast on windows again.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15424 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 23:21:04 +00:00
nweiz@google.com 8161b23167 Fix or mark "pub lish" build failures.
Review URL: https://codereview.chromium.org//11411201

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15423 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 23:10:47 +00:00
nweiz@google.com e67b17723c Add an initial "pub lish" command.
BUG=6177

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15422 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 22:48:59 +00:00
rnystrom@google.com ce5a461318 Update Version to latest language changes.
Review URL: https://codereview.chromium.org//11308236

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15421 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 22:38:03 +00:00
rnystrom@google.com 03320a2c66 Update YAML to latest language changes.
Review URL: https://codereview.chromium.org//11348257

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15420 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 22:37:19 +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
ahe@google.com 7a3632d3ee Update dependencies after big lib -> sdk/lib move.
Review URL: https://codereview.chromium.org//11418141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15374 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 09:24:12 +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
rnystrom@google.com 8ce4fd1895 Mark the pub tests as slow/timeout on Windows.
Review URL: https://codereview.chromium.org//11421085

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15361 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 00:57:36 +00:00
rnystrom@google.com d824a21ef4 Git tests on Windows are fast now.
Review URL: https://codereview.chromium.org//11414170

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15348 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 22:03:36 +00:00
erikcorry@google.com 359736e97a Fix Unicode issues in dart2js and dart2dart.
R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15254 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:51:14 +00:00
rnystrom@google.com 08b3c5ef6f Avoid passing absolute path to 7zip.
Review URL: https://codereview.chromium.org//11417102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15186 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 00:15:33 +00:00
erikcorry@google.com 84da84c22d Revert "Add some support for the code-point code-unit distinction."
This reverts commit r15150

R=karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com 547cbf9da6 Add some support for the code-point code-unit distinction.
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.

R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +00:00
nweiz@google.com 500db0fb88 Enable CurlClient tests on Windows by bundling curl.exe.
BUG=6777

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15117 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 22:55:30 +00:00
nweiz@google.com ed9a474a50 Add a package for authenticating via OAuth2.
Review URL: https://codereview.chromium.org//11420025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15115 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 22:23:33 +00:00
nweiz@google.com f4e557d746 Move CurlClient to Pub so that it can access resources.
This CL also enables tests for the client on Linux and OS X.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15047 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-17 01:15:45 +00:00
ager@google.com 3fb41705e5 Rename File.readAsText to File.readAsString. There is no Text type in Dart
and the methods return Strings.

R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15011 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 13:10:15 +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
rnystrom@google.com 90325c70ca Remove support for old package layouts.
Review URL: https://codereview.chromium.org//11280018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14990 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 00:23:58 +00:00
rnystrom@google.com 24b6b08b04 Don't require "branches" directory in git repo.
The pub tests just validate that it looks "like" a git repo.
It seems like some git repos (ones from git later than 1.8?)
don't have this directory so let's just not worry about it.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14988 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 23:52:05 +00:00
rnystrom@google.com 7cc5243981 Validate that the homepage is using an approved scheme.
Also cleaned up the pubspec tests a bit.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14984 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 22:53:16 +00:00
rnystrom@google.com 4fc4f5eb9f Undo bogus change to use old dart:io API.
Review URL: https://codereview.chromium.org//11410102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14928 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 23:29:46 +00:00
rnystrom@google.com 26e59cf859 Fix error reporting on invalid command line args.
It would crash in a few cases if you didn't pass in a valid command
Also fixed a few unrelated warnings since a warning we learned to
ignore was masking the original issue. :(

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14927 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 23:22:35 +00:00
floitsch@google.com 3e2f323981 Dynamic -> dynamic.
Review URL: https://codereview.chromium.org//11312237

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14898 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 15:33:25 +00:00
rnystrom@google.com 10c9d938ab Place "packages" directories inside "tool".
Review URL: https://codereview.chromium.org//11362233

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14868 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 22:06:35 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
ajohnsen@google.com ab69873a42 Make RegExp constructor non-const.
Another take of https://codereview.chromium.org/11410033/ with status changes applied for co19 tests.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14837 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:18:06 +00:00
ajohnsen@google.com ec9fee9858 "Reverting 14829-14832"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14833 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 07:28:13 +00:00
ajohnsen@google.com 0dbc2e6eaa Two more files with const RegExp.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14832 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 07:11:19 +00:00