Commit graph

46159 commits

Author SHA1 Message Date
Ben Konyi 9745386d63 Added sync_socket_unsupported.cc to sources file
BUG=

Review-Url: https://codereview.chromium.org/2814293002 .
2017-04-12 15:22:41 -07:00
John McCutchan 024ccd3095 Mark language/vm/optimized_stacktrace_test slow on reload bots
BUG=

Review-Url: https://codereview.chromium.org/2814743008 .
2017-04-12 15:15:11 -07:00
Ben Konyi 7549bc6b48 Added missing sync_socket_unsupported.cc and fixed issues in test which were causing analysis errors
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2814283002 .
2017-04-12 15:13:10 -07:00
John McCutchan 9af072399e Fix reload bots
BUG=

Review-Url: https://codereview.chromium.org/2812373003 .
2017-04-12 14:36:38 -07:00
Ryan Macnak 5cffc591aa Refactor AOT deduplication steps so they can run before an app-jit snapshot as well.
Additionally dedup PcDescriptors, deopt entries, deopt lists, and await token position lists.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2815533003 .
2017-04-12 14:23:49 -07:00
Ben Konyi 6fbdd19ddb Various fixes for sync socket implementation.
Revert "Revert "Added sync_socket.h include in sync_socket_win.cc""

This reverts commit 2bd6168e1ebf35f6dbd9b2724339362c493377fc.

Revert "Revert "Added synchronous socket implementation to dart:io.""

This reverts commit a47bce03f5502dac7fb12e777e87b5aa1cfc830b.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2814773004 .
2017-04-12 14:20:48 -07:00
Brian Wilkerson e30b56ccbe Fix another parser bug
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2808403005 .
2017-04-12 14:17:23 -07:00
Ryan Macnak 91da7428f3 Add --print_stacktrace_at_api_error.
Should be helpful in tracking down flutter/flutter#8612.

Prefer stack bounds from pthreads when available to be able to see frames below the Dart entry frame.

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2813283002 .
2017-04-12 14:09:19 -07:00
John McCutchan 99c6a18a1b Attempt 2 -- Fix updating packages map on reload and add a regression test
- [x] Update the isolate's .packages path when requested.
- [x] Always refresh package map when loader is initialized.
- [x] Add regression test.

Review-Url: https://codereview.chromium.org/2810223003 .
2017-04-12 14:02:19 -07:00
Konstantin Shcheglov 54f845cfd2 Support for generic function as type arguments in DeclarationResolver.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2814223002 .
2017-04-12 13:47:23 -07:00
John McCutchan f0734f99b3 Detect unhandled exceptions in async functions without an awaiter
- [x] Produce an awaiter stack trace even when there is no awaiter.
- [x] Fix fetching the saved context from Closure.call (fixes --trace_debugger_stacktrace)

Fixes #29200

Example code:

```
main(List<String> args) async {
  var f = new Foo();
  print(f.a.length);
  print('Should not get here');
}

class Foo {
  String a;
}
```

BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2815863002 .
2017-04-12 13:15:41 -07:00
Brian Wilkerson 23f08ec04a Fix another parser issue with generic function types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2814183002 .
2017-04-12 12:41:54 -07:00
Konstantin Shcheglov 5f28891e61 [Reapply] Pass ElementImpl as a context for resynthesizing types.
I added a couple of changes for link.dart to use context in getLinkedType().
I was not able to create a unit test for this case :-/

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2818543002 .
2017-04-12 11:54:23 -07:00
Jennifer Messerly 9bdc5bb751 add scripts to run/debug DDC output on simple test cases
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2815913002 .
2017-04-12 11:36:23 -07:00
Brian Wilkerson e520fc2a45 More parser fixes for generic function types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2817753002 .
2017-04-12 11:35:21 -07:00
Alan Knight 04bb68bb09 Better DDC sourcemap generation for lambdas
This doesn't fix the entire problem, there's still a Chrome issue that it's not clear we can work around, but it helps some. https://bugs.chromium.org/p/chromium/issues/detail?id=676388

There are three distinct issues here affecting Chrome sourcemap usage for DDC programs with single-line lambdas.

1 - We may introduce a synthetic "as SomeType" in a parameter. The synthetic token ends up with a large negative length, from its offset to the beginning of the file, which can confuse sourcemaps.

2 - We have no entry for the blank line following the lambda. The devtools asks for the mapping from (selectedLine, 0) to (selectedLine +1, 0) and if there's no mapping for either it refuses to set the breakpoint. So this artificially forces the mapping from the last character on the line to be to the beginning of the next line instead.

3 - With a lambda we introduce a constructed Return JS node and make a block. Those nodes weren't getting annotated, so they had no source information.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2815443003 .
2017-04-12 11:31:16 -07:00
Regis Crelier 25dbc9b28a Fix look-ahead parsing code in the VM (fixes #29243).
Add regression test.

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2812323002 .
2017-04-12 11:04:21 -07:00
Konstantin Shcheglov cb5bba03e2 Revert "Pass ElementImpl as a context for resynthesizing types."
This reverts commit d2a1bdff4a.

It causes an exception during pkg/analyzer analysis.

package:analyzer/src/fasta/mock_element.dart;package:analyzer/src/fasta/mock_element.dart;MockElement;accept
Unhandled exception:
NoSuchMethodError: Class 'CompilationUnitElementInDependency' has no instance getter 'typeParameterContext'.
Receiver: Instance of 'CompilationUnitElementInDependency'
Tried calling: typeParameterContext

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2814163002 .
2017-04-12 10:45:41 -07:00
pq 1d4d0d769f CLI support for enableAssertInitializers.
R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2809793004 .
2017-04-12 10:38:30 -07:00
Konstantin Shcheglov 7696ec5f31 Support for using generic function types in other AST structures.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2814063003 .
2017-04-12 10:12:30 -07:00
Brian Wilkerson dd150dd348 Correctly recognize non-constant enum children (issue 29306)
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2815093002 .
2017-04-12 09:43:14 -07:00
Konstantin Shcheglov 2143087734 Build GenericFunctionTypeElementImpl in both ApiElementBuilder and LocalElementBuilder.
R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2809423003 .
2017-04-12 09:39:31 -07:00
Konstantin Shcheglov d2a1bdff4a Pass ElementImpl as a context for resynthesizing types.
We need to do this in order to associate resynthesized
GenericFunctionTypeElementImpl instances with these enclosing ElementImpl
instances. The same enclosing ElementImpl can also be used to get
the TypeParameterizedElementMixin for accessing type parameters.

R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2813543007 .
2017-04-12 09:35:56 -07:00
Brian Wilkerson 492eab84ec Fix parsing of generic function types as return types
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2809773005 .
2017-04-12 07:27:39 -07:00
Karl Klose 7b5010d440 [Gardening] Mark regress_29025_test as crashing in precompiled-debug
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2817683002 .
2017-04-12 16:12:13 +02:00
Martin Kustermann 0de8c02b6c Try work around issues executing powershell scripts on windows on the bots
R=ricow@google.com

Review-Url: https://codereview.chromium.org/2817553005 .
2017-04-12 12:28:20 +02:00
Johnni Winther 1973b42b00 Lesser direct Compiler use in SSA
This is a step towards using data object rather than Compiler and
JavaScriptBackend in codegen. This is needed to support a shift in
element models between resolution and codegen.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2811593006 .
2017-04-12 11:33:11 +02:00
Martin Kustermann a3e9cd8ff6 Attempt at capturing screenshot on IE if tests time out
The hypothesis is that a modal dialog from Internet Explorer causes
the currently running test to hang until test.dart kills the browser.

Capturing a screenshot might give an insight into there is a dialog showing up.

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

Review-Url: https://codereview.chromium.org/2811093003 .
2017-04-12 10:57:58 +02:00
Johnni Winther aef0c45019 Extract ClosedWorldBase from ClosedWorldImpl
This is step towards making (parts of) ClosedWorldImpl reusable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2813503005 .
2017-04-12 09:52:34 +02:00
Johnni Winther 5c0566c476 Use entity WorldImpl where possible
This is a step towards making WorldImpl reusable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2813853002 .
2017-04-12 09:29:35 +02:00
Johnni Winther f900cf69b7 Use ClassEntity in ClassHierarchyNode
This makes ClassSet/ClassHierachyNode reusable for kernel based elements.

R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2814663002 .
2017-04-12 09:23:49 +02:00
Emily Fortuna fe3a583223 Reapply "Gracefully handle if loaded dill program has no mainMethod set."
The previous (identical) version of this CL was reverted due to a
spurious unrelated error on the dart-flutter integration bots.

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2816633003 .
2017-04-11 16:30:10 -07:00
Emily Fortuna 81dfc04a81 Don't duplicate switch case code if we fall through to the default case.
BUG=https://github.com/dart-lang/sdk/issues/26900
R=sra@google.com

Review-Url: https://codereview.chromium.org/2810093002 .
2017-04-11 16:28:51 -07:00
Ben Konyi b439bd9a54 Revert "Added synchronous socket implementation to dart:io."
This reverts commit a1f87ebdb8.

Revert "Added sync_socket.h include in sync_socket_win.cc"

This reverts commit bdec13e865.

BUG=

Review-Url: https://codereview.chromium.org/2812153002 .
2017-04-11 15:18:46 -07:00
Ben Konyi bdec13e865 Added sync_socket.h include in sync_socket_win.cc
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2809153003 .
2017-04-11 15:14:35 -07:00
Stephen Adams 208c007650 Work-around for issue 29309
BUG= https://github.com/dart-lang/sdk/issues/29309
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2815543003 .
2017-04-11 15:08:44 -07:00
Ben Konyi a1f87ebdb8 Added synchronous socket implementation to dart:io.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2803543006 .
2017-04-11 14:41:09 -07:00
Emily Fortuna 7697137485 Merge CommonElements and BackendHelpers!
BUG=
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2814453005 .
2017-04-11 14:32:54 -07:00
Brian Wilkerson 3dcf0e31c5 Split error code to ease future improvements
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2813553006 .
2017-04-11 13:35:38 -07:00
Regis Crelier 659511d518 Fix type parameter invocation in the VM (fixes #19725).
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2814833003 .
2017-04-11 13:31:30 -07:00
Ryan Macnak 442d59d30e Roll Dartium blink to "Stop passing removed flag 'background_finalization'."
Review-Url: https://codereview.chromium.org/2813973002 .
2017-04-11 13:22:06 -07:00
Konstantin Shcheglov 6fe8e2278b Simplify PackageMapUriResolver - one folder, return any file, or null.
If the package is know, we return the corresponding file, whether it
exists or not.

If the package is not know, there is no valid Source to resolve to,
so we return null.

We don't need all the features that existed.

Internally we switched to BazelPackageUriResolver, which has its own
logica for searching files in workspaces across multiple folders.

All the places where we create PackageMapUriResolver in analyzer
or analysis_server, we create it with exactly one folder.

R=brianwilkerson@google.com
BUG=

Review-Url: https://codereview.chromium.org/2812093002 .
2017-04-11 13:03:56 -07:00
Brian Wilkerson 4cf6da3a9f More enhancements to ChangeBuilder
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2809943002 .
2017-04-11 12:15:30 -07:00
Brian Wilkerson 0c8b5b8232 Fix a warning
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2817493002 .
2017-04-11 12:08:26 -07:00
Konstantin Shcheglov 38e8b1509e Issue 29109. Resynthesize PrefixElement(s) to fix constants evaluation.
R=brianwilkerson@google.com, paulberry@google.com
BUG= https://github.com/dart-lang/sdk/issues/29109

Review-Url: https://codereview.chromium.org/2815713003 .
2017-04-11 11:28:03 -07:00
Zachary Anderson d52a6a39d5 [dart:io] Fix crash in fetching the error message from BoringSSL
fixes #29307

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2812623005 .
2017-04-11 11:04:44 -07:00
Regis Crelier d8c17c90f2 Process a pair of registers in one instruction where possible on arm in the VM.
R=zra@google.com

Review-Url: https://codereview.chromium.org/2813903003 .
2017-04-11 10:48:45 -07:00
Ryan Macnak 9ce48e63b2 Remove background finalization.
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2809863002 .
2017-04-11 09:54:25 -07:00
Steve Messick 3406c4c1be Fix renaming that got dropped
R=brianwilkerson@google.com, scheglov@google.com

Review-Url: https://codereview.chromium.org/2812733002 .
2017-04-11 09:52:51 -07:00
Konstantin Shcheglov 3dd42456e4 Prioritize analysis of files that import the changed file, or have an error or warning.
R=brianwilkerson@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2808173002 .
2017-04-11 08:26:26 -07:00