Commit graph

34687 commits

Author SHA1 Message Date
Paul Berry 0109c4caea Bump analyzer version to 0.26.2 in preparation for publishing.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1415373004 .
2015-11-02 12:51:13 -08:00
John McCutchan 6365c27f81 Switch profiler from isolates to threads
- API breakage: Dart_IsolateBlocked, Dart_IsolateUnblocked -> Dart_ThreadDisableProfiling, Dart_ThreadEnableProfiling.
- Remove IsolateProfilerData.
- Move thread at blocking call count from isolate to thread.
- Always interrupt threads unless they are blocked.
- We can no longer count "idle" ticks.
- Only record sample if thread is the current mutator of an isolate.
- Refactor ThreadInterrupterCallback to ensure that Thread* is valid.

Threads are only ever sent signals if ThreadInterruptsEnabled is true. Which is controlled by two functions:

void DisableThreadInterrupts();
void EnableThreadInterrupts();

R=asiva@google.com, iposva@google.com

Review URL: https://codereview.chromium.org/1412733008 .
2015-11-02 12:47:52 -08:00
Matthias Hausner f094c36141 Constant cache improvement
Change the compile-time constant map to use a pair (url, token_pos) as
the key. Previously, the two values were concatenated into a string, which creates a lot of new strings.

BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1424393002 .
2015-11-02 10:59:19 -08:00
Florian Schneider e75056ccb4 VM: Fix bug with CHA-based inlining in --noopt mode.
Use propagated cids (not abstract types) only to specialize instance calls.

BUG=dartbug.com/24789
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1419013006 .
2015-11-02 19:48:26 +01:00
Paul Berry cebb0dfb91 Refactor code for checking that generated files are up to date.
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1430723002 .
2015-11-02 10:46:23 -08:00
Kevin Moore 156bc53866 Hide implementation members in dart:html, dart:js and related libraries
Closes https://github.com/dart-lang/sdk/issues/24602

R=alanknight@google.com, jacobr@google.com, terry@google.com

Review URL: https://codereview.chromium.org/1416043008 .
2015-11-02 13:23:22 -05:00
William Hesse 1adacaf300 Update documentation for secure networking classes. Remove certificateName parameter.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1425533010 .
2015-11-02 17:41:27 +01:00
Brian Wilkerson 323ce5d693 Fix null pointer (issue 24790)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1426943005 .
2015-11-02 08:05:07 -08:00
William Hesse ef5f949c86 Update status for dartium tests.
BUG=https://github.com/dart-lang/sdk/issues/24795
BUG=https://github.com/dart-lang/sdk/issues/24571
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1407113009 .
2015-11-02 16:19:59 +01:00
Johnni Winther 57538d804d Add StaticUse for more precise registration of statically known element use.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1424923004.
2015-11-02 14:46:05 +01:00
Sigurd Meldgaard f7998baf71 Add .platform files to jsonify.
This allows 'try' to  run again.

BUG=

Review URL: https://codereview.chromium.org/1420843008 .
2015-11-02 14:43:22 +01:00
Johnni Winther d4021e92a1 Don't crash on error at end-of-file.
BUG=

Review URL: https://codereview.chromium.org/1415883011.
2015-11-02 14:05:56 +01:00
Sigurd Meldgaard c0d5f73bd0 Introduce "platform configurations" to replace categories and libraries.dart.
A small writeup of the thoughts behind this concept can be found at:
https://docs.google.com/a/google.com/document/d/1WkqJVPphuThH8h2jDqBOb6h1iMkrkQIO7PF638-qlso/edit?usp=sharing

BUG=
R=floitsch@google.com, johnniwinther@google.com, whesse@google.com

Review URL: https://codereview.chromium.org/1408253006 .
2015-11-02 13:02:25 +01:00
Johnni Winther b4f81a216f Support multiline location messages and use signature for function spans.
BUG=
R=ahe@google.com

Review URL: https://codereview.chromium.org/1420013002.
2015-11-02 11:52:44 +01:00
Asger Feldthaus 646a0b277f dart2js cps: Support --trust-primitives and --trust-type-annotations.
Values assigned to a local variable are assumed to satisfy the type
annotation if --trust-type-annotations is given.

Bounds checks are omitted if --trust-primitives is given.

BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1408783004 .
2015-11-02 11:25:57 +01:00
Brian Wilkerson e37a7bddfc Remove unused support for disabling error messages
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1424793008 .
2015-10-31 08:53:40 -07:00
Florian Schneider dde638f7db Mark tests failing with --noopt in the status files.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1415823004 .
2015-10-31 01:45:50 +01:00
Jacob Richman d0f456a910 Fix behavior when typed JS interop getters are called as functions.
BUG=
R=sigmund@google.com, sra@google.com

Review URL: https://codereview.chromium.org/1431523002 .
2015-10-30 16:07:04 -07:00
Stephen Adams 2d03bd52ff dart2js cps_ir: avoid world.fieldNeverChanges()
http://dartbug.com/24781 needs to be fixed before this work-around can be reverted.

TBR=asgerf@google.com
CC=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1412493003 .
2015-10-30 15:27:10 -07:00
Florian Schneider 05ad578b77 VM: Don't rely on always running constant propagation in the optimizer
When inlining functions that unconditionally throw (have zero normal returns),
the optimizer inserts a branch with a true condition and relies on
 constant propagation to remove the rest of the caller which becomes unreachable
 after inlining.

 This allows to compilesuch functions without running constant propagation by
 replacing uses of the return value with null.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1419553005 .
2015-10-30 22:48:59 +01:00
Srdjan Mitrovic e9171461fd Move compilation queues into BackgroundCompiler class
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1412463007 .
2015-10-30 13:32:21 -07:00
Ryan Macnak e666436d05 Fix processing profiler samples in the presence of Thumb code.
R=zra@google.com

Review URL: https://codereview.chromium.org/1410543011 .
2015-10-30 12:49:32 -07:00
Srdjan Mitrovic fe4a5d7672 This adds a mechanism to invalidate code that was generated in the background. The invalidation can happen if a relevant event was invoked between background compilation start and installation of code (e.g, field type invalidatet, subclasses added, deferred loading).
We introduce 3 invalidation generation counters: CHA, field and library prefixes. If one of the counters was incremented during compilation, and is relevant for that compilation, the code installation is skipped since that code may have become invalid in the meantime.

Add BackgroundCompilationResult that remembers the 3 invalidation generations.

The generational counter can rollover, which is OK.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1418813008 .
2015-10-30 12:18:52 -07:00
Stephen Adams cc0525c0c4 Simple sharing and hoisting of final field loads
Final fields always yield the same value. Replace GetField operations with references to pevious in-scope GetField operations. If it is safe, hoist the GetField to the loop where the input is defined.

This is a temporary pass while I continue on load elimination.

R=asgerf@google.com

Review URL: https://codereview.chromium.org/1415923012 .
2015-10-30 11:36:37 -07:00
Florian Schneider 94e5994f16 VM: Change debug printing of Context to not print the raw-pointer
This makes comparing flow-graphs from different runs of the VM much easier.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1408223009 .
2015-10-30 19:19:40 +01:00
Zachary Anderson 8718e005ff Fix Isolate scopes in service isolate shutdown
We can't shutdown an Isolate inside of a handle scope.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1430783002 .
2015-10-30 09:57:29 -07:00
Ryan Macnak 6d3bb00887 Fix profiling on ARM64.
Linux/Android broken in 91bc8005fe.

iOS was unimplemented.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1428893003 .
2015-10-30 09:26:24 -07:00
Ryan Macnak aaf3c393ab Clean up service isolate loading error check.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1417963009 .
2015-10-30 09:11:13 -07:00
pq fc78375928 More error codes.
R=brianwilkerson@google.com, scheglov@google.com

Review URL: https://codereview.chromium.org/1421953003 .
2015-10-30 08:28:59 -07:00
Konstantin Shcheglov 1bc7f93009 Adding a not explicit source makes it explicit.
When we add a new file in IDEA and open it in the editor, this causes
analysis.setSubscriptions to be send immediately, even before watcher
notices it. The server reacts by requesting the fully resolved unit, and
so causes creation of a not-explicit CacheEntry. So, when later we handle
applyChanges(), the entry already exists. In this case we still need to
mark it as explicit.

R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1411243010 .
2015-10-30 08:04:27 -07:00
Konstantin Shcheglov 765c7fd0f1 Mark HintCode.CAN_BE_NULL_AFTER_NULL_AWARE as fixable.
R=pquitslund@google.com
BUG=

Review URL: https://codereview.chromium.org/1428903002 .
2015-10-30 08:02:29 -07:00
Zachary Anderson 3563dc0fb0 Use ExitProcess on Windows.
Even after joining threads, it is still possible for the exit code to be
polluted. NaCL uses ExitProcess to avoid this problem:

https://code.google.com/p/chromium/codesearch#chromium/src/native_client/src/shared/platform/win/nacl_exit.c

This change also cleans up thread local storage for the last Thread.

BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1410293006 .
2015-10-29 23:35:46 -07:00
Jacob Richman e0d2263bb3 Add @anonymous annotation and restrict object literal constructors to only anonymous classes. This frees up defining factory constructors that do not correspond to object literals on JS interop classes.
BUG=
R=sra@google.com

Review URL: https://codereview.chromium.org/1409033005 .
2015-10-29 19:18:19 -07:00
Jacob Richman 688b69fb65 Support isExternal method on MethodMirror in the Dart VM. Not really intended for public consumption. switch to using isExternal and using anonymous.
BUG=
R=alanknight@google.com, asiva@google.com

Review URL: https://codereview.chromium.org/1421133003 .
2015-10-29 19:17:08 -07:00
Konstantin Shcheglov 03eed1c3c9 Fix for duplicate priority sources.
R=brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/1408163008 .
2015-10-29 17:46:00 -07:00
Terry Lucas e84f9941e1 Fixed Native custom element
BUG=24754
R=alanknight@google.com

Review URL: https://codereview.chromium.org/1422323006 .
2015-10-29 17:05:59 -07:00
Kevin Moore bf713555bf Remove dart:isolate changes from 1.13 changelog, documented spawnUri environment argument
Closes https://github.com/dart-lang/sdk/issues/24757
helps https://github.com/dart-lang/sdk/issues/24474

R=sethladd@google.com

Review URL: https://codereview.chromium.org/1423323003 .
2015-10-29 16:36:58 -07:00
Matthias Hausner 7c924f0a25 Token stream iterator improvement
Eliminate the double indirection in accessing the token object array. It has no measurable effect, unfortunately :)

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1427863002 .
2015-10-29 16:36:31 -07:00
pq 081ba4fad2 Bump to pull in latest analyzer_cli.
This build picks up improved `.analysis_options` support, aligning CLI with server (and giving it support for error filters and language configuration such as `enableSuperMixins`).

R=keertip@google.com

Review URL: https://codereview.chromium.org/1415223006 .
2015-10-29 15:23:30 -07:00
Ryan Macnak 37dd876bf1 VM: Service isolate under precompilation.
- Include the embedder's portion of the service isolate's Dart code in precompiled snapshots. Swap it in as the root library when running precompiled instead of loading from source.
- Make linter happy with gen_snapshot.
- Fix profiler to consider Instructions in the VM isolate may have their corresponding Code in the regular isolate.
- Make non-functional service RPCs fail cleanly instead of crashing.

BUG=http://dartbug.com/24651
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1418833004 .
2015-10-29 15:15:46 -07:00
Kevin Moore 8a3784582f update changelog for 1.13 socket reference change
helps with https://github.com/dart-lang/sdk/issues/24474

R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1427883002 .
2015-10-29 15:01:59 -07:00
Kevin Moore a8ada7d767 Add 1.13 changelog entries for dart:convert WRT Base64
helps https://github.com/dart-lang/sdk/issues/24474

R=lrn@google.com

Review URL: https://codereview.chromium.org/1413053003 .
2015-10-29 15:00:02 -07:00
Florian Schneider bcde4eee0b VM: Add double unary minus intrinsic.
Also remove an extra indirection in the unary minus operator for Double.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1422753004 .
2015-10-29 22:58:33 +01:00
Kevin Moore 4627a8e916 Added 1.13 changelog entries for changes in dart:async
Helps with https://github.com/dart-lang/sdk/issues/24474

R=lrn@google.com

Review URL: https://codereview.chromium.org/1417983005 .
2015-10-29 14:57:10 -07:00
Siva Annamalai baaee47bd8 Minor cleanup as saved_isolate_ should always be NULL in this case per the ASSERT in the constructor.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1408183004 .
2015-10-29 14:36:45 -07:00
Florian Schneider 64261cbb9d VM: Improve and fix double negation on MIPS.
Add neg-instruction to the MIPS backend and use it instead of mul with -1.

Fixes the test that requires that identical(nan, -nan) == false.

TEST=language/nan_identical_test
R=zra@google.com

Review URL: https://codereview.chromium.org/1425143003 .
2015-10-29 22:34:46 +01:00
Ryan Macnak 7cacbff77b Allow for multiple rounds of precompilation.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1420533006 .
2015-10-29 14:25:09 -07:00
pq af7017e585 Option support for enableSuperMixins (and more).
* Adds language configuration support to `.analysis_options`:

  analyzer:
    language:
      enableSuperMixins: true

  (with validation).

* Extracts context configuration out of `server` context_manager and into `analyzer` where it can be re-used by `analyzer_cli`.
* Some general cleanup of option validation (with more to come!)

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/1423333002 .
2015-10-29 14:11:26 -07:00
Brian Wilkerson a7f2f5b4e1 Revert "Compute propagated type for final instance fields (partially addresses issue 23001)"
R=paulberry@google.com

Review URL: https://codereview.chromium.org/1428803004 .
2015-10-29 14:02:38 -07:00
Brian Wilkerson 677d4b5bbc Compute documentation offsets for library, import, and export directive elements (issue 24756)
R=keertip@google.com

Review URL: https://codereview.chromium.org/1427513003 .
2015-10-29 14:00:02 -07:00