Kevin Moore
f33edeafe1
pkg/compiler: remove samples
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2221243002 .
2016-08-08 17:10:44 -07:00
Sigmund Cherem
eac954b3dc
Introduce a bazel provider
...
R=het@google.com
Review URL: https://codereview.chromium.org/2204593010 .
2016-08-08 16:57:19 -07:00
Kevin Moore
406d5e0c48
pkg/compiler: fix imports
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2221893003 .
2016-08-08 14:41:50 -07:00
Stephen Adams
101a83f2f4
dart2js: Reduce overhead of --verbose measurements
...
ZoneSpecification and zoneValues are now per-task, rather than per measurement.
This reduces total LinkedHashMap allocations by 30%
In the large compile I am using to measure these things, there are still
~3M zones created via Zone.fork and 10M _ZoneFunction objects allocated, and the Zone.fork copies the (now cached) LinkedHashMap.
So cross-task measurements are still quite expensive.
R=ahe@google.com
BUG=
Review URL: https://codereview.chromium.org/2133913002 .
2016-08-08 14:18:21 -07:00
Sigmund Cherem
be28b088d6
Split js_backend into multiple libraries.
...
R=sra@google.com
Review URL: https://codereview.chromium.org/2220993005 .
2016-08-08 13:33:06 -07:00
Sigmund Cherem
53d968bd02
delete send-info measurements. This experiment is not being maintained
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2214263002 .
2016-08-08 09:27:46 -07:00
Johnni Winther
e6241bc12d
Include constants in deferred computation.
...
This ensures that in-code constants are included in the deferred computation.
Currently the set of live constants is not computed in itself, so the constants
used in the computation are not the same - and they are generally larger than needed.
R=het@google.com
Review URL: https://codereview.chromium.org/2194173002 .
2016-08-08 14:39:58 +02:00
Johnni Winther
b036a29cbf
Add kind to ConstantValue.
...
In preparation for testing deferred constants.
R=het@google.com
Review URL: https://codereview.chromium.org/2199593003 .
2016-08-08 14:30:16 +02:00
Stephen Adams
36f52dd43f
Avoid modifying the set returned by getInterceptorsOn()
...
The returned set is shared.
This program generates a broken short-circuit interceptor ($n -> $din) due to modifying the cached shared set {n} to {d,i,n}
--------
J.toInt$0$n = function(receiver) {
return J.getInterceptor$din(receiver).toInt$0(receiver);
};
--------
import 'package:expect/expect.dart';
@NoInline()
@AssumeDynamic()
confuse(x) => x;
@NoInline()
foo(x) {
print(x.toInt());
bar(x);
}
@NoInline()
bar(x) {
print(x.toInt());
print(x.runtimeType);
}
main() {
int i = confuse(1);
foo(i);
double d = confuse(2.3);
foo(d);
}
--------
TBR=sigmund@google.com
Review URL: https://codereview.chromium.org/2215133003 .
2016-08-05 16:13:03 -07:00
Sigmund Cherem
0eee4027a6
Delete dart_backend from compiler.
...
R=sra@google.com
Review URL: https://codereview.chromium.org/2213673002 .
2016-08-04 15:57:04 -07:00
Sigmund Cherem
9aee504527
Remove unnecessary imports to tree.dart
...
R=het@google.com
Review URL: https://codereview.chromium.org/2203013003 .
2016-08-03 08:27:50 -07:00
Stephen Adams
478106bce2
dart2js inferrer: don't infer widened type when unreachable
...
'&' and '|' were missing the case to return 'empty' if the argument was empty, causing the widened (default) type to be propagated.
There are a few bitwise operations in the streams code that have better code from being slightly more precise.
BUG=
R=sigmund@google.com
Review URL: https://codereview.chromium.org/1583623002 .
2016-07-27 17:25:56 -07:00
Jacob Richman
8e787a74b0
Fix case caught by test where getUnescapedJSInteropName wasn't called.
...
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/2187893003 .
2016-07-27 13:53:53 -07:00
Kevin Moore
17a2ddfd42
Update dependency on pkg/package_compiler
...
For analysis_server, analyzer, analyzer_cli, compiler packages
Progress on https://github.com/dart-lang/sdk/issues/26711
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/2172683002 .
2016-07-27 08:42:05 -07:00
Stephen Adams
9d5fd9d5bd
Avoid using call-through stub on calls to fields.
...
This usually removes the demand for the call-through stub and sometimes enables optimizations on the field load, e.g.:
WhereIterator: {
"^": "Iterator;_iterator,_f",
moveNext$0: function() {
for (var t1 = this._iterator; t1.moveNext$0();)
if (this._f$1(t1.get$current()) === true)
return true;
return false;
},
_f$1: function(arg0) {
return this._f.call$1(arg0);
}
...
-->
WhereIterator: {
"^": "Iterator;_iterator,_f",
moveNext$0: function() {
var t1, t2;
for (t1 = this._iterator, t2 = this._f; t1.moveNext$0();)
if (t2.call$1(t1.get$current()) === true)
return true;
return false;
},
...
BUG= https://github.com/dart-lang/sdk/issues/22197
R=sigmund@google.com
Review URL: https://codereview.chromium.org/2180363002 .
2016-07-26 18:02:05 -07:00
Stephen Adams
94df5a0c24
dart2js: Avoid empty else clauses in generators.
...
R=sigurdm@google.com
Committed: https://github.com/dart-lang/sdk/commit/a02c5798a4b9c682cfe5fddbf48f053c9c677b68
Review URL: https://codereview.chromium.org/1916863002 .
Reverted: https://github.com/dart-lang/sdk/commit/803826256d0be2c3560705c084d20ed78d1fca74
2016-07-26 09:58:34 -07:00
Stephen Adams
803826256d
Revert "dart2js: Avoid empty else clauses in generators."
...
BUG=
Review URL: https://codereview.chromium.org/2177403003 .
2016-07-25 18:53:32 -07:00
Stephen Adams
a02c5798a4
dart2js: Avoid empty else clauses in generators.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org/1916863002 .
2016-07-25 18:43:16 -07:00
Jacob Richman
96ca5db7e5
Add JSNative utility class with static methods methods to efficiently manipulate typed JSInterop objects in cases where the member name is not known statically. These methods would be extension methods on JSObject if Dart supported extension methods. Update package js to export these methods. Implement in Dart2JS. Implement JS$ in dart2js.
...
BUG=
R=alanknight@google.com , sra@google.com
Review URL: https://codereview.chromium.org/2150313003 .
2016-07-25 09:59:01 -07:00
Stephen Adams
5923966da3
Feature-detect browser for assignment to __proto__.
...
Assigning to __proto__ is a fast way to stitch together a number of
object literals into a prototype chain without copying all the
properties.
Unfortunately this leads to very slow execution on Firefox (and
jsshell). So now we feature-detect Chrome (and d8) since that is the
only browser we know currently can use the 'fast' startup path without
penalizing subsequent performance.
This speeds up some jsshell benchmarks by 30%.
R=het@google.com
Review URL: https://codereview.chromium.org/2180533002 .
2016-07-23 11:42:24 -07:00
Harry Terkelsen
8b1a84c0e0
remove unused message
...
R=jacobr@google.com
Review URL: https://codereview.chromium.org/2173473002 .
2016-07-21 12:46:15 -07:00
Jacob Richman
bbb0c3f727
Seems like this is all that is required to support callable JS objects. dartbug.com/25321
...
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/2164483004 .
2016-07-20 13:16:37 -07:00
Harry Terkelsen
c5728623b9
remove dependency on compiler from resolution
...
This is the first step of a refactoring that splits the resolution
phase from the backend. The end goal is that resolution can be run
without having to instantiate an entire compiler.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2123073003 .
2016-07-18 10:40:21 -07:00
Johnni Winther
3305201211
Serialize this-types in NativeBehavior separately.
...
BUG=
R=het@google.com
Review URL: https://codereview.chromium.org/2150333002 .
2016-07-18 10:42:23 +02:00
Stephen Adams
7749b715d4
dart2js: get:hashCode methods to avoid Object.hashCode
...
R=het@google.com
Review URL: https://codereview.chromium.org/2154583002 .
2016-07-15 13:31:48 -07:00
Johnni Winther
5c5a46a6e1
Serialize data for LibraryElement.getImportsFor
...
R=het@google.com
Review URL: https://codereview.chromium.org/2150533002 .
2016-07-15 10:16:51 +02:00
Johnni Winther
f2e435ba88
Serialize prefix members.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2150493002 .
2016-07-15 09:55:34 +02:00
Johnni Winther
9214293d29
Test ImportElement and fix PrefixElementZ.isTopLevel
...
BUG=
R=het@google.com
Review URL: https://codereview.chromium.org/2150473002 .
2016-07-15 09:47:29 +02:00
Johnni Winther
38dd1553e8
Support checked mode
...
Checked mode checks are now always stored in the WorldImpact meaning that
data doesn't have to be serialized with checked mode enabled.
R=het@google.com
Review URL: https://codereview.chromium.org/2129183002 .
2016-07-12 10:10:12 +02:00
Erik Ernst
1011686cf8
Renamed isParameter to isRegularParameter.
...
This rename was planned a while ago, but it seemed reasonable to take
it in a separate CL because of the number of locations affected.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2132383002 .
2016-07-12 09:31:04 +02:00
Harry Terkelsen
f7878a179d
fix handling of malformed typedefs
...
BUG=
Review URL: https://codereview.chromium.org/2136663002 .
2016-07-08 14:52:23 -07:00
Harry Terkelsen
10691da9f8
dart2js: allow trailing commas in parameter and argument lists
...
Fixes https://github.com/dart-lang/sdk/issues/26646
R=johnniwinther@google.com , lrn@google.com
Review URL: https://codereview.chromium.org/2068003002 .
2016-07-08 10:03:51 -07:00
Erik Ernst
6942e0df63
Fixes bug in scoping for generic methods.
...
The updates to tests/language/generic_local_functions_test.dart use a
local function type argument in its return type, which had not been
tested and did not work.
After a bunch of attempts to change the order in which the resolution
is performed, it suddenly turned out that the offending statement
`visit(node.returnType)` in `ResolverVisitor.visitFunctionExpression`
might be redundant! (.. a subsequent re-resolution in
`ResolverVisitor.analyze` performs the same job, and uses the correct
scope).
So this CL simply removes that `visit..` statement, and the resulting
`dart2js` passes all tests.
Adresses issue https://github.com/dart-lang/sdk/issues/26805 .
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org/2128243002 .
2016-07-08 13:28:36 +02:00
Johnni Winther
ddf8a9ddd2
Serialize WarnOnUseElement
...
R=het@google.com
Review URL: https://codereview.chromium.org/2125793003 .
2016-07-08 11:22:07 +02:00
Johnni Winther
1f1e00f012
Handle redirects to unresolved redirects
...
The solves the handling of redirecting factories that redirects to other
redirecting factories whos immediate redirection target is unresolved.
For instance
class C {
factory C.a() = C.b;
factory C.b() = Unresolved;
}
The implementation normalizes the properties 'immediateRedirectionTarget',
'redirectionDeferredPrefix', 'effectiveTarget', 'effectiveTargetType', and
'isEffectiveTargetMalformed' by always storing the information on the
implementation element.
R=het@google.com
Review URL: https://codereview.chromium.org/2125823002 .
2016-07-08 11:14:20 +02:00
Johnni Winther
41535b3b5b
Serialize parameter nodes for local functions.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2125643002 .
2016-07-08 10:57:10 +02:00
Johnni Winther
4a7b1bb57e
Support enclosingClass on deserialized local elements
...
R=het@google.com
Review URL: https://codereview.chromium.org/2124773002 .
2016-07-08 10:47:33 +02:00
Johnni Winther
185d4d5900
Fix serialization of IndexSetIfNullStructure.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2103833002 .
2016-07-08 10:21:11 +02:00
Johnni Winther
3fcadea405
Compute correct names for closures in operator methods.
...
Operators were not correctly recognized because of the use of identical
instead of == and thus closures contained untransformed operators in
their names.
R=het@google.com
Review URL: https://codereview.chromium.org/2119193002 .
2016-07-08 10:10:31 +02:00
Johnni Winther
d650d0059b
Support serialization of generic methods.
...
BUG=
R=het@google.com
Review URL: https://codereview.chromium.org/2121743002 .
2016-07-08 10:03:02 +02:00
Johnni Winther
04d28ffecb
Correct evaluation of interpolated null
...
R=het@google.com
Review URL: https://codereview.chromium.org/2118203002 .
2016-07-08 09:50:50 +02:00
Johnni Winther
daed6fa215
Fix evaluation of constant map with duplicate keys.
...
BUG=
R=het@google.com
Review URL: https://codereview.chromium.org/2120943002 .
2016-07-08 09:38:37 +02:00
Johnni Winther
c719383d0a
Serialize async marker on getters.
...
BUG=
R=het@google.com
Review URL: https://codereview.chromium.org/2120923002 .
2016-07-08 09:31:14 +02:00
Jacob Richman
595ec1d785
Make is checks work on JavaScriptFunction objects.
...
BUG=
R=sra@google.com
Review URL: https://codereview.chromium.org/2110273003 .
2016-07-01 11:31:25 -07:00
Johnni Winther
a8114631c7
Use unordered map hash on ConstructedConstantValue.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2112893002 .
2016-07-01 12:46:08 +02:00
Johnni Winther
ceb053a257
Handle fields with initializers in constant constructors.
...
This also normalizes CompileTimeConstantEvaluator to always create an ErroneousConstantExpression for constants with compile time errors.
R=het@google.com
Committed: https://github.com/dart-lang/sdk/commit/95e6dde715e2164ba74a71d2f9924dd36f3d2266
Review URL: https://codereview.chromium.org/2104843002 .
Reverted: https://github.com/dart-lang/sdk/commit/fa8f7d20f3848db9676e8d1af30ceaefa1ccb21d
2016-07-01 12:36:55 +02:00
Johnni Winther
fa8f7d20f3
Revert "Handle fields with initializers in constant constructors."
...
This reverts commit 95e6dde715 .
BUG=
Review URL: https://codereview.chromium.org/2118763002 .
2016-07-01 11:25:50 +02:00
Johnni Winther
5e3419a8e2
Handle constant ?? expressions in constructors.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2116483002 .
2016-07-01 11:03:15 +02:00
Johnni Winther
f00a439f7c
Handle invalid deferred prefix declarations.
...
R=het@google.com
Review URL: https://codereview.chromium.org/2116473002 .
2016-07-01 10:53:42 +02:00
Johnni Winther
ee29d16836
Support serialization of loadLibrary
...
Adds support for serialization of the 'loadLibrary' getter implicitly
defined on deferred prefixes.
R=het@google.com
Review URL: https://codereview.chromium.org/2110323003 .
2016-07-01 10:48:08 +02:00