Commit Graph

11356 Commits

Author SHA1 Message Date
Kevin Millikin fdb4c100e0 Move _fatal from dart:core to dart:_internal
_fatal was a private function in dart:core which was called from a
different library (dart:async).  It's not clear how it was supposed to
work or if it even did.  The uses in dart:async don't appear to be
covered by tests.

Move it to dart:_internal which exists exactly for sharing things
between the dart: libraries.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2684033006 .
2017-02-09 12:46:51 +01:00
Jens Johansen 65e5de9a42 Make service tests more resilient to isolate load timing
https://github.com/dart-lang/sdk/issues/28609

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2670303003 .
2017-02-09 10:02:16 +01:00
Ryan Macnak bee82fef8b Reapply "Use CodeSourceMap for stack traces (still JIT only)."
Include CodeSourceMaps in app-jit snapshots.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2686623006 .
2017-02-08 16:43:47 -08:00
Florian Schneider 504e6bb1dc VM: Make debug printing of AST/scopes use --print-flow-graph-filter flag.
Helps reading debug output from these flags.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2684073005 .
2017-02-08 16:26:38 -08:00
Florian Schneider 67a93da99e Handle type literals correctly with deferred loading and await.
When referring to constants via a deferred prefix in an await expression
the transformation must make sure that the generated code before and after
the deferred load agree on the number of captured variables. (i.e. the number
of await-temp variables introduced by the await-transformer is the same)

This CL uses a temporary in the case of compile-time constants, because before
the deferred load, a reference lib.C is translated into a static getter which
also requires a temporary.

Fixes #28678

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2683973002 .
2017-02-08 15:37:39 -08:00
Siva Annamalai 84e95a971f Fix for issue 28638 - flakiness on dartkp-dart-precompiled caused by MallocHooks
BUG=#28638
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2678313003 .
2017-02-08 13:45:05 -08:00
Ryan Macnak 9e3bd0ef0a Revert "Use CodeSourceMap for stack traces (still JIT only)."
Failed with app-jit snapshots.

This reverts commit 7d2e6b1615.

Review-Url: https://codereview.chromium.org/2685723004 .
2017-02-08 13:33:23 -08:00
Zachary Anderson a7f7343259 [dart:io] A small boringssl cleanup from davidben@
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2683703004 .
2017-02-08 12:25:55 -08:00
Ryan Macnak 7d2e6b1615 Use CodeSourceMap for stack traces (still JIT only).
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2684763002 .
2017-02-08 11:31:46 -08:00
John McCutchan e213cf3b15 Mark that developer_extension_test now passes on app-jit
BUG=

Review-Url: https://codereview.chromium.org/2680203003 .
2017-02-07 16:04:16 -08:00
Ryan Macnak b2d6de619e Disable background finalization by default.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2678423003 .
2017-02-07 14:52:13 -08:00
Ryan Macnak 909ce02b12 Encode inlining information in CodeSourceMap and remove inlining interval arrays.
CodeSourceMap now contains a small bytecode that describes changes to the token position and inlining stack as one moves through a function. This information is used by the disassembler to display inlining comments and by the profiler to properly blame ticks against source code.

Slightly shrinks the total size of code metadata; on dart2js compiling hello world, the final heap is

 before 59.6MB total, 12.8MB List, 1.1MB CodeSourceMap
  after 59.4MB total, 12.1MB List, 1.5MB CodeSourceMap

To be filtered and included in AOT code to expand inline frames in stack traces.

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2670843006 .
2017-02-07 12:52:21 -08:00
John McCutchan dcbb57a0c5 Fix developer extension test expectations
BUG=

Review-Url: https://codereview.chromium.org/2684723002 .
2017-02-07 11:56:42 -08:00
Ryan Macnak a0fe1a2f89 Explain requirements on fields accessed from generated code.
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2684683002 .
2017-02-07 11:26:54 -08:00
John McCutchan 4c621ebd90 Update service.status
Fixes #27225
Fixes #26490

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2679733003 .
2017-02-07 11:17:08 -08:00
John McCutchan 5142fa58ce Fix Observatory timeline export to be compatible with about:tracing
Fixes #28628

Recent versions of about:tracing now assume the presence of a 'name'
property in a Sample (ph='P') event. Add a blank one to avoid an exception.

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2681463003 .
2017-02-07 08:43:51 -08:00
Zachary Anderson b0749b1e60 [dart:io] Extract better error messages from boringssl.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2680513004 .
2017-02-07 07:45:21 -08:00
Siva Annamalai 3f48197f37 Fix for issue 28606 - Wait for thread that runs the interrupted isolate to exit completely before exiting the main thread, we get into racy cleanup otherwise.
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2671133002 .
2017-02-06 16:25:57 -08:00
Matthias Hausner a5187ae01d Improve error message when super constructor is invalid
Instead of “unresolved call to super constructor”, adapt error
message if the super class contains a factory constructor with
the same name.

Also add this error message clarification to constructor redirection
clauses.

BUG=#11202
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2673423003 .
2017-02-06 14:48:16 -08:00
John McCutchan 25e8f56425 Fix get_ports_rpc_test to be insensitive to system level ports
Fixes #28560

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2681583002 .
2017-02-06 13:43:45 -08:00
John McCutchan 4b436fa24b Fix vm_timeline_flags_test flake
Fixes #28625

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2683443002 .
2017-02-06 13:29:16 -08:00
Brian Wilkerson 2ee2fe9b5c [Gardening] Disable running strong-mode analyzer tests in code that is not strong mode clean
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2679553003 .
2017-02-06 13:26:39 -08:00
Florian Loitsch d2f9ba6d37 Mark vm_timeline_flags_test as flaky everywhere.
Review-Url: https://codereview.chromium.org/2679633004 .
2017-02-06 19:55:48 +01:00
Jonas Termansen a8b5498333 Fix peer addresses being reported raw rather than the actual address byte.
The struct sockaddr containing the remote address was being reported
rather than the actual sin_addr / sin6_addr fields. Use the ToTypedData
utility function to return the real address bytes as a dart list. Before
this fix all remote addresses would be reported (on Linux) as 2.0.x.y where
2.0 means IPv4 and x.y are the remote port in big endian, i.e. the first
four bytes of struct sockaddr.

R=rmacnak@google.com
BUG=

Review-Url: https://codereview.chromium.org/2665973003 .
2017-02-06 13:48:53 +01:00
Regis Crelier f3080b8803 Refactor type finalization in VM so that the parser only resolves type
parameters, whereas the class finalizer resolves all other type names and
performs finalization and canonicalization. This allows to remove a lot of
duplicated code between parser and class finalizer.

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2673093003 .
2017-02-03 12:38:31 -08:00
Regis Crelier 1ff4a5a16b Accept instance members and locals named "Function" (fixes #28610).
Add regression test.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2673893002 .
2017-02-03 09:58:37 -08:00
Vyacheslav Egorov ab9d5d0e42 VM: Don't overwrite stacktrace when rethrowing StackOverflow.
Fixes https://github.com/dart-lang/sdk/issues/28600
Fixes https://github.com/dart-lang/sdk/issues/24381

BUG=
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2670713004 .
2017-02-03 18:29:58 +01:00
Kevin Millikin 392ba729ac Revert a change to an integer size
FinalizeHash gets called with values of hashbits that are larger than 32.
Fixes #28626.

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

Review-Url: https://codereview.chromium.org/2669183004 .
2017-02-03 15:46:36 +01:00
Kevin Millikin 8d7583b8d1 Mark a service test that seems flaky on Windows
This test has failed twice recently, both times on Windows.  This is
issue #28625.

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2671783004 .
2017-02-03 13:50:57 +01:00
Kevin Millikin 407464ce90 Mark a pair of flaky service tests
These test have (unexpectedly) different event timestamps.  This is
issue #28624.

BUG=
R=dmitryas@google.com

Review-Url: https://codereview.chromium.org/2671613007 .
2017-02-03 13:29:20 +01:00
Florian Schneider dbb1a1caa2 Fix an assertion about canonical types in the precompiler.
Recursive types can be equivalent, but have loops of different lengths, therefore not always canonicalized.

When rehashing, don't forget the last element.

Adjust integer type in hash code computation. It should not make
a difference, but seems consistent to use the same size of both
sides.

BUG=
R=regis@google.com

Review-Url: https://codereview.chromium.org/2677473003 .
2017-02-02 16:13:26 -08:00
John McCutchan 95b84d898e Fix stale key names in get_isolate_rpc_test.
BUG=
R=bkonyi@google.com

Review-Url: https://codereview.chromium.org/2673753002 .
2017-02-02 15:10:32 -08:00
Ben Konyi 2a20b0433d Fix for issue #28606. Removed loop which iterated over all threads in the thread registry to check if a handle is valid and replaced it with a single check with the current thread.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2672833003 .
2017-02-02 15:09:05 -08:00
Todd Turnidge e60003d1a7 Remove a major source of flaky service test failures.
The first three bugs below have bug reports which indicate that they
will be fixed.  The bottom three bugs were filed without log
information, so it is impossible to know if they will be fixed or not,
but it is quite possible.

Closes #26470
Closes #28947
Closes #28605
Closes #28091
Closes #28184
Closes #28185

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2671603004 .
2017-02-02 14:54:20 -08:00
John McCutchan 7a20e49a38 Change the DevFS base path
- [x] Append the file system name as a child directory. This gives a common
suffix for source paths.

BUG=
R=turnidge@google.com

Review-Url: https://codereview.chromium.org/2669223003 .
2017-02-02 12:58:21 -08:00
John McCutchan 1660cab84d Skip the type test for expressions which have already evaluated to true or false.
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2667353003 .
2017-02-02 11:58:29 -08:00
John McCutchan 39729e0d9d Revert "Expand _AssertionError._evaluateAssertion in the frontend"
This reverts commit 9779ff264a.

BUG=

Review-Url: https://codereview.chromium.org/2675803002 .
2017-02-02 10:27:41 -08:00
Ben Konyi ed4bf4f2e0 Removed instances of fprintf in run_vm_tests and replaced them with OS::Print/PrintErr.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2675553002 .
2017-02-02 09:43:06 -08:00
John McCutchan 9779ff264a Expand _AssertionError._evaluateAssertion in the frontend
The call in _evaluationAssertion becomes megamorphic and this is
showing up on Flutter's profile. Avoid the call becoming megamorphic
by inlining the body at the AST level.

BUG=
R=hausner@google.com

Review-Url: https://codereview.chromium.org/2655803007 .
2017-02-02 07:34:34 -08:00
Florian Schneider 15a4d5d6d1 Windows: Link library sources into gen_snapshot/dart_bootstrap
This allows gen_snapshot and dart_bootstrap to run without having
a full SDK snapshot around.

The generated cc file looks like:

static const char source_array_1[] = {
 '\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
static const char source_array_2[] = {
 '\x2f', '\x2f', '\x20', '\x43', '\x6f', ...
};
...

const char* dart::Bootstrap::core_source_paths_[] = {
 "dart:core",
 "/path/to/sdk/lib/core/core.dart",
 source_array_1,

 "annotations.dart",
 "/path/to/sdk/lib/core/annotations.dart",
 source_array_2,
...

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2668353004 .
2017-02-01 15:55:59 -08:00
Siva Annamalai b25d59ebb4 Land https://codereview.chromium.org/2662393002 for Jason.
R=jsimmons@google.com

Review-Url: https://codereview.chromium.org/2667183002 .
2017-02-01 10:38:21 -08:00
Kevin Millikin 1b3b85690f Do not try to read vm-service and kernel-service
The VM service isolate and the Kernel service isolate are given script
URIs that are respectively "vm-service" and "kernel-service".  We
should not try to treat these as binary files.  Normally they just
don't exist, but if they happen to exist we should not read them.

BUG=
R=vegorov@google.com

Review-Url: https://codereview.chromium.org/2662213004 .
2017-02-01 12:59:02 +01:00
Erik Corry 9b1b85b48c Remove unused code for stubs with three checked args
R=vegorov@google.com
BUG=

Review-Url: https://codereview.chromium.org/2667963005 .
2017-02-01 10:27:26 +01:00
Florian Schneider 7ac05a4e02 Fix background compiler issue with new-space allocation in the parser.
Field::GetterName would allocate in new-space which is not allowed
during background compilation.

Fixes #26316.

R=hausner@google.com

Review-Url: https://codereview.chromium.org/2665003002 .
2017-01-31 17:21:03 -08:00
Florian Schneider e27226f557 Fix various alignments to make ARM precompilation work on Windows.
The alignments have to match for the simulators across different OSes to
generate correct precompiled code.

Fixes #28575.

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2665143004 .
2017-01-31 17:06:24 -08:00
Ryan Macnak 1688aa810e Add --print-benchmarking-metrics to the VM for Golem.
R=fschneider@google.com, johnmccutchan@google.com, sortie@google.com

Review-Url: https://codereview.chromium.org/2572873003 .
2017-01-31 16:39:19 -08:00
Ben Konyi c8e275537d Surfaced native heap memory allocation information to the Observatory
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2667743004 .
2017-01-31 16:09:49 -08:00
Ben Konyi f2fd150ea0 Added new type of unit test, RAW_UNIT_TEST_CASE, which is used for tests that can be flaky if run while the VM is alive. Tests created using the RAW_UNIT_TEST_CASE macro will run after the VM has shutdown to avoid having any worker threads contaminating the test results.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2666133002 .
2017-01-31 15:16:38 -08:00
Ryan Macnak b93307ea92 Move the kernel isolate snapshot out of the 'runtime' target to reduce build times on the simulators.
R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2663063006 .
2017-01-31 14:46:30 -08:00
Ben Konyi 171a27b79c Fixed issue where initial 1KB zone buffer was not being accounted for when tracking thread zone memory usage.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2651273004 .
2017-01-31 14:32:26 -08:00