Commit Graph

2081 Commits

Author SHA1 Message Date
Vijay Menon 4e0aa3ff37 Run ddb with debug port open
Change-Id: I5d83cd7deb789499517d1cf1d2a251655bff5924
Reviewed-on: https://dart-review.googlesource.com/c/90760
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-01-29 23:15:04 +00:00
Vijay Menon 8fc9eaf06c Support to run co19_2 on ddk
Change-Id: I93b9752655385d0e26cdf97d0f8224a88c198657
Reviewed-on: https://dart-review.googlesource.com/c/90781
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-01-29 13:50:02 +00:00
Peter von der Ahé 812a6af41a Anonymous mixin applications are abstract
Change-Id: Ib36a0bd243010a5b51bf49bda750d7e432017eae
Reviewed-on: https://dart-review.googlesource.com/c/90703
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-01-29 13:29:32 +00:00
Daco Harkes 591b52f1c5 [frontend] report transformation error messages through library loader
Change-Id: I7280d02e42785742fc800f7e44b1913408dcada5
Reviewed-on: https://dart-review.googlesource.com/c/90460
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-01-23 10:39:07 +00:00
Brian Wilkerson 30f478b439 Add visitor methods for new AST nodes
Change-Id: Ifa8ce25f4da6580acddf76502c0c84b38eed555a
Reviewed-on: https://dart-review.googlesource.com/c/90121
Reviewed-by: Paul Berry <paulberry@google.com>
2019-01-22 19:25:12 +00:00
Kevin Millikin c9a55b437a [Kernel] Remove the dedicated fromEnvironment constants
These can be represented as an unevaluated static invocation.

Change-Id: Ib827345f1f65a09f1a856eae33366722a2e613d2
Reviewed-on: https://dart-review.googlesource.com/c/90008
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-01-18 10:10:42 +00:00
Dan Field 5b1daaac6c Exposes a thin layer over getsockopt/setsockopt for supported platforms.
This allows developers to have more fine grained control over socket
options supported by their platforms, particularly when there is not a
nice way to encapsulate differences between IPv4 and IPv6 options (as
with IP_MULTICAST_IF and IPV6_MULTICAST_IF).  It also begins the work
of exposing socket level and option values, although keeping it for now
only to a minimum necessary to assist with setting the multicast
interface for datagram sockets.

This CL also marks `multicastInterface` as deprecated.

Bug: https://github.com/dart-lang/sdk/issues/17057
Change-Id: I39b3bf3d32d39de1c777acea4425d6eb2226355d
Reviewed-on: https://dart-review.googlesource.com/c/89164
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2019-01-17 23:05:21 +00:00
Brian Wilkerson ac1bf656c4 Non-breaking changes to add code-as-ui support
Change-Id: I8a2f0fe4e8e732f866d16e7d349fb21b8dd46194
Reviewed-on: https://dart-review.googlesource.com/c/89923
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-01-17 16:55:19 +00:00
Terry Lucas edca6169c1 Fixed a number of dart:html P1 issues.
- Fixed HTML API's with callback typedef to correctly convert Dart function to JS function.
- Expose HttpStatus from dart:html
- Expose DomName ondblclick and dblclickEvent for Angular analyzer.
- Fixed removeAll should be Iterable<Object> to match Set's removeAll not Iterable<E>.
- Fixed a number of DataTransferItem, Entry, FileEntry and DiretoryEntry returning NativeJavaScriptObject needed type registered in DDC.
- Added ability to allow local file access from Chrome browser added -local in ddb.

R=vsm@google.com

Fixes #30278
Fixes #35484
Fixes #34318
Fixes #35510

Change-Id: Ide8c04716c54045e837781d489562f27b694b109
Reviewed-on: https://dart-review.googlesource.com/c/89340
Commit-Queue: Terry Lucas <terry@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2019-01-15 17:21:50 +00:00
Kevin Millikin d9944433af [Kernel] Clean up error reporting in constant evaluation
Make the constant evaluator take an explicit error reporter so we have
to opt in to using the "simple" one that reports errors in an ad hoc
way.  This is the start of a change to use Fasta-controlled error
messages throughout and eventually get rid of the simple error
handler, and to continue constant evaluation after the first constant
error.

Change-Id: If6b1801edab6063754b642cf4a603abf9d63103a
Reviewed-on: https://dart-review.googlesource.com/c/89501
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-01-15 11:34:42 +00:00
Jenny Messerly 9df4f42a2f [dartdevc] handle a null stack trace passed to async errors
Under certain conditions, we receive a null stack trace passed to a then
callback of an awaited Future. If that happens, the original stack trace
is now recovered from the error object. This matches dartdevc behavior
prior to the commit f68ae70e8e, for this
case. Fixes #33331

Change-Id: I8a4a295bdde18d4339420a7ba6443d83d4e00abb
Reviewed-on: https://dart-review.googlesource.com/c/89060
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-01-14 19:57:24 +00:00
Samir Jindel 4d77c7b3a6 [vm] Remove redundant type-checks from core libraries.
In conjunction with previous revisions, this improves several Flutter microbenchmarks by 2-4%.

Change-Id: Ic864fd586dc57d87b80cebd6ceace0a8165fa82b
Reviewed-on: https://dart-review.googlesource.com/c/88702
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-01-14 19:56:37 +00:00
Kevin Millikin 944984f015 [Kernel] Add syntax for unevaluated constants
Add Kernel syntactic support for constants constructed by
bool.fromEnvironment, int.fromEnvironment, and String.fromEnvironment.
These values are not necessarily available at compile time.  Because
constants can depend on these values, there is also an unevaluated constant
that represents an expression depending on environment values.

This syntax is not yet produced by the Fasta compiler.

Change-Id: Ie96ea7f60a7efcd35ac802b320a00f398d41232e
Reviewed-on: https://dart-review.googlesource.com/c/88827
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-01-11 08:35:20 +00:00
Jenny Messerly 60cf393ff3 [dartdevc] fix to pass in analysis options to analysis context
Also switch to using the RestrictedAnalysisContext.

Change-Id: Ia9a07331592a3eaacacddb8b27ca08598d2c0773
Reviewed-on: https://dart-review.googlesource.com/c/88749
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
2019-01-10 22:49:09 +00:00
Peter von der Ahé 7ac495e02a Prepare DDC for removing TypeEnvironment.hierarchy
Validating the class hierarchy requires subtype tests. Previously,
Fasta has worked around this by computing the hierarchy twice, as
well as visiting the hierarchy several times. In order to improve
performance of modular compilation, we're working on changing this.

To enable creating a TypeEnvironment without a hierarchy, we're
removing the field from the API.

Change-Id: If1aa10598012e53455b92a63ebae12dbae316fc7
Reviewed-on: https://dart-review.googlesource.com/c/88822
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-01-10 05:21:24 +00:00
Mike Fairhurst ca9ea997bd Fix old treatment of {}, enable set literals tests
Change-Id: Iec319cb735a3747e64561f3865cce2f08fb2be0f
Reviewed-on: https://dart-review.googlesource.com/c/88601
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-01-10 01:38:34 +00:00
Stephen Adams ea6d343bae js_runtime: Improve hashCode for double values
Change-Id: Ibe97c130eb6658fadec1010dd9ff3292488ffc1d
Reviewed-on: https://dart-review.googlesource.com/c/88760
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2019-01-09 00:45:50 +00:00
Jenny Messerly 253b0cc1e3 [dartdevc] improve cast failoure error message
The new message should be a bit more understandable. Inspired by the
suggestion in #35480.

Change-Id: I1e20adf5a13191705b28121dbeaf323682e6d324
Reviewed-on: https://dart-review.googlesource.com/c/88300
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-01-08 18:46:16 +00:00
Jenny Messerly e541849a9f [dartdevc] fix mixin super constructor calls in kernel backend
Kernel and Analyzer have slightly different rules for creating implicit
constructors, which DDC's kernel backend did not account for. This
resulted in a mismatch between which super constructor calls it thought
were necessary, vs which constructors were generated.

Both DDC backends are now less sensitive to the representations, and
the kernel backend checks for field initializers in mixin declarations,
rather than relying on the (nonexistent) implicit constructor node.

Change-Id: I01a6ae11ecf78193d7db227ba0b7adeb27d514d5
Reviewed-on: https://dart-review.googlesource.com/c/88432
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-01-07 21:14:22 +00:00
Jenny Messerly 36ab8b18ea [dartdevc] implement set literal and enable-experiments support
Change-Id: Ibc45b1b1792d62a8f176e6c2f2f5c1e3134942f1
Reviewed-on: https://dart-review.googlesource.com/c/88400
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-01-04 22:08:54 +00:00
Jenny Messerly 3d6acab3e7 [dartdevc] remove unused dartdevk binary, fixes #35483
It's simply an alias for `dartdevc --kernel`, and now that build_runner
is switching to that, there's no reason to keep it around anymore.

Change-Id: I43d30a582314a236bcfa2e3a0b50bb48ddac79f8
Reviewed-on: https://dart-review.googlesource.com/c/88281
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-01-04 17:19:52 +00:00
Lasse R.H. Nielsen 5d85f113e8 Add constant map-based set implementation.
Change-Id: I3be60bdfea2b0f8c8238705d7f6a830147083b76
Reviewed-on: https://dart-review.googlesource.com/c/85704
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-01-03 14:47:28 +00:00
Sam Rawlins 428629efd8 Enforce sealed annotation on classes and mixins
This CL replaces https://dart-review.googlesource.com/c/sdk/+/75941
(there were some large refactorings, and I got a new laptop and lost my Git repo)

Bug: https://github.com/dart-lang/sdk/issues/34232
Change-Id: Ia0746b94a23ccb757bc209e76098243896be8c55
Reviewed-on: https://dart-review.googlesource.com/c/88127
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-01-02 18:07:52 +00:00
Jenny Messerly 7bc2f82011 [dartdevc] implement dart:developer via console logging
dart:developer now logs commands using `console.debug`, so the data is
available for use by the debugger.
Change-Id: Ib3f3cfa7b099e44ea3c302cd4a91610b188169e2
Reviewed-on: https://dart-review.googlesource.com/c/87942
Reviewed-by: Jacob Richman <jacobr@google.com>
Commit-Queue: Jacob Richman <jacobr@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-12-21 02:05:53 +00:00
Peter von der Ahé de65d6892a Remove legacyMode from type inference
Change-Id: I78a13470e5707c9d26fe1796ad24ba507d93a9e8
Reviewed-on: https://dart-review.googlesource.com/c/86358
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-19 17:21:51 +00:00
Jenny Messerly f68ae70e8e [dartdevc] ensure all throws are wrapped in JS Error (#33331)
This improves the default JS display of exceptions/errors from DDC
compiled code. This gives a better "default" experience if JS code
(or a JS engine, like browers/Node.js) ends up catching Dart exceptions.

Change-Id: Ib2dda6eee710f8b536d5ed7223e0101310a137b3
Reviewed-on: https://dart-review.googlesource.com/c/84446
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-12-13 22:44:17 +00:00
Paul Berry 28c78b9d46 Add an assertion to check consistency of ExperimentalFeature constants.
This uncovered a bug in dev_compiler that was showing up at compile
time--it was defaulting the enableAsserts flag to null, causing a null
pointer exception during kernel constant evaluation.

Change-Id: I2c75ffdc494f8d768aa98d67ef8257a20e74b9cd
Reviewed-on: https://dart-review.googlesource.com/c/86982
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2018-12-13 21:53:34 +00:00
Brian Wilkerson a745f477dc Remove deprecation warnings from ddc
Change-Id: Ifaf46b6770eeb75844633346e35f8c5d9729e3b9
Reviewed-on: https://dart-review.googlesource.com/c/87020
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-12-12 14:23:31 +00:00
Jacob MacDonald 2e3ed72293 Return a bad compiler result instead of rethrowing in ddk.
This matches the DDC behavior and fixes an issue with duplicate stack traces being logged.

Change-Id: I3e968c3ca36875ccc6d92bf77a357af83ea8d6cb
Reviewed-on: https://dart-review.googlesource.com/c/86940
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-12-11 20:49:20 +00:00
Kevin Moore 1337062779 Remove pkg:microlytics
Never used, not touched in 4+ years

Change-Id: Ia1568969b2d07c56b5cbe3258e6a13e10b80813d
Reviewed-on: https://dart-review.googlesource.com/c/86941
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2018-12-11 17:18:00 +00:00
Aske Simon Christensen 05fb37a808 Add SetLiteral node to kernel.
Change-Id: I2f12662efc8ae3f064674bba03c333e0c23ffa0d
Reviewed-on: https://dart-review.googlesource.com/c/85681
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-06 14:46:58 +00:00
Brian Wilkerson 2118fcf7b0 Rename StrongTypeSystemImpl
Change-Id: I394bd9bfa2b6d9ceeb87312e94a3e315e32846a1
Reviewed-on: https://dart-review.googlesource.com/c/86282
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2018-12-05 22:22:36 +00:00
Jacob MacDonald 20b9b9a289 catch a few more error types in kernel mode of ddc
Change-Id: I68f78ecfc5e83f187850df28d7d37b816eb13c22
Reviewed-on: https://dart-review.googlesource.com/c/86263
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-12-05 22:18:17 +00:00
Paul Berry 670f9ab49b Merge commit '65401da92251a7318e3264b816ce0c4e14701751' into analyzer 2018-12-04 15:38:21 -08:00
Jenny Messerly d3c3341b8a [dartdevc] fix conditional imports in kernel backend
Change-Id: I694b67624dff65099ca8cb8147d2b56a3532cd6c
Reviewed-on: https://dart-review.googlesource.com/c/85880
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-12-04 18:39:46 +00:00
Paul Berry 854a7cfe15 Merge commit '43113760f2ea114c183f8965b0d48fbb7469dc7f' into analyzer
Conflicts:
	DEPS
2018-11-28 08:38:52 -08:00
Martin Kustermann f5d1229081 Reland "[VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding"
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern

  v2 <- LoadClassIdInstr(v1)
  BranchIf v2 == IntegerConstant(cid)

Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline.  This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.

Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common.  (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).

This improves dart-aot by
  * 31%+ for a protobuf decoding benchmark we care about

Issue https://github.com/dart-lang/sdk/issues/31954

Change-Id: I7181bbf096aabe303634fd3b2bff9cc96d69719c
Reviewed-on: https://dart-review.googlesource.com/c/85443
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-11-28 10:43:32 +00:00
Paul Berry 82add824fd Merge commit 'db89c2d1ac3e8b6c6130cbb714c4e242e6fefc27' into analyzer 2018-11-27 15:11:22 -08:00
Jacob MacDonald db89c2d1ac fix --kernel parsing when reading from parameter files, and dont reuse the compiler result
Change-Id: Idc7e1f5d41975fb6641a385f26191f76ae47b5ff
Reviewed-on: https://dart-review.googlesource.com/c/85426
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2018-11-27 21:34:39 +00:00
William Hesse faafdb4b2f Revert "[VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding"
This reverts commit d7cf6959bb.

Reason for revert: This causes crashes on the vm-obfuscate builder at https://ci.chromium.org/p/dart/builders/luci.dart.ci.sandbox/vm-kernel-precomp-obfuscate-linux-release-x64
like

FAILED: dartkp-dart_precompiled release_x64 corelib_2/linked_hash_map_test
Expected: Pass
Actual: Crash
Unexpected compile error.

--- Command "vm_compile_to_kernel" (took 11.000189s):
DART_CONFIGURATION=ReleaseX64 /b/s/w/ir/cache/builder/sdk/pkg/vm/tool/gen_kernel --aot --platform=out/ReleaseX64/vm_platform_strong.dill -o /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.dill /b/s/w/ir/cache/builder/sdk/tests/corelib_2/linked_hash_map_test.dart --packages=/b/s/w/ir/cache/builder/sdk/.packages -Ddart.developer.causal_async_stacks=true

exit code:
0

--- Command "precompiler" (took 583ms):
DART_CONFIGURATION=ReleaseX64 out/ReleaseX64/gen_snapshot --snapshot-kind=app-aot-assembly --assembly=/b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.S --obfuscate --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/out/ReleaseX64/generated_compilations/dartkp/tests_corelib_2_linked_hash_map_test/out.dill

exit code:
-6

stderr:
Warning: This VM has been configured to obfuscate symbol information which violates the Dart standard.
         See dartbug.com/30524 for more information.

===== CRASH =====
version=2.2.0-edge.83712405657ff736033380cb24b0bd5a62fc3692 (Tue Nov 27 16:56:07 2018 +0000) on "linux_x64"
si_signo=Segmentation fault(11), si_code=1, si_addr=0xd1400050e5f
Dumping native stack trace for thread 2b71
  [0x000056001fc426c7] Unknown symbol
  [0x000056001fc426c7] Unknown symbol
  [0x000056001fe5763d] Unknown symbol
  [0x000056001fe4c99c] Unknown symbol
  [0x000056001fe6166a] Unknown symbol
  [0x000056001fe59c0c] Unknown symbol
 

Original change's description:
> [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding
> 
> This change extends/fixes the exiting "pattern recognition" which tries
> to recognize the pattern
> 
>   v2 <- LoadClassIdInstr(v1)
>   BranchIf v2 == IntegerConstant(cid)
> 
> Furthermore we start inlining the recognized `ClassID.getID` method very
> early in the pipeline.  This allows the VM to recognize the above
> pattern and insert redefinitions before the actual inlining pass.
> 
> Furthermore we special-case two very hot methods in utf8 decoding by
> manually having two loops, one of which is guarded by a class-id check
> against the _Uint8ArrayView class, which is most common.  (In the future
> we would like to unify the typed data layouts so we no longer need to
> use `ClassId.getID`, thereby also allowing non core library code to use
> this).
> 
> This improves dart-aot by
>   * 31%+ for a protobuf decoding benchmark we care about
> 
> 
> Issue https://github.com/dart-lang/sdk/issues/31954
> 
> Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
> Reviewed-on: https://dart-review.googlesource.com/c/85281
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
> Reviewed-by: Jenny Messerly <jmesserly@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

TBR=vegorov@google.com,kustermann@google.com,jmesserly@google.com,johnniwinther@google.com,sra@google.com

Change-Id: I912b0768c32cbb00297ce48db29dbdbea44c14fa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/85441
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2018-11-27 18:15:36 +00:00
Martin Kustermann d7cf6959bb [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern

  v2 <- LoadClassIdInstr(v1)
  BranchIf v2 == IntegerConstant(cid)

Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline.  This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.

Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common.  (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).

This improves dart-aot by
  * 31%+ for a protobuf decoding benchmark we care about


Issue https://github.com/dart-lang/sdk/issues/31954

Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
Reviewed-on: https://dart-review.googlesource.com/c/85281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-11-27 13:14:27 +00:00
Paul Berry e649ed1aa3 Merge commit 'c1daa3276566e48dac6f52742264578092c56a35' into analyzer 2018-11-21 08:47:55 -08:00
Jenny Messerly 1e186ad9cb [dartdevc] fix build times by only linking input sources
DDC was incorrectly re-linking transitive dependencies, so build times
continued to increase as the build progressed, with the application
itself performing the worst. With this fix, DDC is not on the critical
path and compiles are all very short.

Change-Id: Ia05bfb9f1a041fc979bc4bc0ee3bff9a0609b4b7
Reviewed-on: https://dart-review.googlesource.com/c/84966
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2018-11-21 01:17:13 +00:00
Jenny Messerly 751d7ad2e2 [dartdevc] fix js_ast comma expression not generating parentheses
This happened because for-of printed using EXPRESSION precedence
for the iteration expression, but it should be ASSIGNMENT per the spec
(https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements).

Change-Id: I869ad3f1181cfb33c57fe79aebfa3699f66a0712
Reviewed-on: https://dart-review.googlesource.com/c/84833
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
2018-11-20 22:56:35 +00:00
Jenny Messerly 099f48b1da [dartdevc] fix #33621, name collision due to inheriting JS statics
Change-Id: I6e3f0bb741e919d8303422ac2df853142649e7ff
Reviewed-on: https://dart-review.googlesource.com/c/83563
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2018-11-20 21:13:29 +00:00
Brian Wilkerson cb88347087 Port the SDK violation hint to the master branch
Change-Id: Id795400473796f05e46c0ffdd0a8920f8ad5bcd3
Reviewed-on: https://dart-review.googlesource.com/c/84688
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2018-11-19 21:14:48 +00:00
Paul Berry 32a6032f03 Merge commit 'ddbe22190c41b1993a3c93b67f1bfa57287348f8' into analyzer 2018-11-16 12:01:38 -08:00
Jenny Messerly 4e3e5711eb [dartdevc] fix kernel backend summary to module mapping
The front_end code was sorting the summary URI list, which caused DDC to
find the wrong JS module import for a given summary (Components do not
store the URI they were loaded from, so DDC has to track that.)

Change-Id: Ief29c790d7303c8f290c6c669af2e1b34bc5bffb
Reviewed-on: https://dart-review.googlesource.com/c/84581
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
2018-11-16 15:20:25 +00:00
Paul Berry 1b5996ae67 Merge commit '30c5b39d4e0e7672d05df6aebba73254dd7ee770' into analyzer 2018-11-14 09:37:06 -08:00
Peter von der Ahé 9931b77802 Rename strongMode constructor parameter of TypeSchemaEnvironment to legacyMode
Change-Id: I713dcf4a2f614893832fb4d18dcaa23c67ffd9c5
Reviewed-on: https://dart-review.googlesource.com/c/84409
Auto-Submit: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-11-14 09:59:07 +00:00