Commit Graph

596 Commits

Author SHA1 Message Date
Siva Chandra 3289dd2bff Move the kernel offset fields under !defined(DART_PRECOMPILED_RUNTIME).
Also added the missing reading/writing of kernel offsets of libraries
and patch classes in raw_object_snapshot.cc.

Fixes #31258 and #29850.

Change-Id: I7d22ccda9dd1ded9ad1f0963da33bce3975b84ba
Reviewed-on: https://dart-review.googlesource.com/18400
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-11-03 23:01:40 +00:00
Martin Kustermann 542083e5da Skip cc/LargeMap on simulators
Change-Id: I57b9729b74ab9bce4cb667a923ccdcacccffaa6a
Reviewed-on: https://dart-review.googlesource.com/17660
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-31 18:29:26 +00:00
Zachary Anderson 21c7684113 Fixes hello_fuchsia_test to not touch the network
fixes #31251

Change-Id: I9f10e18de467a9de4b24e466aaf455e10c247677
Reviewed-on: https://dart-review.googlesource.com/17521
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-31 17:06:44 +00:00
Ryan Macnak 157e309a4f [vm] Update status files for Windows profiler failures, again.
Bug: https://github.com/dart-lang/sdk/issues/31137
Change-Id: I68d12c79c092062c0dc91d361744c1b30e715719
Reviewed-on: https://dart-review.googlesource.com/15010
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-18 23:59:32 +00:00
Ryan Macnak 5906999ba3 [vm] Update status files for Windows profiler failures.
Bug: https://github.com/dart-lang/sdk/issues/31137
Change-Id: Ifb742108e2ae9055f4e08ee6261f0dae466d23f5
Reviewed-on: https://dart-review.googlesource.com/15006
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-18 22:56:56 +00:00
Ryan Macnak b85a7fecd0 Reapply "[vm] Prefer stack bounds from the system thread library for overflow checks."
Mark some profiler tests on Windows as failing.

Bug: https://github.com/dart-lang/sdk/issues/31137
Change-Id: I46a5d4838443e5cfdac6043ea8dcfeb3d05d4823
Reviewed-on: https://dart-review.googlesource.com/14920
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-18 21:15:49 +00:00
Dmitry Stefantsov a227b168da Revert "Reapply "[vm] Prefer stack bounds from the system thread library for overflow checks.""
This reverts commit 5a022b9db6.

The reverted CL caused some redness on some vm and vm-precomp bots.

TBR=rmacnak@google.com
Change-Id: I9be670f3c3e341ec6d95082f288bc569834e38c7
Reviewed-on: https://dart-review.googlesource.com/13460
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Karl Klose <karlklose@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2017-10-12 07:32:30 +00:00
Ryan Macnak 5a022b9db6 Reapply "[vm] Prefer stack bounds from the system thread library for overflow checks."
Fix accounting of guard pages to move the stack limit up instead of down.

Change-Id: I2f6577a12cf95707c186884f0bd3def03eac12ed
Reviewed-on: https://dart-review.googlesource.com/13381
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-10-12 02:17:11 +00:00
Ryan Macnak 6ecf6dd0a3 Revert "[vm] Prefer stack bounds from the system thread library for overflow checks."
This reverts commit af251ddfec.

Reason for revert: Crashes on Windows.

Original change's description:
> [vm] Prefer stack bounds from the system thread library for overflow checks.
> 
> Before this change, we would assume all stacks have the size the VM specifies for threads it creates, but this won't be accurate for the initial thread or threads created by the embedder.
> 
> Change-Id: I6605a88d6666a6f9d47fbe047d3fdd02aa22c80a
> Reviewed-on: https://dart-review.googlesource.com/10209
> Reviewed-by: Zach Anderson <zra@google.com>

TBR=rmacnak@google.com,zra@google.com

Change-Id: I96eaccdc8edf6e3d319827a63d168534bad0518e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/13106
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-10-11 21:17:28 +00:00
Ryan Macnak af251ddfec [vm] Prefer stack bounds from the system thread library for overflow checks.
Before this change, we would assume all stacks have the size the VM specifies for threads it creates, but this won't be accurate for the initial thread or threads created by the embedder.

Change-Id: I6605a88d6666a6f9d47fbe047d3fdd02aa22c80a
Reviewed-on: https://dart-review.googlesource.com/10209
Reviewed-by: Zach Anderson <zra@google.com>
2017-10-11 19:35:44 +00:00
Vyacheslav Egorov 3f9a4966e7 [VM] Fix typing issues in the typed_data.dart
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I6bc0454c8c27432ee6206267c04d114d47835046
Reviewed-on: https://dart-review.googlesource.com/12660
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-10-11 10:29:05 +00:00
Zachary Anderson 07ee165407 [Fuchsia] update vm.status
Change-Id: I60d83e311c8acfa0292f852a3b820075f66e5bab
Reviewed-on: https://dart-review.googlesource.com/9783
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-29 21:30:54 +00:00
Ryan Macnak 5efa08b663 Reapply "[reload] Add facility to check for program elements changed in the last reload but not executed."
- Weaken assert for identity reloads to account for lazy finalization.
 - Store actual field end positions instead of computing from a terminating semicolon.
 - Consider unfinalized classes to be unchanged if they have same sequence of tokens.

Change-Id: I3fcd7fed924bfac47dc382702ce63207bb8aa031
Reviewed-on: https://dart-review.googlesource.com/8164
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-27 02:50:35 +00:00
Vyacheslav Egorov 9678113619 [VM] Fix incorrect range assignment for Uint32 ops.
When replacing 64bit signed operations with unsigned 32bit ones
IntegerInstructionSelector::Replace would simply copy 64bit operation's
range onto uint32 op. This however is only correct for positive range,
non-positive ranges must become [0, kMaxUint32]. 

Fixes https://github.com/dart-lang/sdk/issues/30853

Bug:
Change-Id: I896b7828c29fe8f04a844cfb984295cb47ddaaf2
Reviewed-on: https://dart-review.googlesource.com/8020
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2017-09-25 10:09:32 +00:00
Ryan Macnak 9dd3730ea2 Revert "[reload] Add facility to check for program elements changed in the last reload but not executed."
This reverts commit 4a0d5cbf3f.

Change-Id: Ic90f78443b5c1878ac6f17a1a1439f8e4515db42
Reviewed-on: https://dart-review.googlesource.com/7681
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2017-09-21 22:56:39 +00:00
Zach Anderson 490fd101e5 [windows] Fix hang on crash?
Try passing another flag to SetErrorMode(), which seems to work locally.
On the bots, who knows?

related #30202, #30850

Change-Id: Id3f14bc883008f8f0e743617d1ae5a1cc62e34a0
Reviewed-on: https://dart-review.googlesource.com/7631
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2017-09-21 21:01:54 +00:00
Ryan Macnak 4a0d5cbf3f [reload] Add facility to check for program elements changed in the last reload but not executed.
Change-Id: Ifdc73166be68c5d2915e8b9d71db0a09d06835a0
Reviewed-on: https://dart-review.googlesource.com/5330
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-21 20:28:06 +00:00
Ryan Macnak 2d698cc4d0 [reload] Rehash constants before running new initializers.
Use of constants before rehashing can result in duplicate "canonical" constants.

Change-Id: I48c008b269267461c30933002c5a5e57005dfef5
Reviewed-on: https://dart-review.googlesource.com/5282
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2017-09-12 22:00:21 +00:00
Beeravolu Siva Chandra Reddy 004a515217 Populate library imports and exports when loading library from kernel.
Change-Id: If6cc94aa186948caa8798212d6161da650ff2d8e
Reviewed-on: https://dart-review.googlesource.com/4381
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2017-09-12 10:44:49 +00:00
Alexander Thomas 9278d252e7 Re-enable Mac try builders
Skip tests failing on CQ but not on buildbot
Replace some timeouts with skips to speed up the tests

Bug:
Change-Id: I101e922bd18e522d0efd69cdf8329e2ca8f9829e
Reviewed-on: https://dart-review.googlesource.com/2920
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2017-09-06 09:46:14 +00:00
Erik Ernst 5e4e734f4a Adjusted status cf. https://github.com/dart-lang/sdk/issues/30621
Change-Id: Ia53c6863d4514f90b89649bc40e77ddec233f8fc
Reviewed-on: https://dart-review.googlesource.com/3122
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2017-09-05 09:45:27 +00:00
Alexander Aprelev 7cbb96c199 Wholesale update tests status in attempt to make (fyi) dartkp buildbots green.
Buildbots are here: https://build.chromium.org/p/client.dart.fyi/console.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/3000423002 .
2017-08-28 18:32:21 -07:00
Vyacheslav Egorov 7d5231796e [VM, Precompiler] Support obfuscation of the symbolic information in precompiler
Obfuscation is controlled by obfuscate flag in Dart_IsolateFlags.

Obfuscation of identifiers is performed during script tokenization - when TokenStream is generated from the source. All kIDENT and kINTERPOL_VAR tokens are renamed consistently using a persistent obfuscation map stored in ObjectStore::obfuscation_map.

Some identifiers (pseudo-keywords, arithmetic operators, builtin recognized methods and entry-points) are not renamed to keep name based lookups from breaking. All other identifiers are renamed.

Constant instances of Symbol-s (both created via literal syntax #ident and using constant constructor const Symbol("ident")) are renamed consistently with corresponding identifiers.

Script urls and Library urls and names are also obfuscated.

Obfuscation map can be dumped as a JSON array at the end of precompilation using Dart_GetObfuscationMap API.

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

Review-Url: https://codereview.chromium.org/3003583002 .
2017-08-25 09:48:23 +02:00
Martin Kustermann 732a682e52 [gardening] Re-enable vm/cc/UseDartApi on simdbc64
Running this in a loop locally did not reproduce any crash and the issue
was filed in January, so the fundamental problem might have been fixed
already.  Due to the lack of more information in the bug report, the
best thing is to renable the test, close the issue and see if the test
flakes again.

Closes https://github.com/dart-lang/sdk/issues/28499

R=vegorov@google.com

Review-Url: https://codereview.chromium.org/3003203002 .
2017-08-24 11:16:15 +02:00
Kevin Millikin b38c00a341 Avoid triggering an ASSERT in TypedData
When a zero-sized string occurs as that last string in the Kernel
string table, the code would attempt to compute the address that lies
one element past the end of the string table's backing store.  Though
this is benign in C++ as long as that address is not dereferenced, it
would trigger an assertion failure in TypedData::DataAddr.

Avoid triggering the assertion by performing the address arithmetic in
the caller based on DataAddr(0) rather than relying on the address
arithmetic in DataAddr.

This fixes issue 30420.

BUG=https://github.com/dart-lang/sdk/issues/30420
R=aam@google.com, asiva@google.com

Review-Url: https://codereview.chromium.org/3003023002 .
2017-08-22 09:27:24 +02:00
Beeravolu Siva Chandra Reddy eeaeb6fbf6 Adjust the column number where a StackOverflow error is reported.
Before this change, the column number of the StackOverflow error was
reported at the opening '(' of the function parameter list:

  ReturnType function(...) { ... }
                     ^

This change moves it to the opening '{':

  ReturnType function(...) { ... }
                           ^

In case of single statement functions with '=>', the location of the '='
is reported as the column number of the StackOverflow error.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/3002833003 .
2017-08-21 11:09:11 +02:00
Siva Annamalai cfac48179b 1. Figure out the modified libraries from the specifeid kernel file during
reload instead of computing it based on the source modification information.

2. Fix for failure in Unit test case https://github.com/dart-lang/sdk/issues/30322

3. Fix crash in test that was being skipped in https://github.com/dart-lang/sdk/issues/30109 and turn that test on.

This CL is work towards completing issue https://github.com/dart-lang/sdk/issues/28051

R=aam@google.com

Review-Url: https://codereview.chromium.org/2998983002 .
2017-08-18 13:42:19 -07:00
Alexander Markov 5b694c1b1c [vm] Remove Dart_MakeExternalString and --support-externalizable-strings
This CL removes unused Dart API Dart_MakeExternalString, VM option
--support-externalizable-strings and underlying support for
externalizable strings from Dart VM.

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

Issue: https://github.com/dart-lang/sdk/issues/30474
Review-Url: https://codereview.chromium.org/2997173002 .
2017-08-17 17:49:35 -07:00
Alexander Aprelev a9afb54d6d Revert "Revert "Introduce IKG into kernel-service to support incremental compilation.""
This reverts commit c35510d835
with fix for the build - remove implicit temporary array in TestCase::LoadTestScript.

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2998963002 .
2017-08-15 09:03:48 -07:00
Alexander Aprelev c35510d835 Revert "Introduce IKG into kernel-service to support incremental compilation."
This reverts commit f596d440f5.

BUG=

Review-Url: https://codereview.chromium.org/3002553003 .
2017-08-14 14:15:41 -07:00
Alexander Aprelev f596d440f5 Introduce IKG into kernel-service to support incremental compilation.
This CL also adds few hot-reload incremental kernel files tests(some pass, one is failing), which are useful to track progress of hot reload functionality in Flutter setting.

BUG=
R=asiva@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2993013002 .
2017-08-14 14:06:15 -07:00
Beeravolu Siva Chandra Reddy 2ea5140093 Fix couple of vm/cc/DartAPI_* tests for the dartk configuration.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2994883002 .
2017-08-14 17:54:50 +02:00
Beeravolu Siva Chandra Reddy 6fab2fdbe8 Update vm.status with the new test names.
R=jensj@google.com

Review-Url: https://codereview.chromium.org/3001553002 .
2017-08-11 11:09:32 +02:00
Beeravolu Siva Chandra Reddy abf9eae3f7 Add a prefix convention for tests in [dart|debugger]_api_impl_tests.cc.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/3001513002 .
2017-08-11 10:38:11 +02:00
Jens Johansen 60ed069e7c [kernel] Make snapshotting work.
This CL enables snapshotting for kernel.
Basically what it does is that it writes out and reads in a few
previously missing entries in the snapshot file (from  Field, Function
and Script).

Debugging from a snapshot made from kernel will not work as snapshots
does not contain sourcecode (it is normally synthesized from the
TokenStream which doesn't exist in kernel).

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2993613002 .
2017-08-10 10:26:26 +02:00
Diogenes Nunez d6f4895aa5 Reverts IsolateReload commits that marked two tests as crashing.
This is a part of the revert in 91662ce579.

Revert "Mark vm/cc/IsolateReload_ClassFieldRemoved as crashing on dartk-vm."

This reverts commit 51229000e3.

Revert "Mark vm/cc/IsolateReload_ClassFieldRemoved as crashing on dartk-vm."

This reverts commit 969ad4f622.

BUG=

Review-Url: https://codereview.chromium.org/2993963003 .
2017-08-08 16:03:09 -07:00
Lasse R.H. Nielsen 969ad4f622 Mark vm/cc/IsolateReload_ClassFieldRemoved as crashing on dartk-vm.
Gardening.

R=eernst@google.com

Committed: https://github.com/dart-lang/sdk/commit/51229000e39fad947f23292ed073491f7361bb6d
Review-Url: https://codereview.chromium.org/2993783002 .
2017-08-07 11:05:15 +02:00
Lasse R.H. Nielsen 51229000e3 Mark vm/cc/IsolateReload_ClassFieldRemoved as crashing on dartk-vm.
Gardening.

R=eernst@google.com

Review-Url: https://codereview.chromium.org/2993783002 .
2017-08-07 09:57:33 +02:00
Bob Nystrom 012774c78e Remove Dartium support from test.dart.
R=whesse@google.com

Review-Url: https://codereview.chromium.org/2981223002 .
2017-07-20 12:46:50 -07:00
Siva Annamalai df2b6f73e6 Adjust vm unit tests status files in kernel mode.
Review-Url: https://codereview.chromium.org/2978393002 .
2017-07-19 19:33:50 -07:00
Siva Annamalai 33c50e9374 1. Correctly set root_library based on the application script URI instead of looking for the library that has the 'main' method.
2. Adjust the Dart front end to not require a 'main' method when the in memory filesystem is used, this allows execution of VM unit tests which all do not necessarily have a 'main' method (integrated CL from siggi)

3. Change kernel reader to not look for a 'main' methos when Dart_LoadKernel is called.

4. Change Dart_LoadScript to also support loading of dart programs when Dart front end is used

R=aam@google.com, sigmund@google.com

Review-Url: https://codereview.chromium.org/2948273002 .
2017-07-19 18:09:19 -07:00
Siva Chandra cf07adc873 Allow setting breakpoints in function literal field initializers under --dfe.
The change 3b9cf7351b fixed #29581 for the
case when --dfe is not used. This change fixes the issue for the --dfe
configuration as well.

Tests which now pass have been taken out of the status files.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2979163002 .
2017-07-19 13:17:25 -07:00
Zach Anderson bbb5a5e828 [Windows] Mark CodeImmutability Crash, Timeout
related #30202

R=alexmarkov@google.com

Review-Url: https://codereview.chromium.org/2981273002 .
2017-07-19 09:32:31 -07:00
Ryan Macnak f20b32b793 [vm] Enable mirrors in product mode. Allows building a product mode SDK.
Fixes https://github.com/dart-lang/sdk/issues/29972

R=zra@google.com

Review-Url: https://codereview.chromium.org/2972883002 .
2017-07-12 12:55:58 -07:00
Alexander Markov 47ad7a82b3 Silence truncating_ints_test in dart2js & dartium modes
Dart2js does not support --limit-ints-to-64-bits option which is
required by this test.
Dartium does not support VMOptions specification in the test.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974843002 .
2017-07-10 17:33:01 -07:00
Siva Chandra f0ef900fd3 Fix setting breakpoints in parts of a library.
This fixes the regression caused by
1eaa3dd84b and reported in #29988.

When picking a class to set a breakpoint, instead of rejecting classes
not defined in the script, we now reject classes which do not belong to
the library to which the script belongs.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2965673004 .
2017-07-10 17:20:26 -07:00
Alexander Markov 7a20b6b8d8 Option to truncate integers to 64 bits, part 1 (core VM changes)
This changeset revises --limit-ints-to-64-bits option to
change range of integers from unlimited to int64.
On overflow, integer arithmetic operations silently wrap around and
discard extra bits. No Bigints are allocated in case of overflow.

This changeset is the 1st part in the series of changes, it revises the implementation of integer arithmetic operations. More changes will follow.

R=regis@google.com, zra@google.com

Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2974633003 .
2017-07-10 15:16:40 -07:00
Zachary Anderson e7c96cae8c [Fuchsia] Implements NetworkInterface.list()
US-241

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

Review-Url: https://codereview.chromium.org/2962383002 .
2017-06-30 10:54:08 -07:00
Alexander Markov 499a587003 Fix incorrect DBC code generation of range-based CheckClassId
CheckClassId IL instructions with ranges of Cids were incorrectly
generated to DBC: instead of embedding range length directly into the Nop,
a constant was added into an object pool and index of the constant was
stored in Nop.

Closes https://github.com/dart-lang/sdk/issues/29846

R=zra@google.com

Review-Url: https://codereview.chromium.org/2964583003 .
2017-06-29 15:32:44 -07:00
Zachary Anderson 50475dd351 [Fuchsia] Fix test image. Update status files for vm and language suites
IN-70

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2957233003 .
2017-06-29 07:45:19 -07:00