Commit graph

41788 commits

Author SHA1 Message Date
Sigmund Cherem ee42a0a0aa Add js-interop support to the fast-startup emitter
BUG=
R=jacobr@google.com

Review URL: https://codereview.chromium.org/2420173002 .
2016-10-14 14:22:11 -07:00
Bob Nystrom 60a966605d Remove uses of unittest in the HTML tests where possible.
This finishes going through the dev_compiler HTML tests and switches
out unittest for minitest wherever possible.

In the process, it gets another 10 tests strong mode clean, and gets
several more passing, and more not skipped. With this CL, we're running
another 50 more HTML tests (though some are expected to fail, mostly
because of #27578).

R=jacobr@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/2419863002 .
2016-10-14 13:44:19 -07:00
Vijay Menon 72e3d13db2 Add ddc resources to the sdk build
This installs DDC's dart_sdk.js, etc., under:
  dart-sdk/lib/_internal/dev_compiler/

Fixes #27001

R=jakemac@google.com

Review URL: https://codereview.chromium.org/2416783005 .
2016-10-14 12:34:03 -07:00
Brian Wilkerson 4942f5304a Guard against a hypothetical null pointer dereference
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2421473007 .
2016-10-14 12:31:11 -07:00
Vijay Menon 852ef37f71 Some mirrors fixes
R=leafp@google.com

Review URL: https://codereview.chromium.org/2415053004 .
2016-10-14 12:19:24 -07:00
Ryan Macnak 0d99435f0c Mark tests failing with app snapshots that expect a resource relative to script.
Issue #27591

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418193002 .
2016-10-14 11:10:19 -07:00
Florian Schneider a0380ffaf6 Fix assertion failure with deferred prefixes.
When running with --load-deferred-eagerly, we don't need to collect
functions for invalidation, but instead insert runtime checks  if
the prefix if loadLibrary was called loaded or not.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2415743004 .
2016-10-14 10:20:46 -07:00
Ryan Macnak 74e6376b5c Fix unoptimized code calling a disabled code when --verify-on-transition is enabled.
Unoptimized code has a static call to optimized code.
Optimized code prologue goes to the OptimizeInvokedFunction runtime.
Callee schedule for background compilation and current code set the return entries return value.
Verify-on-transition triggers a safepoint, wherein the background compiler disables the old optimized code.
The OptimizedInvokedFunction stub calls through the disabled code.
FixCallersTarget see an unoptimized caller. BOOM

Similar problem without --verify-on-transition, except the safepoint comes from BackgroundCompiler::CompileOptimized.

Fixes #26927.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/2418673002 .
2016-10-14 10:01:42 -07:00
Ryan Macnak 3d00ecdc8f Reapply "Use a single file for app snapshots."
- Don't read script to check for an app snapshot if it is a pipe. Fixes loading source from a pipe.
 - Fix windows and fushsia builds.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2416973003 .
2016-10-14 09:57:54 -07:00
Brian Wilkerson 3155b1e08c Remove unused method and field from DartSdkManager
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2415413003 .
2016-10-14 09:53:44 -07:00
Florian Loitsch 136e476c87 Check for the type of the the spawned function.
In general we avoid explicit type-checks, but in this case the error would be only detected in the new isolate making error handling much harder.

Fixes #27185
BUG= http://dartbug.com/27185.
R=lrn@google.com

Review URL: https://codereview.chromium.org/2414173003 .
2016-10-14 13:27:11 +02:00
Lasse R.H. Nielsen 523da59d56 Add reference to invalid typedef so dart2js will detect it.
R=floitsch@google.com

Review URL: https://codereview.chromium.org/2417223002 .
2016-10-14 12:56:40 +02:00
Lasse R.H. Nielsen ac76d3eb9f Update CHANGELOG.md for commit efb9a12811 (allow = for named parameters)
(See efb9a12811)

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2419893004 .
2016-10-14 11:34:53 +02:00
Lasse R.H. Nielsen efb9a12811 Add = as default-value separator for named parameters.
Fixes issue #27559.

BUG= http://dartbug.com/27559
R=asiva@google.com, eernst@google.com, floitsch@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/2411633002 .
2016-10-14 11:25:25 +02:00
Zachary Anderson 4118680345 [windows] Revert virtual memory changes
Revert changes to virtual_memory_win.cc in case they are the cause of
the OOM failures on the debug windows x64 bot.

Review URL: https://codereview.chromium.org/2420853002 .
2016-10-13 22:02:12 -07:00
Stephen Adams 476ffbda5e Revert "Build CFG for various JS() foreign methods"
TBR=het@google.com
BUG=

Review URL: https://codereview.chromium.org/2411793007 .
2016-10-13 19:02:41 -07:00
Stephen Adams a897bc3832 Build CFG for various JS() foreign methods
BUG=
R=het@google.com

Review URL: https://codereview.chromium.org/2404123002 .
2016-10-13 17:11:35 -07:00
Ryan Macnak 6839a23240 Revert "Use a single file for app snapshots."
This reverts commit 4f8b16df3b.

Review URL: https://codereview.chromium.org/2410303008 .
2016-10-13 15:29:23 -07:00
Konstantin Shcheglov 4c065c8443 Allow new public names in patches for the dart:_internal library.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2413403002 .
2016-10-13 14:52:22 -07:00
Florian Schneider 1ebde18da6 Fix and dedup entries in language.status.
Correct mistakes from my previous CL and simplifications.

TBR=rmacnak@google.com,
BUG=

Review URL: https://codereview.chromium.org/2412323004 .
2016-10-13 14:49:27 -07:00
Ryan Macnak 4f8b16df3b Use a single file for app snapshots.
For blobs, put all four pieces into a single file with a header describing their offsets.
For dynamic libraries, move the vm isolate and isolate pieces into the dynamic library as additional read-only sections.

Automatically detect if the script argument is an app snapshot and initialize the VM appropriately, similar to automatic detection of script snapshots.

R=asiva@google.com

Review URL: https://codereview.chromium.org/2405393002 .
2016-10-13 14:33:56 -07:00
Konstantin Shcheglov f63a9d1219 Add support for patching parts.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2414123003 .
2016-10-13 14:27:22 -07:00
Bob Nystrom ae5a566f98 Move minitest.dart into the expect package.
R=vsm@google.com

Review URL: https://codereview.chromium.org/2416853003 .
2016-10-13 14:15:21 -07:00
Konstantin Shcheglov 2b40c57781 Add support for patching fields.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2416073002 .
2016-10-13 14:04:58 -07:00
Florian Schneider 2022348b11 Fix wrong initialization of is_loaded in LibraryPrefix.
My previous CL did not check if the prefix is deferred or not
when deserializing it from the snapshot.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2413113004 .
2016-10-13 13:51:02 -07:00
Florian Schneider 701b91eb31 VM: Save one bool when serializing library prefixes.
When loading a snapshot all library prefixes should be considered not
loaded. This makes code running from a JIT snapshot throw the correct
error when using a deferred prefix before it is loaded.

Also, update test status and avoid skipping tests.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2416963003 .
2016-10-13 13:36:19 -07:00
Konstantin Shcheglov 318e842389 Extract appending nodes to the list into a helper method.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2417053002 .
2016-10-13 13:29:36 -07:00
Paul Berry 809c80fa49 Fix summarization of closures in toplevel variable declarations in part files.
We were forgetting to include the unitNum, so it was defaulting to zero,
which worked for non-part files but not for part files.

R=scheglov@google.com

Review URL: https://codereview.chromium.org/2416863003 .
2016-10-13 13:29:06 -07:00
Ryan Macnak 1ee954029d Attempt to fix InitialRSS for Golem.
R=zra@google.com

Review URL: https://codereview.chromium.org/2421623002 .
2016-10-13 13:11:41 -07:00
Konstantin Shcheglov 452e180dbc Add support for patching constructors.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2417933002 .
2016-10-13 13:03:26 -07:00
Ryan Macnak d8cc8644b1 Switchable call scheduling.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2404973002 .
2016-10-13 12:44:25 -07:00
Zach Anderson 6f7696dfc9 [windows] fix ~VirtualMemory()
R=asiva@google.com

Review URL: https://codereview.chromium.org/2414133002 .
2016-10-13 12:41:26 -07:00
Siva Annamalai d8276c4ef9 Skip env_test for dartium as it uses command line options which are not supported for dartium.
R=terry@google.com

Review URL: https://codereview.chromium.org/2413093003 .
2016-10-13 12:40:40 -07:00
Paul Berry 524a7da141 Rewrite DeclarationResolver to match declarations to elements by order rather than offset.
Previously, DeclarationResolver matched declarations to elements using their offsets in the file.  This meant that it could not work with element models built from a summary, since those element models are not guaranteed to contain offsets.  Now, DeclarationResolver assumes that elements appear in the same order in the element model as they do in the file, so it can just match them up using their order.

DeclarationResolver continues to verify element names as it does its matching, so if the ordering of elements ever fails to match up with the ordering of declarations, an exception is almost certain to be thrown.  (The only time it wouldn't be is if the mismatch can't be detected due to multiple elements having the same name).

The new implementation is ~1.6x faster than the previous one.

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

Review URL: https://codereview.chromium.org/2419633002 .
2016-10-13 12:24:54 -07:00
Konstantin Shcheglov cbb898bca7 Add support for patching class methods.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2412453007 .
2016-10-13 11:55:53 -07:00
Florian Schneider 6d66f3dea8 VM: Make optimized try-catch work in DBC.
The catch entry block has all locals in fixed locations
(Rj) where j = kNumberOfRegisters - i for parameter i.

This means we reserve a range of DBC registers at the top-end of the frame.
Those registers are blocked for general allocation to avoid any overlap
with the rest of the registers that are allocated from the bottom.

Each optimized frame with a try-catch will be kNumberOfRegisters wide.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2388093003 .
2016-10-13 11:36:23 -07:00
John McCutchan d483b0d2af Mark reload_sources_test as slow
BUG=

Review URL: https://codereview.chromium.org/2416013002 .
2016-10-13 11:02:36 -07:00
Konstantin Shcheglov 0ae79f6f4b Patch token stream when replace/add nodes.
R=paulberry@google.com, brianwilkerson@google.com
BUG=

Review URL: https://codereview.chromium.org/2413293002 .
2016-10-13 10:37:18 -07:00
Zach Anderson 9c83c381ec [windows] Implements FreeSubSegment
fixes #27505

R=asiva@google.com

Review URL: https://codereview.chromium.org/2411253002 .
2016-10-13 09:56:36 -07:00
Konstantin Shcheglov 1f373db98e Test that IncrementalCompilationUnitElementBuilder keeps elements in the same order as nodes.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review URL: https://codereview.chromium.org/2413023003 .
2016-10-13 09:15:47 -07:00
Bob Nystrom 2305865365 Start cleaning up the HTML tests.
My initial goal was just to move some of the HTML tests off unittest,
but that ended up slurping in some other changes as well. I haven't
finished going through all of the tests, but this puts the
infrastructure in place and fixes a batch of them. I'll do more next.

Changes:

- Add a "minitest" package. This shims just enough of the unittest/test
  API to make it easy to swap it out for unittest without having to
  rework the entire test.

- Go through the HTML tests from A-J and change them to use minitest
  when possible. The ones that aren't possible use asynchrony.
  Minitest doesn't support async tests (yet, maybe).

- Triage those tests and enable ones that are passing. Mark them failing
  if failing. Filed a couple of tracking bugs for the common issues,
  but for other cases, I just left a comment.

- In the process of this, I went ahead and make some of the affected
  tests strong mode clean if they weren't already and it was easy.

- Synchronize changes between dev_compiler's fork of expect and
  pkg/expect. We'll want to unfork those at some point. D-:

This gets dev_compiler from 1985 tests to 2042.

R=jacobr@google.com, vsm@google.com

Review URL: https://codereview.chromium.org/2413073002 .
2016-10-13 08:47:27 -07:00
Brian Wilkerson 1a893edb82 Add prefix to path import to work around breaking change
R=scheglov@google.com

Review URL: https://codereview.chromium.org/2411423003 .
2016-10-13 08:29:09 -07:00
John McCutchan 54619795aa Fix product build
BUG=

Review URL: https://codereview.chromium.org/2416913002 .
2016-10-13 07:57:08 -07:00
John McCutchan 2d0a08baf9 Make reloadSources service RPC public
- [x] Make `reloadSources` RPC public.
- [x] Add an optional 'pause' parameter to `reloadSources`. When set to true, the isolate will enter the debug pause loop immediately after reloading sources and before resuming execution. This makes it possible for debugger clients to set breakpoints before resuming.
- [x] Add reload_sources_test which tests pausing after reload.
- [x] Fix a bug in `GetVarDescriptors` where a null code object could be used.

R=turnidge@google.com

Review URL: https://codereview.chromium.org/2411153002 .
2016-10-13 07:45:56 -07:00
Terry Lucas 21a554b280 Updated to latest WebKit changes and removed usage of obsolete environment variable
TBR=whesse@google.com

Review URL: https://codereview.chromium.org/2413253002 .
2016-10-13 06:33:04 -07:00
Florian Schneider d9b1bc93af Fix product mode noSuchMethod with library prefix.
Update analyzer status of test that has a static warning expected.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2413033003 .
2016-10-12 19:10:27 -07:00
Siva Annamalai aae051e4c3 Fix for issue 27567 (inconsistent handling of invalid -D options
BUG=#27567
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2409263004 .
2016-10-12 18:42:30 -07:00
Jacob Richman 72503ff98d Extend ignore_patch_signature_mismatch used by dartium to ignore type parameters with different bounds
BUG=https://github.com/dart-lang/sdk/issues/27568
R=asiva@google.com

Review URL: https://codereview.chromium.org/2405193004 .
2016-10-12 17:25:55 -07:00
Florian Schneider d99229026e Fix issues with argument evaluation order and noSuchMethod errors.
Fix tests to conform to spec bahavior.

Update dart2js test status.

BUG=#27572
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2416513003 .
2016-10-12 17:04:55 -07:00
Nicholas Shahan 96f485b075 Fix file name handling on windows
Paths on windows were having the drive letter (ex: c:\) recognized as
a URI scheme.

Fixes #27450

R=vsm@google.com

Review URL: https://codereview.chromium.org/2413823002 .
2016-10-12 14:30:15 -07:00