lrn@google.com
a6c525dbc9
Mark test failing due to dartbug.com/21523
...
Review URL: https://codereview.chromium.org//706883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41549 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 12:16:18 +00:00
brianwilkerson@google.com
750b5e426c
Fix issue 19424
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//700943003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41526 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-05 17:05:58 +00:00
paulberry@google.com
df62a0d75d
Warn when implicit default value overrides explicit one that differs.
...
BUG=dartbug.com/18914
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//700923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41503 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 20:32:18 +00:00
paulberry@google.com
18b71fa42a
Fix type analysis of the keyword "dynamic".
...
The type of "dynamic" isn't "dynamic", it's "Type".
BUG=dartbug.com/18731
R=scheglov@google.com
Review URL: https://codereview.chromium.org//680423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41477 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 04:13:06 +00:00
paulberry@google.com
31c3f90301
Properly implement identical() test in analyzer constant evaluation.
...
Previously we were treating identical(x, y) as equivalent to (x == y).
However the semantics aren't the same.
BUG=dartbug.com/21177
R=scheglov@google.com
Review URL: https://codereview.chromium.org//689173004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41475 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 01:32:33 +00:00
regis@google.com
5c55e61647
Resubmit fix for Function::Clone() and Field::Clone() to adjust the class owner
...
of type parameters (issue 18630).
Make sure to clone the parameter type array as well.
Add regression tests.
R=iposva@google.com
Review URL: https://codereview.chromium.org//693693003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41474 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 23:16:33 +00:00
fschneider@google.com
7bec3edaef
Remove saving/restoring of the context at function entry.
...
This is not needed anymore after I changed the current context
to always reside in a local variable.
Further simplifications and cleanup in the debugger.
This also fixes a bad memory retention problem with
non-capturing closures.
BUG=dartbug.com/18886
TEST=tests/language/vm/closure_memory_retention_test.dart
R=hausner@google.com
Review URL: https://codereview.chromium.org//695483003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41433 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 07:35:51 +00:00
regis@google.com
71c8b1b210
Revert mixin fix r41424 until mirrors issue 21474 is fixed.
...
Review URL: https://codereview.chromium.org//691053004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41425 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 19:04:02 +00:00
regis@google.com
5a09dee193
Fix Function::Clone() and Field::Clone() to adjust the class owner of type
...
parameters (issue 18630).
Add regression tests.
Commented out 3 lines in mirror test (issue 21474 filed).
R=srdjan@google.com
Review URL: https://codereview.chromium.org//646103005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41424 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 17:39:40 +00:00
sra@google.com
8649bd794b
Redo "Constant fold charCodeAt via constant system"
...
TBR=johnniwinther@google.com
BUG=
Review URL: https://codereview.chromium.org//682243004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41384 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 01:00:09 +00:00
sra@google.com
3e221c1d3e
Revert "Constant fold charCodeAt via constant system"
...
TBR=johnniwinther@google.com
BUG=
Review URL: https://codereview.chromium.org//664283004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41382 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-29 00:47:02 +00:00
sra@google.com
5bc7fbb96f
Constant fold charCodeAt via constant system
...
BUG=
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//681543002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41381 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 23:58:15 +00:00
hausner@google.com
95dc65a0e9
Implement await for statement
...
Implement await for statement to iterate over streams. Uses
the built-in class StreamIterator.
await for (var e in stream_expr) {
S;
}
Is translated to:
var it = new StreamIterator(stream_expr);
while (await it.moveNext()) {
var e = it.current;
S;
}
Review URL: https://codereview.chromium.org//662603003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41328 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 18:03:43 +00:00
koda@google.com
ede485669b
Fix test timeout; faster DEBUG String::CharAt by not using mutable accessor.
...
BUG=dart:21343
R=iposva@google.com
Review URL: https://codereview.chromium.org//666993002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41218 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 00:15:43 +00:00
paulberry@google.com
357d100aba
Fix java-based analyzer status for test modifications in r41054.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//665823005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41216 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 22:11:36 +00:00
paulberry@google.com
271aee1d83
Handle non-factory redirects in constant evaluation.
...
R=scheglov@google.com
Review URL: https://codereview.chromium.org//640813004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41169 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-17 15:54:44 +00:00
srdjan@google.com
3dbcfcca7a
Fix issue 21159: prevent endless inlining of field dispatchers.
...
Review URL: https://codereview.chromium.org//659793003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41156 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 17:13:01 +00:00
ricow@google.com
79fc884b86
Skip language/large_class_declaration_test in debug mode on the vm
...
This is flaky timing out on several platforms, and is consistentnly timing out on our win32 debug russian bot
Review URL: https://codereview.chromium.org//642813010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41139 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-16 05:56:15 +00:00
hausner@google.com
2f49f29c38
Await always waits
...
The expression ‘await e’ always suspends the enclosing function. If e does not
evaluate to a an object o of type Future, a new Future is created using Future.value(o).
A small change in the backend allows a return instruction to be followed by
other instructions. In async functions, a return can suspend the function and the
continuation point is in the same code block after the return.
Other small changes:
- More user-friendly error message if async/await is not enabled.
- Programs no longer need to import dart:async when using async/await.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//634603002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41105 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 19:58:06 +00:00
srdjan@google.com
e085c66b24
Disable test using async for non-VMs.
...
Review URL: https://codereview.chromium.org//653143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41104 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 17:33:21 +00:00
fschneider@google.com
e6ef4b16bf
Fix captured parameters and optimized try-catch.
...
The stack slots of captured parameters must be skipped when
generating sync code in optimized try-catch. Since those parameters
are initially copied into the context, their values are not recorded
in the environment.
Store-to-load forwarding may though use the original initial value
from the stack and therefore it must not be overwritten by try-sync
code that predeeds every call inside optimized try-blocks.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//653073002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41099 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 14:48:32 +00:00
paulberry@google.com
cd171c8d3d
Allow analyzer to distinguish unresolved types from dynamic.
...
This makes it possible to correctly report checked mode compile time
errors in the event of unresolved typenames.
BUG=dartbug.com/16391
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//650323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41098 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 13:47:37 +00:00
floitsch@google.com
ff86ef7494
Add failing (for dart2js) deferred constant-list test.
...
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//652713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41092 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-14 09:02:53 +00:00
paulberry@google.com
77d74fa766
Fix constant evaluation in the presence of nonexistent fields.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//652833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41082 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 21:07:00 +00:00
paulberry@google.com
99a616e041
Type check field assignments during constant evaluation.
...
BUG=dartbug.com/16391
R=scheglov@google.com
Review URL: https://codereview.chromium.org//644283002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41062 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-11 21:25:07 +00:00
floitsch@google.com
36c7d7f43e
dart2js: Fast fix for deferred globals.
...
The fix is not perfect: it uses "arguments[1]" to avoid coming up with a fresh name.
Global variables are still allocated in the main-unit. If they are initialized with a constant value, they drag in that value into the main unit. (see http://dartbug.com/21301 ). That bug should, however, affect very few users.
BUG= http://dartbug.com/21293
R=cbracken@google.com
Review URL: https://codereview.chromium.org//646083002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41056 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 23:53:07 +00:00
paulberry@google.com
465c48479c
Type check constant variable declarations.
...
BUG=dartbug.com/16391
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//637303005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41054 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 21:57:17 +00:00
paulberry@google.com
2b14985502
Check field type when evaluating initializing formals.
...
This performs proper type checking when the type of a field differs
from the type of a field formal parameter, e.g.:
class A {
final T1 x;
const A(T2 this.x);
}
// only works if <expr> is a subtype of both T1 and T2.
var a = const A(<expr>);
Previously we only checked the parameter type (T2 in the above example).
BUG=dartbug.com/16391
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//649733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41048 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 18:50:18 +00:00
vegorov@google.com
1ea5f34f56
Fix incorrect handling of refined aliases during load forwarding.
...
If intrablock load forwarding refines some store instruction in a way that introduces previously unseen alias fallback to unrefined place with a more generic alias instead.
R=fschneider@google.com
BUG=
Review URL: https://codereview.chromium.org//638903004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41009 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 11:47:13 +00:00
paulberry@google.com
492d5bee03
Check parameter types when evaluating constants.
...
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//633803002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40978 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 20:51:24 +00:00
paulberry@google.com
b4b39a160e
Properly annotate type_check_const_function_typedef2_test.
...
Rather than mark it as "Fail, OK" in the status files, annotate it as
"checked mode compile-time error"; the test framework will convert
this to a pass or fail expectation depending on whether the test is
being run in checked mode.
R=johnniwinther@google.com
Review URL: https://codereview.chromium.org//632123002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40955 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-07 13:23:42 +00:00
fschneider@google.com
217dab63db
Fix assertion failure in range analysis.
...
The resulting range was correct, but not precise, as expected (too large by a constant)
BUG=dartbug.com/21245
TEST=tests/language/vm/regress_21245_test.dart
R=vegorov@google.com
Review URL: https://codereview.chromium.org//630043002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40932 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 14:52:05 +00:00
floitsch@google.com
7efbf68e7b
dart2js: Remove spurious comment in test.
...
R=sigurdm@google.com
Review URL: https://codereview.chromium.org//632633002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40925 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 12:31:58 +00:00
scheglov@google.com
bc287b5a3e
New analyzer snapshot.
...
R=brianwilkerson@google.com
BUG=
Review URL: https://codereview.chromium.org//622743002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40867 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 04:13:16 +00:00
paulberry@google.com
cb6243baea
Rework EvaluationResultImpl class hierarchy.
...
This CL changes EvaluationResultImpl from abstract to concrete, and
eliminates its derived classes, ValidResult and ErrorResult. This
eliminates the dichotomy between "compile time constant that computed
successfully" and "compile time constant that failed to compute
because of errors", so that we can keep track of errors encountered
during successful evaluation of a constant (this is necessary to
support checked mode compile-time errors). It also avoids the need to
do double dispatch between the two derived classes in order to
evaluate constants involving binary operators.
We now keep track of constant evaluation errors my accumulating them
into a list (which is passed as a constructor argument into
ConstantVisitor). This allows ConstantVisitor to represent its
intermediate values using DartObjectImpl directly, and fixes some
corner cases where we were dropping or duplicating constant evaluation
errors.
As a result of fixing the corner cases, issue 21177 is exposed.
(Previously the test "compile_time_constant10_test/none" failed to
show the bug due to the error being dropped).
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org//613303003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40856 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-01 21:21:11 +00:00
lrn@google.com
28937c86ae
Optimize _GrowableArray._join and _StringBase._interpolate.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//551823002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40800 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 08:28:00 +00:00
hausner@google.com
752167dec9
throw e is not a compile-time constant expression
...
Detect illegal compile-time const expression and report error.
Fixes 21146.
R=regis@google.com
Review URL: https://codereview.chromium.org//616673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40793 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 22:47:21 +00:00
paulberry@google.com
f01af1652d
Support more checked mode compile time errors in analysis engine.
...
This changes the following errors to be checked mode compile time errors:
- LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
- MAP_VALUE_TYPE_NOT_ASSIGNABLE
- MAP_KEY_TYPE_NOT_ASSIGNABLE
It also ensures that static warnings are always generated, so if the
analysis engine's client decides to disregard checked mode compile
time errors, the warnings won't be lost.
BUG=dartbug.com/16391
R=brianwilkerson@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//613673006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40790 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 21:42:09 +00:00
paulberry@google.com
7efd38d195
Start implementing checked mode compile time errors in analyzer.
...
This enables the Java-based command-line analyzer to accept the
"--enable_type_checks" flag so that it can be told whether to report
type checking errors during constant evaluation. Also it fixes the
tests language/compile_time_constant_checked2_test and
language/compile_time_constant_checked3_test in unchecked mode, by
causing CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE to be escalated to an
error only in checked mode.
Note: in order to test this properly, I had to remove a hack from
test_runner.dart which caused it to effectively ignore the "checked
mode compile-time error" test annotation when testing analyzer. With
this hack removed, several new lines needed to be added to the .status
files.
BUG=dartbug.com/16391
R=jwren@google.com , kustermann@google.com
Review URL: https://codereview.chromium.org//610863004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40780 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 18:59:14 +00:00
sigurdm@google.com
591638a353
Always initialize top-level Isolate for deferred libraries.
...
R=floitsch@google.com
Review URL: https://codereview.chromium.org//595183003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40763 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 11:52:19 +00:00
karlklose@google.com
d4fa8f783a
Give up tracing of a function if one of its closurizations escapes tracing.
...
R=herhut@google.com
BUG= http://dartbug.com/21016
Review URL: https://codereview.chromium.org//598493003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40591 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 13:16:57 +00:00
brianwilkerson@google.com
03f5aa143d
Fix status file
...
R=vsm@google.com
Review URL: https://codereview.chromium.org//589153004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40572 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 21:53:49 +00:00
brianwilkerson@google.com
a7a91aff59
Backout constant support
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//589043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40561 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 19:48:38 +00:00
whesse@google.com
90c7a56bdd
Update status for Dartium tests.
...
BUG=dartbug.com/21012, dartbug.com/21000
R=ricow@google.com
Review URL: https://codereview.chromium.org//584803003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40491 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 10:22:04 +00:00
brianwilkerson@google.com
9a4ef11f00
Implement new constant expressions
...
R=paulberry@google.com
Review URL: https://codereview.chromium.org//581773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40462 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 20:50:33 +00:00
asiva@google.com
3f6e337e87
Fix issue 20983 ( https://code.google.com/p/dart/issues/detail?id=20983 )
...
The check for load error on completion of async load was very inefficient.
Added a Hash set to ensure we don't repeatedly traverse through a library
when trying to establish transitive load errors.
R=iposva@google.com
Review URL: https://codereview.chromium.org//573293004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40422 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 02:01:26 +00:00
sigurdm@google.com
fbc57bc23d
Make dart2js deferred loading work in CSP mode.
...
Still it will not work from a js-worker, because we use new Function to
evaluate the script instead of injecting a script tag.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//569583002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40371 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 12:22:41 +00:00
johnniwinther@google.com
02bc6381e4
Revert "Handle implicitly hidden exports."
...
This reverts commit r40310.
BUG=
Review URL: https://codereview.chromium.org//572153003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40313 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 12:17:28 +00:00
johnniwinther@google.com
b2e1412851
Handle implicitly hidden exports.
...
BUG=http://dartbug.com/20935
R=karlklose@google.com
Review URL: https://codereview.chromium.org//564403002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40310 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 11:13:56 +00:00
ricow@google.com
df319447f1
Remove suppressions for ie9
...
R=blois@google.com , whesse@google.com
Review URL: https://codereview.chromium.org//562883002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40201 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 06:01:14 +00:00