Commit graph

7998 commits

Author SHA1 Message Date
Alan Knight 9e0297f49e Make KeyboardEvent have direct fields for keyCode/charCode, as they're no longer inherited from UIEvent
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2896653003 .
2017-05-22 10:29:24 -07:00
Zachary Anderson 81e428fd39 [infra] Assembles the SDK using GN rather than create_sdk.py
This has a few advantages:
- We can track dependencies more precisely
- ninja can assemble things in parallel as they're ready rather than
  sequentially all at once.
- It is easier to customize SDKs depending on target platform, e.g.
  Fuchsia.

This CL also has a number of cleanups:
- Defining is_fuchsia and is_fuchsia host so we don't always have to check
- Piping through toolchain overrides in more places
- Fixing bugs in copy_tree.py, not using list_files.py, which is broken on Windows

related #29558

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2848943003 .
2017-05-20 23:30:09 -07:00
Ryan Macnak 1a5571904d Fuchsia SDK: Also copy zlib to the SDK's bin directory.
So we run with the one built in the Fuchsia tree instead of the (potentially absent) one from the host.

R=jamesr@google.com

Review-Url: https://codereview.chromium.org/2892223002 .
2017-05-19 13:23:14 -07:00
Jacob Richman 728f71f740 Ship dart2js output for dev_compiler/web in the sdk.
These tools are used to support applying source maps to stack traces
and running the Dart dev compiler in the browser as part of an extension.

This CL adds the following files
dart-sdk/lib/dev_compiler/web/ddc_web_compiler.js
dart-sdk/lib/dev_compiler/web/dart_stack_trace_mapper

BUG=
R=rmacnak@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2889253002 .
2017-05-19 13:21:53 -07:00
Stephen Adams 7983454299 js_runtime: loadDeferredLibrary: don't call initializer of repeated empty parts
Pre-filtering hunks to initialized ended up calling some initializations multiple times. This happened for empty parts, so was harmless after 4af03b1a65

Simplify logic to reduce use of corelib functions. There is no real need to be creating closures and calling all of List.generate, where, and map.

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2893653005 .
2017-05-18 14:16:41 -07:00
Lasse Reichstein Holst Nielsen 25a770fc97 Fix Stream.distinct.
Due to incorrectly shared state, a broadcast distinct stream listened to
more than once would give incorrect results.
Also update docs.

Fixes #29638, #29627.
BUG= http://dartbug.com/29638, http://dartbug.com/29627
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2885993005 .
2017-05-18 16:53:23 +02:00
Sigmund Cherem cd2ebf70a2 Add dart:html and friends to patched_dart2js_sdk/platform.dill, also fix up
warnings on these libraries.

R=sra@google.com

Review-Url: https://codereview.chromium.org/2885103005 .
2017-05-17 10:58:30 -07:00
Stephen Adams 750de777cf js_array tweaks
- uniform quotes
- uniform naming of methods in _checkGrowable
- use .slice(0), it is slightly faster than .slice()
- avoid bounds and type checks in removeWhere/retainWhere

BUG=
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2880643005 .
2017-05-16 16:38:13 -07:00
Stephen Adams 9c3d439b1e dart2js + html: getBoundingClientRect() returns a ClientRect
Gives better code since the general Rectangle requires getInterceptor
dispatch.

BUG= https://github.com/dart-lang/sdk/issues/29602
R=jacobr@google.com, terry@google.com

Review-Url: https://codereview.chromium.org/2879403002 .
2017-05-16 13:48:04 -07:00
Stephen Adams 89b9c7c8dd html: AudoTrackList is a List
BUG=
R=terry@google.com

Review-Url: https://codereview.chromium.org/2884813002 .
2017-05-15 14:44:35 -07:00
Stephen Adams 35979c3205 Add keyLocation to KeyboardEvent constructor for backwards compatibility
BUG=
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2884713002 .
2017-05-15 10:58:24 -07:00
Stephen Adams 01ba5f8d74 fix KeyEvent and KeyboardEvent
Some keyboard specific properties moved in the IDL from UIEvent to
KeyboardEvent.  We has done work to hide them on UIEvent; this needed
to be updated.

TBR=terry@google.com

BUG=

Review-Url: https://codereview.chromium.org/2883623004 .
2017-05-12 16:03:01 -07:00
Stephen Adams ca3d90c4cd Prevent ExtendableMessageEvent.data from thwarting DOM tree-shaking
We can't have the [data] and [source] getters typed as Object.
This causes it to appear that all DOM types are instantiated.

I have modelled the annotations after the same getters from
MessageEvent.

TBR=jacobr@google.com

BUG=

Review-Url: https://codereview.chromium.org/2879763002 .
2017-05-11 19:31:20 -07:00
Stephen Adams 0879884d80 web_audio: rename OfflineAudioContext.suspend
Rename member to avoid warning due to incompatible signature of base class method of same name.

TBR=terry@google.com

BUG=

Review-Url: https://codereview.chromium.org/2872023006 .
2017-05-11 18:05:09 -07:00
Leaf Petersen 8cdcfb98e2 Use Null argument for callback arity check in async_error.
Avoid relying on fuzzy arrow semantics by using Null for the callback type
parameter to be checked against.  Any function of the right arity will pass the "is"
check.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2878553003 .
2017-05-11 17:36:47 -07:00
Leaf Petersen ccbaabad8d Adjust types in SplayTree implementation and some strong tests to
avoid relying on fuzzy arrows.

BUG=
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2877683002 .
2017-05-11 17:27:32 -07:00
Stephen Adams 91f9ce3f71 Better type for _match argument in AttributeMatch
This fixes two warnings in analyze_api_test:

R=jacobr@google.com

sdk/lib/html/dart2js/html_dart2js.dart:41478:31:
Warning: The getter '_namespaceUri' is not defined for the class 'Node'.
  bool _matches(Node node) => node._namespaceUri == null;
                              ^^^^^^^^^^^^^^^^^^
sdk/lib/html/dart2js/html_dart2js.dart:41514:31:
Warning: The getter '_namespaceUri' is not defined for the class 'Node'.
  bool _matches(Node node) => node._namespaceUri == _namespace;
                              ^^^^^^^^^^^^^^^^^^
Review-Url: https://codereview.chromium.org/2875183002 .
2017-05-11 16:59:17 -07:00
Stephen Adams f3734a9fc5 dom: Recognize __getter__ indexers
BUG=
R=alanknight@google.com

Review-Url: https://codereview.chromium.org/2879663002 .
2017-05-11 13:59:41 -07:00
Zachary Anderson 5ec18fc68e [infra] Fix copy_tree.py to avoid extra rebuilding in Fuchsia
This CL computes the correct input and output in the copy_tree GN template by
modifying tools/copy_tree.py to perform a dry-run that lists the files to be copied.

Also, shutil.copytree uses shutil.copy2 to copy files and their metadata, but copying
the metadata appears to confuse ninja dependency tracking.

To do the dry run and to use shutil.copy instead of shutil.copy2, copy_tree.py now
uses its own CopyTree function instead of shutil.copytree.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2875893002 .
2017-05-11 09:46:15 -07:00
Lasse R.H. Nielsen 953f78d6dd Revert "Change some platform libraries to use part of URI."
This makes the analyzer generate a variety of odd errors.
Best guess is that it somehow fails to recognize Object as the Object class
(stack overflow while traversing superclasses, cannot assign Foo<T> to
Foo<Object> and similar errors can be explained by that).

Review-Url: https://codereview.chromium.org/2880543002 .
2017-05-11 11:42:21 +02:00
Lasse R.H. Nielsen 540bb7a0ec Change some platform libraries to use part of URI.
Use new dart-style. Now needs an SDK built with this checked in as well.

R=whesse@google.com

Review-Url: https://codereview.chromium.org/2871123004 .
2017-05-11 10:56:02 +02:00
Lasse R.H. Nielsen 3f90b06836 Rename StreamGroup to GroupedEvents.
Avoids clash with StreamGroup from package:async.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2872263003 .
2017-05-11 10:53:21 +02:00
Terry Lucas f27144d7b5 Roll 50: Updated for push to origin/master.
TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2875773003 .
2017-05-10 18:16:51 -07:00
Stephen Adams d9e094b906 Add more arguments to JS pseudo-function
TBR=sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2869333003 .
2017-05-10 14:03:46 -07:00
Terry Lucas 88a226b58b New sdk/lib generated from Chrome 50 IDLs
TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2871193002 .
2017-05-10 05:26:37 -07:00
Lasse R.H. Nielsen 7157b6aef2 Make Future._nullFuture be initialized synchronously.
Also type it as Future<Null> now that it makes sense.

Because there is no reason not to.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2867763003 .
2017-05-10 09:21:08 +02:00
Stephen Adams 73f45d6230 Do not use _nullFuture in _asyncStart
BUG=
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2867103004 .
2017-05-08 13:16:52 -07:00
Florian Loitsch 5202df2238 Warn when adding something to a closed sink and improve documentation.
Adding to a closed sink will throw once https://codereview.chromium.org/2857393003/ is committed.

Also:
Fixes #29122.

BUG= http://dartbug.com/29122
R=lrn@google.com, whesse@google.com

Committed: 8e19729b89
Reverted: 8f3ae7e7e1
Committed: c0090fa01f
Reverted: a4eb8b8fe3
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-08 15:52:19 +02:00
Florian Loitsch a4eb8b8fe3 Revert "Warn when adding something to a closed sink and improve documentation."
This reverts commit c0090fa01f.

Review-Url: https://codereview.chromium.org/2872603002 .
2017-05-08 15:18:46 +02:00
Florian Loitsch c0090fa01f Warn when adding something to a closed sink and improve documentation.
Adding to a closed sink will throw once https://codereview.chromium.org/2857393003/ is committed.

Also:
Fixes #29122.

BUG= http://dartbug.com/29122
R=lrn@google.com, whesse@google.com

Committed: 8e19729b89
Reverted: 8f3ae7e7e1
Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-08 14:27:06 +02:00
Florian Loitsch 8e01f69305 Void is not required to be null anymore.
In checked mode, `void` now accepts any value.

Fixes #28937.
Fixes #28938.

BUG= http://dartbug.com/28937
BUG= http://dartbug.com/28938
R=johnniwinther@google.com, kmillikin@google.com, lrn@google.com, regis@google.com

Committed: 521dc6620f
Reverted: a3c0cb65af
Committed: 4e52c457a9
Reverted: 4b35d3995b
Committed: 6caf9ef443
Reverted: 30d9bf2ed3
Review-Url: https://codereview.chromium.org/2718513002 .
2017-05-08 11:31:37 +02:00
Florian Loitsch c2ba323ad4 Update StreamTransformer documentation.
Fixes #29523.
BUG= http://dartbug.com/29523
R=lrn@google.com

Review-Url: https://codereview.chromium.org/2864863002 .
2017-05-08 11:29:47 +02:00
Lasse R.H. Nielsen 3e8bfb1adb Add groupBy to Stream.
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2850393003 .
2017-05-08 10:25:17 +02:00
Stephen Adams e3436ada00 dart2js: Improve code quality after min/max changes
The new definition gets inlined, which can cause the code to be
bigger.  Characterizing the JavaScript allows better scheduling around
the expression.

Making checkNum no-inline prevents inlining control flow that confuses
other optimizations.  Since the optimizer already understands when to
eliminate checkNum calls, this is not a problem.

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2857133008 .
2017-05-05 17:21:04 -07:00
Bob Nystrom 4145a49503 Move Dart versions of math.min() and math.max() into VM patch file.
For DDC and dart2js, we call the corresponding JS function. This is
shorter and avoids a strong mode type error in the Dart implementation.

R=jmesserly@google.com, lrn@google.com

Review-Url: https://codereview.chromium.org/2858353003 .
2017-05-05 15:15:21 -07:00
Alan Knight 95930806c9 Add dynamic declaration to CssRectangle width/height setters
BUG=
R=rnystrom@google.com

Review URL: https://codereview.chromium.org/2868483002 .
2017-05-05 13:34:23 -07:00
Nate Bosch bbc65073fa Clarify units for timeout
This is indicated in the linked MDN doc, but we should not make readers
go looking.

Also fix a typo.

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

Review-Url: https://codereview.chromium.org/2832353003 .
2017-05-05 10:11:03 -07:00
Jens Johansen 30d9bf2ed3 Revert "Void is not required to be null anymore."
This reverts commit 6caf9ef443.

Commit breaks vm-kernel-linux-debug-x64-be.

Triggers asserts like
../../runtime/vm/flow_graph_compiler_x64.cc: 658: error: expected: dst_type.IsMalformedOrMalbounded() || (!dst_type.IsDynamicType() && !dst_type.IsObjectType() && !dst_type.IsVoidType())

Quick-check with python tools/test.py -cdartk -t120 --builder-tag no_ipv6 --vm-options --no-enable-malloc-hooks isolate

BUG=

Review-Url: https://codereview.chromium.org/2865603003 .
2017-05-05 08:56:26 +02:00
Florian Loitsch 6caf9ef443 Void is not required to be null anymore.
In checked mode, `void` now accepts any value.

Fixes #28937.
Fixes #28938.

BUG= http://dartbug.com/28937
BUG= http://dartbug.com/28938
R=johnniwinther@google.com, lrn@google.com, regis@google.com

Committed: 521dc6620f
Reverted: a3c0cb65af
Committed: 4e52c457a9
Reverted: 4b35d3995b
Review-Url: https://codereview.chromium.org/2718513002 .
2017-05-04 16:27:52 +02:00
Florian Loitsch 8f3ae7e7e1 Revert "Throw when adding something to a closed sink and improve documentation."
This reverts commit 8e19729b89.

BUG=

Review-Url: https://codereview.chromium.org/2864443002 .
2017-05-04 12:52:47 +02:00
Florian Loitsch 8e19729b89 Throw when adding something to a closed sink and improve documentation.
As port of this CL all changes of https://codereview.chromium.org/20036002 are reverted.

Also fixes issue 29122.

BUG= http://dartbug.com/29122
R=lrn@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/2822173002 .
2017-05-04 11:42:22 +02:00
Stephen Adams ea2c9cba39 dart2js_html: Fix for issue 29538 - some returned lists may be null
Annotate querySelectorAll as not-null to recover code quality.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2857143003 .
2017-05-03 14:26:38 -07:00
Stephen Adams 1472eba52d js_runtime: Split _asyncHelper into separate functions
The separate functions have smaller call-sites and less overhead.

_asyncStart uses Future._nullFuture to avoid 1 allocation.

BUG=
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2858463002 .
2017-05-03 12:38:35 -07:00
Florian Loitsch 4b35d3995b Revert "Void is not required to be null anymore."
This reverts commit 4e52c457a9.

BUG=

Review-Url: https://codereview.chromium.org/2863463002 .
2017-05-03 19:22:22 +02:00
Florian Loitsch 4e52c457a9 Void is not required to be null anymore.
In checked mode, `void` now accepts any value.

Fixes #28937.
Fixes #28938.

BUG= http://dartbug.com/28937
BUG= http://dartbug.com/28938
R=johnniwinther@google.com, lrn@google.com, regis@google.com

Committed: 521dc6620f
Reverted: a3c0cb65af
Review-Url: https://codereview.chromium.org/2718513002 .
2017-05-03 17:43:23 +02:00
Florian Loitsch a3c0cb65af Revert "Void is not required to be null anymore."
This reverts commit 521dc6620f.

BUG=

Review-Url: https://codereview.chromium.org/2855173002 .
2017-05-03 17:36:39 +02:00
Florian Loitsch 521dc6620f Void is not required to be null anymore.
In checked mode, `void` now accepts any value.

Fixes #28937.
Fixes #28938.

BUG= http://dartbug.com/28937
BUG= http://dartbug.com/28938
R=johnniwinther@google.com, lrn@google.com, regis@google.com

Review-Url: https://codereview.chromium.org/2718513002 .
2017-05-03 17:31:21 +02:00
Vijay Menon d5ecaf1088 Loosen type check on runZoned errorHandler
R=floitsch@google.com, lrn@google.com

Review-Url: https://codereview.chromium.org/2858843002 .
2017-05-03 05:30:06 -07:00
Lasse R.H. Nielsen 5a1a1509fc Fix some bad documentation links.
Addresses some of the cases of issue #29534.
BUG= http://dartbug.com/29534

Review-Url: https://codereview.chromium.org/2856123003 .
2017-05-03 13:10:46 +02:00
Lasse R.H. Nielsen 7998f590b1 Update documentation on trignometric functions.
Fixes #17515
BUG= http://dartbug.com/17515
R=floitsch@google.com

Committed: 40220ec076
Review-Url: https://codereview.chromium.org/2852053002 .
2017-05-03 09:49:14 +02:00