Johnni Winther
05f3b12960
Add test for native declarations
...
Change-Id: Iea9d8d27e6fdefa6f47471a459cdb4363aab65e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98011
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2019-03-28 10:29:11 +00:00
Johnni Winther
ea6e83004b
Use @pragma instead of package:meta/dart2js in tests
...
Change-Id: I16c0ed6f391a417d8faa55e68cde902d91e3db32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95220
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-03-06 08:32:05 +00:00
Johnni Winther
013cf68624
Replace js_helper annotations with @pragma
...
@ForceInline is still used by dart:html, will be removed in a later CL.
Change-Id: I480325fe91cc6baefb17ead49f839442e023d441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95160
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2019-03-05 08:56:18 +00:00
Stephen Adams
bd660a5707
Better inlining in execute-once paths
...
Calls that return constants and calls that forward to calls of the
same or smaller size should be inlined in static initializers.
Change-Id: I55284b7455bc70e34607c0a218a5bf6ca31fc6b4
Reviewed-on: https://dart-review.googlesource.com/74020
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-09-11 20:43:11 +00:00
Stephen Adams
e02ec040cb
@dart2js.tryInline should not inline methods that can't be inlined
...
Change-Id: I1efc13b64d7740dbe904364e44fa6e6b9be0fd81
Reviewed-on: https://dart-review.googlesource.com/70440
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-08-17 22:14:03 +00:00
Johnni Winther
e5a2fe6435
Update jump, side effect and inlining tests to test strong mode
...
Change-Id: I0c8073f5bc72fae63b012033dc23b15c1913fec7
Reviewed-on: https://dart-review.googlesource.com/52223
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2018-04-24 08:37:24 +00:00
Stephen Adams
23a7b62c42
Use type of receiver for setter target identification
...
This 'almost typo' was preventing any setters from being inlined.
Change-Id: Idca5ba35df34f2328e3f926790e093ce02ac8863
Reviewed-on: https://dart-review.googlesource.com/45367
Commit-Queue: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2018-03-07 20:48:52 +00:00
Johnni Winther
f2c2c99714
Adjust inlining heuristics for in-loop calls
...
Change-Id: Ifaa1e3ac5405cb9159fd2e6c462e076d9f48b120
Reviewed-on: https://dart-review.googlesource.com/30444
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-12-20 08:20:03 +00:00
Johnni Winther
12ee4edbb8
Implement inlining heuristics on conditional expression.
...
Change-Id: I183b6345e29d6c00f140dcbd1ffff05faf0e781f
Reviewed-on: https://dart-review.googlesource.com/30442
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-12-20 08:02:14 +00:00
Johnni Winther
0edef589d4
Ensure type variables for inlined constructors and mixin fields
...
Change-Id: I348acffb7842ff1c9f28ebf73c507e282c6a045e
Reviewed-on: https://dart-review.googlesource.com/29080
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-12-14 08:53:21 +00:00
Johnni Winther
9df549a2d0
Avoid inlining of external functions
...
Change-Id: I43aed9e484c55d40a9fa7d5db029e0d11a698b3e
Reviewed-on: https://dart-review.googlesource.com/28562
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-12-13 09:28:09 +00:00
Johnni Winther
59106e8f55
Fix crashes caused by inlining
...
Change-Id: I7fef190a4b5248f1508f0122c5dcb5ee7fdc4c40
Reviewed-on: https://dart-review.googlesource.com/27940
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2017-12-12 08:07:29 +00:00
Johnni Winther
2fe5db885d
Fix inlining 'too difficult' test
...
- include reason for 'too difficult' in the expectations
- fix inlining of dynamic call with optional argument
Change-Id: I02e4885ff3eb4a991501bb3f5d8432d35165491e
Reviewed-on: https://dart-review.googlesource.com/27220
Reviewed-by: Stephen Adams <sra@google.com >
2017-12-08 16:05:42 +00:00
Johnni Winther
12a94d7035
Initial kernel based inlining heuristics
...
- currently for number of calls outside loops.
Change-Id: Iedafe54ab70f65969bf89db3bfd98d45be493893
Reviewed-on: https://dart-review.googlesource.com/26300
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2017-12-08 15:55:10 +00:00
Johnni Winther
dbc907a6a0
Include inlined instance type for constructors and factories
...
Change-Id: Ia9be24f02f07e0d3329125b2ffed28e16bf34be3
Reviewed-on: https://dart-review.googlesource.com/26280
Reviewed-by: Stephen Adams <sra@google.com >
2017-12-08 15:17:00 +00:00
Johnni Winther
b6f1bd02e8
Inline constructor bodies.
...
Change-Id: Iaf7d206ff92aa07ddfd3934340888dcd617fc47c
Reviewed-on: https://dart-review.googlesource.com/25900
Reviewed-by: Stephen Adams <sra@google.com >
2017-12-07 09:13:23 +00:00
Johnni Winther
7b1a097f86
Add inlining tests for code considered too difficult to inline
...
The tests include the parts where we unconditionally consider the
function too difficult to inline, i.e. where the node count is not
taken into account. For this reason, these cases are not considered
part of the heuristics but of the inlining capabilities.
Regarding loops, I'm not sure if we disallow them by default due to
heuristics, or only allow forced inlining due to incomplete
capabilities.
Change-Id: Iee37f972c694251e0e1390fbb82bc30a4fc0bd6a
Reviewed-on: https://dart-review.googlesource.com/24109
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-30 08:34:20 +00:00
Johnni Winther
1f3288e95c
Add tests for inlining of constructor and dynamic call.
...
Change-Id: I328819ca3f357c21e5dc575c7098fcd6cf66dec7
Reviewed-on: https://dart-review.googlesource.com/23678
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-28 08:57:58 +00:00
Johnni Winther
77f8e2fa36
Add inlining test for package:meta
...
Change-Id: Ia69aede0fc5da7fd329eb010666395519915ac5b
Reviewed-on: https://dart-review.googlesource.com/23670
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-28 08:35:07 +00:00
Johnni Winther
da9d21c49e
Add inlining test
...
Change-Id: I17663d41d0f4e2b6f3bb7f44bed694cfff7fac38
Reviewed-on: https://dart-review.googlesource.com/23481
Reviewed-by: Stephen Adams <sra@google.com >
2017-11-27 09:22:57 +00:00