Commit Graph

9541 Commits

Author SHA1 Message Date
Zachary Anderson 202e077815 Uses a finalizer to delete zlib filter resources
Also other misc. cleanup.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1777643003 .
2016-03-10 15:42:00 -08:00
Regis Crelier ea7929d2fb Ignore bounds in compile time type tests, since they will have been checked at
run time (fixes issue 25935).
Add regression test.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1780333002 .
2016-03-10 14:22:44 -08:00
John McCutchan 53cae0aed9 Add ability for embedder to provide private timeline trace data
- Add three new embedder hooks registered with Dart_SetEmbedderTimelineCallbacks
  - Dart_EmbedderTimelineStartRecording
  - Dart_EmbedderTimelineStopRecording
  - Dart_EmbedderTimelineGetTimeline

- Add unit test for record start / stop notification.
- Add unit test for get timeline.

This should allow Flutter to remove their hacked up timeline service RPCs.

R=chinmaygarde@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1783953002 .
2016-03-10 13:32:48 -08:00
Chinmay Garde a044cf9633 Avoid specifying DART_SHARED_LIB in the static library GN targets
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1781943002 .
2016-03-10 11:12:18 -08:00
Florian Schneider 631ac120bb VM: Fix --noopt build by using ZoneHandle.
BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1777093003 .
2016-03-10 13:47:07 +01:00
Florian Schneider dd0564d9b0 Fix non-x64 builds.
BUG=

Review URL: https://codereview.chromium.org/1783753002 .
2016-03-10 09:50:45 +01:00
Florian Schneider bec43a3b8f Simplify the VM's typed_data constructors.
Remove _new native functions to have one indirection less
when constructing typed data lists.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1782003002 .
2016-03-10 09:38:08 +01:00
Siva Annamalai 7520ecc48b Do not start the service isolate when generating the core library snapshot as it does not load any files or resolve URIs. This ensures that we do not have a race condition of the main isolate shutting down the service isolate before it gets to start.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1782493002 .
2016-03-09 23:24:45 -08:00
Sigmund Cherem 76a77d8b42 Skip tests in cpsir+checked mode until it is implemented
TBR=sra@google.com

Review URL: https://codereview.chromium.org/1780843002 .
2016-03-09 17:21:49 -08:00
Regis Crelier ba69c8a898 Enumerate URIs of all types in type errors in order to help the user diagnose
the error (it was previously only printed for types with identical names).
Cleanup and simplify construction of type errors.

R=hausner@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org/1778133002 .
2016-03-09 15:16:47 -08:00
Srdjan Mitrovic 60ce67d91f Fix sticky error propagation from thread to isolate
BUG=
R=asiva@google.com, iposva@google.com

Review URL: https://codereview.chromium.org/1769183003 .
2016-03-09 12:40:43 -08:00
Ryan Macnak ed52614322 Fix incorrect assertion failures in noopt regarding removing classes that still have constants.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1776243002 .
2016-03-09 12:11:23 -08:00
Matthias Hausner 5db2c56b5b Fix crash when setting breakpoint in Observatory
Fix bug in code that determines end token pos of classes, handle
typedef classes correctly.

BUG=25880
R=floitsch@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1767113007 .
2016-03-09 08:55:54 -08:00
Ryan Macnak a0e3bfdd68 Qualify the precompiled shared library name with the snapshot directory instead of using LD_LIBRARY_PATH.
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1771423002 .
2016-03-08 12:01:53 -08:00
Bob Nystrom cb7aa02116 Type check for-in statements.
This does nominal checking on the iterable expression used in a for-in
statement:

1. It must implement Iterable.
2. The type argument to Iterable must be assignable to the variable's
   type.

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

Review URL: https://codereview.chromium.org/1771153002 .
2016-03-08 11:25:49 -08:00
Ryan Macnak 46fea6cfb2 Update status file for some passing tests on MIPS and ARM.
R=regis@google.com

Review URL: https://codereview.chromium.org/1774613002 .
2016-03-07 12:17:27 -08:00
Regis Crelier cb0f9e98ea Fix typo in newly introduced mips assembly tests.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1767133002 .
2016-03-07 11:34:46 -08:00
Sigmund Cherem 385f3350c5 Update status of cpsir tests in checked mode: skipping for now, since more than
75% fail for one reason, once we fix that we can triage in more detail.

Review URL: https://codereview.chromium.org/1771893002 .
2016-03-07 10:20:41 -08:00
Ryan Macnak e880063e88 Include the canonical static closure when serializing ClosureData.
BUG=http://dartbug.com/25892
R=asiva@google.com

Review URL: https://codereview.chromium.org/1771483002 .
2016-03-07 09:06:26 -08:00
Florian Schneider 2148815673 Add fast path smi comparison operators.
Only rudimentary support for now, gives around 15% speedup on richards, precompiled.

Branch-merging is not yet supported in this CL.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1773633002 .
2016-03-07 08:55:43 -08:00
Matthias Hausner 3107a41bb7 Fix context level info in for-loops
The stack overflow check on the back-branch of the loop must
be at the same context level as the (outer) loop block of
the for-loop.

Before this change, the stack check was recorded to be at a
token position that is outside of the loop block, which caused
a context mismatch on some stack traces when the debugger
or the observatory interrupted the isolate on that back
branch.

It is not practical to write a test for this, unfortunately.

BUG=25684
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1768763002 .
2016-03-04 16:37:03 -08:00
Siva Annamalai 0bd9c54792 Ensure that calls to EnableGrowthControl/DisableGrowthControl does not reset the last_usage_ value as this can result in the heuristic constantly growing the heap instead of GCing. This was observed with the background compilation being turned on as we disable growth control during installation of code in the background compiler thread.
R=iposva@google.com

Review URL: https://codereview.chromium.org/1771503002 .
2016-03-04 16:17:32 -08:00
Ivan Posva 9535aa6426 - Remove loading of observatory assets from dart_bootstrap.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1766833002 .
2016-03-04 16:05:54 -08:00
Florian Schneider 5c38712ce9 Clean up more flags using flag list.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1766573003 .
2016-03-04 15:15:40 -08:00
Siva Annamalai c45ebeba70 Fix some potential data races based on output from tsan.
R=zra@google.com

Review URL: https://codereview.chromium.org/1765533003 .
2016-03-04 13:35:25 -08:00
Ryan Macnak 10f5ae69e8 ObjectPool is also used on IA32 for deopt.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1764283002 .
2016-03-04 12:33:33 -08:00
John McCutchan 32abe2ce55 Stream blocks of timeline events over the service protocol. Can be used to monitor long running programs without buffering all events inside the VM.
- Rename TimelineEventStreamingRecorder to TimelineEventCallbackRecorder. Note that this should only be used for tests.

- Add 'Timeline' service event stream.
- Send a 'TimelineEvents' event on the 'Timeline' stream whenever a TimelineEventBlock is finished and the 'Timeline' stream is subscribed to.

- Simple service protocol test.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1765563002 .
2016-03-04 12:30:50 -08:00
Ryan Macnak a78ed1c47a Tree-shake consts.
BUG=http://dartbug.com/25892
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1758153002 .
2016-03-04 09:42:53 -08:00
Florian Schneider 72a815c39f VM: Add smi fast path operations for precompiled code
The non-smi case is handled in a slow-path deferred code path.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1756403002 .
2016-03-04 09:33:09 -08:00
Zachary Anderson f6ddb4568f Regularize some errors thrown by SecureContext.
This is done by replacing a call to SSL_CTX_set_client_CA_list() with
calls to SSL_CTX_add_client_CA(), preserving the diagnostic status
return value discarded by the former.

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

Review URL: https://codereview.chromium.org/1761583002 .
2016-03-04 09:02:20 -08:00
William Hesse f425c82985 Add zlib dependency for dart_bootstrap build
The Dartium build does not include io components in the libraries, which
are what pull in zlib for the non-dartium builds of the SDK.  But it does
build dart_bootstrap, which needs zlib.  It actually should not need to
build dart_bootstrap, since it is useless without io capabilities.

BUG=
R=kasperl@google.com

Review URL: https://codereview.chromium.org/1761233003 .
2016-03-04 13:15:40 +01:00
Regis Crelier 6219753e18 Use TRUNC.W instead of CVT.W on mips to convert from double to int as to not
depend on the current rounding mode (fixes issue 25900).
Add support for TRUNC.W in assembler, disassembler, and simulator.
Fix disassembler to understand CVT.S.
Remove unused instructions.
Update co19 status file.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1765623002 .
2016-03-03 17:05:09 -08:00
Florian Schneider 69f39d0b83 VM: Don't do inline context allocation in precompiled code.
It saves almost 2% (dart2js) in generated snapshot size, and the performance
benefit is negligible in precompiled code.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1760153003 .
2016-03-03 16:22:13 -08:00
Ivan Posva d61ebd4ed2 - Unify dart_no_snapshot and dart_bootstrap into one binary.
BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1760063003 .
2016-03-03 14:53:59 -08:00
John McCutchan 3d5b6017c1 Adjust offset before querying inline information for samples that begin at exit frames
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1762833002 .
2016-03-03 13:58:10 -08:00
Siva Annamalai c51fcbf2b3 Turn off background compilation by default.
Review URL: https://codereview.chromium.org/1764823002 .
2016-03-03 13:48:48 -08:00
John McCutchan f7aec4b5d2 Set last resume timestamp when isolate is made runnable
Fall out from https://codereview.chromium.org/1756393002/ caused a checked mode test failure: https://build.chromium.org/p/client.dart/builders/vm-linux-release-ia32-be/builds/11330/steps/checked%20vm%20tests/logs/stdio

Review URL: https://codereview.chromium.org/1759303002 .
2016-03-03 13:34:03 -08:00
Srdjan Mitrovic 1cc5dab2f2 Clear fields sticky_error and pending_functions when unscheduling thread; enable background compilation
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1754703008 .
2016-03-03 12:32:54 -08:00
John McCutchan 49dc7e557b Fix some service protocol isolate life cycle races that were discovered by the Flutter testing tool.
Fixes #25902

Issue #1

Assuming --pause-isolates-on-start, there is a window of time after an isolate is made runnable and before it pauses at the first message that we say the isolate is "resumed".

- Fix issue #1 by claiming the isolate is paused on start if it will eventually pause on start.
- Also, handle the resume command for this state by clearing the 'should pause on start' bit.

Issue #2

Before an isolate is made runnable we say the isolate is "resumed".

- Fix issue #2 by introducing a new pause event "None".

R=turnidge@google.com

Review URL: https://codereview.chromium.org/1756393002 .
2016-03-03 11:30:41 -08:00
Zachary Anderson 7c2c02d6a6 Fix x86-64 Android build.
R=iposva@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1761953002 .
2016-03-03 11:11:31 -08:00
Ryan Macnak 167616b83e Skip mirror tests more generally for $mode == product instead of $runtime == dart_product.
Reduces failures in tools/test.py -mproduct.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1760043002 .
2016-03-03 10:06:59 -08:00
Todd Turnidge 5d83c5ec9b Print isolate properly in debug output for IsolateRunnable events.
Be a bit more verbose in test_helper to help us track down some test hangs.

BUG=
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1760963002 .
2016-03-03 09:53:44 -08:00
Søren Gjesse 9431f0b32c Fix Mac OS check for terminal input
Closes #25862
BUG= https://github.com/dart-lang/sdk/issues/25862

TBR=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1760033003 .
2016-03-03 10:40:12 +01:00
Srdjan Mitrovic 27a44122d9 Disable background compilation .. again.
BUG=
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1762543002 .
2016-03-02 18:04:00 -08:00
Srdjan Mitrovic 5d4b7b69bb Turn on background compilation
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1760763002 .
2016-03-02 17:32:27 -08:00
Srdjan Mitrovic b3405d5ebc Add --no-background-compilation to tests that expect to run code in optimized form
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1759973002 .
2016-03-02 16:30:58 -08:00
John McCutchan cd6485d380 Fix precompiler
BUG=
R=srdjan@google.com

Review URL: https://codereview.chromium.org/1755353002 .
2016-03-02 14:01:42 -08:00
Florian Schneider 48b0183926 Make precompiler work with product mode.
For now, change compilation-related flags to be regular
command line options. They won't affect the size of the
precompiled runtime anyway since the compiler is not included
there.

Also introduce a separate switch for precompiled runtime. This can be
 used instead of the macro since it is a compile-time constant in the
 precompiled runtime.

BUG=

Review URL: https://codereview.chromium.org/1759913002 .
2016-03-02 13:59:54 -08:00
Srdjan Mitrovic 4128c31916 Add thread safe constant canonicalization.
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1754813004 .
2016-03-02 12:12:48 -08:00
John McCutchan 58e0ef13fa Add source position information to profile
- Fix bug in inlined call token positios.
- Add ProfileFunctionSourcePosition for tracking source positions within functions.
- Keep a list of ProfileFunctionSourcePosition in each function.
- Add unit test helper functions.
- Add unoptimized unit tests that verify source positions in function profiles.
- Add optimized/inlined unit tests that verify source positions in function profiles.

R=srdjan@google.com

Review URL: https://codereview.chromium.org/1758653003 .
2016-03-02 12:02:28 -08:00