Commit Graph

2501 Commits

Author SHA1 Message Date
Daniel Andersson 0bbf08a164 Print child process' stderr when it fails in full_coverage_test.
In general, doing this for tests that fork helps with debugging build bot failures.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1233243006 .
2015-07-17 10:33:30 -07:00
Natalie Weizenbaum bdd5803006 Fix a WebSocket crash.
Previously, a WebSocket would crash if it was closed after its
StreamSubscription was canceled. Now, it tracks whether the subscription
was canceled by canceling and nulling out its own internal subscription.

Fixes #23845

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//1234163002 .
2015-07-15 13:30:06 -07:00
William Hesse 92fa3d7e51 Update status of flaky windows vm tests
BUG=https://github.com/dart-lang/sdk/issues/23848
R=koda@google.com

Review URL: https://codereview.chromium.org//1230113008 .
2015-07-15 17:34:37 +02:00
Ryan Macnak c165fee611 Insert debug step check at the beginning of a function.
BUG=http://dartbug.com/23827
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//1237203002 .
2015-07-14 15:27:44 -07:00
Karl Klose 04dacd24f4 Remove functions white-listed for use of try-finally and switch, add JS_SET_CURRENT_ISOLATE.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1237573002 .
2015-07-14 10:26:38 +02:00
Soren Gjesse 4205b2997e Change stdout/stderr to binary mode on Windows
Every other file opened in Windows is in binary mode, and there is no
way of opening a file in text mode.

This is a breaking change if one is relying on the CR insertion
when writing to stdout/stderr on Windows.

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

Review URL: https://codereview.chromium.org//1228053002.
2015-07-10 13:57:15 +02:00
Karl Klose 3fe9309c96 dart2js cps: Implement compilation of redirecting factory constructors for reflection.
Without reflection, redirecting factory constructor invocations are shortcut at the instantiation site.  With reflection, code like
  reflectClass(Foo).newInstance(const Symbol(''), [])
can hit a redirecting factory constructor and we need to emit a function that does the redirection and type substitution.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1227873004 .
2015-07-09 14:54:23 +02:00
Karl Klose 71e2bec0a5 dart2js cps: Support JS_CURRENT_ISOLATE.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1222913003 .
2015-07-07 15:55:13 +02:00
Asger Feldthaus 61f47e7384 dart2js cps: Ensure JSArray is emitted when we see a type cast.
This is a workaround to resolve an issue that is affecting a lot
of tests.

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1214123003.
2015-07-03 14:32:01 +02:00
Asger Feldthaus 34302b1320 dart2js cps: Translate synthesized mixin constructors.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1216593002.
2015-06-29 15:28:40 +02:00
Asger Feldthaus ec55d46148 dart2js cps: Fix translation of local constants.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1211393003.
2015-06-29 14:32:49 +02:00
Asger Feldthaus fceb7f00dc dart2js cps: Handle checks against mutable and extendable lists.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1206873003.
2015-06-25 15:03:00 +02:00
Søren Gjesse 0e37448313 Fix test that failed on Russian Windows bit
R=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//1204193002.
2015-06-25 10:14:58 +02:00
Soren Gjesse 0415d9271d Improve the encoding/decoding to/from system encoding on Windows
On Windows the dart:io SYSTEM_ENCODING is now also working with strings
which have null characters in them. Previously the string would be
terminated at the null character.

BUG=https://github.com/dart-lang/sdk/issues/23295
R=kustermann@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1194883002.
2015-06-24 10:36:05 +02:00
Kevin Millikin 089ed2965b Implement try/finally by inlining the finally code.
Try/finally is implemented by inlining.  There is a try/catch to catch
exceptions in the try block.  The catch body contains the finally code
followed by a rethrow.  The code for finally is translated again after the
normal exit of the try block.  Break, continue, and return exits in the try
block have the finally code inlined just before the exit is taken.

Try/catch/finally is not yet supported, it requires some changes to the
assigned variables analysis.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1201983002.
2015-06-24 10:12:42 +02:00
Soren Gjesse 269904167d Fix broken test
The sync part of the test was calling async close.

R=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//1202893004.
2015-06-24 09:25:17 +02:00
Srdjan Mitrovic f3c0a280d2 Fix bot failure: use platform specific separator
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1199283002.
2015-06-23 13:30:11 -07:00
Søren Gjesse 318c716b41 Fix deletion of directory in test
TBR=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1192363009.
2015-06-23 13:34:01 +02:00
Søren Gjesse 22d9f804b4 Use temp dir in the test standalone/io/file_write_only_test
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1196253009.
2015-06-23 12:56:07 +02:00
Kevin Millikin bf595224d5 Implement simple switch statements as nested if/else.
Simple switch statements that do not have continue to labeled cases
are compiled into a chain if/else comparisons.

R=asgerf@google.com

Review URL: https://codereview.chromium.org//1191193005.
2015-06-22 11:29:31 +02:00
Karl Klose 3f46181244 cps-ir: Support foreign code.
R=kmillikin@google.com

Committed: https://github.com/dart-lang/sdk/commit/a120ee7c9071b60edccff066dcdade078f601377

Reverted: https://github.com/dart-lang/sdk/commit/40ed0daaaf71904d2da271e66ba8381ef857116d

Review URL: https://codereview.chromium.org//1185633003.
2015-06-19 13:44:58 +02:00
Søren Gjesse 745673868c Fix checked mode errors in previous commit
TBR=ager@google.com
BUG=

Review URL: https://codereview.chromium.org//1187053005.
2015-06-18 16:21:00 +02:00
Søren Gjesse eaeecf2ed1 Add file modes for opening a file write only
Added two new file modes WRITE_ONLY and WRITE_ONLY_APPEND. The current
file modes WRITE and WRITE_APPEND are kept as the read/write mode with
no change. Kept the same overall handling of create/truncate/append
semantics for the new file modes.

R=ager@google.com, ahe@google.com
BUG=

Review URL: https://codereview.chromium.org//1193653002.
2015-06-18 15:19:26 +02:00
Karl Klose 40ed0daaaf Revert "cps-ir: Support foreign code."
This reverts commit a120ee7c90.

TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1196443002.
2015-06-18 13:37:52 +02:00
Karl Klose a120ee7c90 cps-ir: Support foreign code.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1185633003.
2015-06-18 13:09:50 +02:00
Asger Feldthaus fb38d61dba dart2js cps: Support function types in 'is' and 'as' operators.
The generated code uses different helpers than the SSA. In SSA, there are calls to buildFunctionType and _isTest. The CPS uses checkSubtypeOfRuntimeType, the "one size fits all" method we also use to test against type variable types.

When the function type has no type variables in it we could hoist the function type into a constant, but the constant system does not support type representation constants at the moment. But it seems like an optimization we may want to add later.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1180973003.
2015-06-18 11:30:57 +02:00
Søren Gjesse 3c85970637 Update status file
R=ajohnsen@google.com, whesse@google.com
BUG=https://github.com/dart-lang/sdk/issues/23641

Review URL: https://codereview.chromium.org//1186883002.
2015-06-15 17:46:57 +02:00
Anders Johnsen 9a01a22e96 Revert "Clean up process spawning."
This reverts commits
- bbdc57ebf6
- bd25e641f2
- 5cc8fca131
- ed72caa3cd

BUG=

Review URL: https://codereview.chromium.org//1182423003.
2015-06-15 15:26:56 +02:00
Karl Klose bb45376735 Update dart2js-cps_ir status files.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1191433002.
2015-06-15 12:50:58 +02:00
Soren Gjesse f9e8852edb Fix test on Windows
Forgot to change Platform.executable to Platform.resolvedExecutable in
one place.

TBR=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//1181583004.
2015-06-15 11:45:34 +02:00
Søren Gjesse c05c8c6606 Revert change to Platform.excutable and add Platform.resolvedExecutable
The change to Platform.excutable in
e03ab17437 was a breaking change and it
has been reverted.

A new getter Platform.resolvedExecutable has been added to provide the
the fully qualified path of the executable.

BUG=https://github.com/dart-lang/sdk/issues/16994
R=lrn@google.com, kustermann@google.com, len@google.com

Review URL: https://codereview.chromium.org//1180623006.
2015-06-15 10:13:21 +02:00
Soren Gjesse 82535a6e91 Resolve the executable path on Mac OS when sym-linked
Don't try to test sym-linked files on Windows as Junctions only support
directories.

This helps to locate the Dart SDK (if any) from the path of the dart
executable. On Linux the use of /proc/self/exe already takes care of this.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org//1178643007.
2015-06-12 09:26:47 +02:00
Karl Klose e4b56654ff Update dart2js-cps_ir test expectations with better annotations.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1181613003.
2015-06-11 10:56:56 +02:00
Anders Johnsen ed72caa3cd Revert and fix more of the mac change.
BUG=

Review URL: https://codereview.chromium.org//1175603003.
2015-06-10 12:31:31 +02:00
Anders Johnsen 5cc8fca131 Fix platform executable test.
BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org//1175923002.
2015-06-10 11:38:33 +02:00
Anders Johnsen bbdc57ebf6 Clean up process spawning.
Pass environment as argument to execvpe and use _exit instead of exit
(so fork/vfork can be used interchangeable).

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1156313004.
2015-06-10 10:42:54 +02:00
Harry Terkelsen 63681d5b59 Support Package Resolution Configuration files.
BUG=http://dartbug.com/23371
R=johnniwinther@google.com

Committed: https://github.com/dart-lang/sdk/commit/36c29d05bcc1dfe43a2f95698df5b41857f93221

Review URL: https://codereview.chromium.org//1162363004.
2015-06-09 11:07:11 -07:00
Søren Gjesse d5a34bd6d2 Resolve the executable path on Mac OS when sym-linked
Also resolve its directory if symlinked.

This helps to locate the Dart SDK (if any) from the path of the dart
executable. On Linux the use of /proc/self/exe already takes care of this.

R=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org//1160793004
2015-06-09 16:13:00 +02:00
Asger Feldthaus d01d394af7 dart2js cps: Type casts and related changes to type propagation.
We now optimize type casts that always fail or always pass.
Type propagation has been refactored a bit to make this work.

A new IR node Unreachable has been added. This is an node that is known
to be unreachable and is ultimately compiled to an empty statement.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1153603006
2015-06-08 17:02:47 +02:00
Karl Klose add53e33e7 Optimize identical based on types.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1080003004
2015-06-02 13:01:42 +02:00
Asger Feldthaus bd4e1d726f dart2js cps: Track underlying value of interceptors in type propagation.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1154173002
2015-06-01 11:19:36 +02:00
Søren Gjesse e382e87e65 Close files used in some tests
On windows forgetting to close files causes the deletion of the
temporary test directory to fail.

R=whesse@google.com
BUG=http://dartbug.com/23521

Review URL: https://codereview.chromium.org//1146283006
2015-05-27 15:31:30 +02:00
Asger Feldthaus f1bbc3bb2d dart2js cps: 'is' checks on types with type arguments.
R=karlklose@google.com

Committed: https://github.com/dart-lang/sdk/commit/00c33fb1347fc5c44a324f9503c7c57969e88ca3

Reverted: https://github.com/dart-lang/sdk/commit/f0c4e31174996e6259fab283af14c49aa8faf28c

Review URL: https://codereview.chromium.org//1161683002
2015-05-27 14:14:07 +02:00
Asger Feldthaus f0c4e31174 Revert "dart2js cps: 'is' checks on types with type arguments."
This reverts commit 00c33fb134.

TBR=karlklose@google.com

BUG=

Review URL: https://codereview.chromium.org//1161793002
2015-05-27 13:54:07 +02:00
Asger Feldthaus 00c33fb134 dart2js cps: 'is' checks on types with type arguments.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1161683002
2015-05-27 13:45:39 +02:00
Søren Gjesse f05608c49d Fix errors in previous commit
Commit was https://github.com/dart-lang/sdk/commit/897d05b6f0a80c7ba6933a059018184b724f5316.

TBR=lrn@google.com
BUG=http://dartbug.com/23521

Review URL: https://codereview.chromium.org//1145403004
2015-05-27 11:18:03 +02:00
Søren Gjesse 897d05b6f0 Fix argument processing for RandomAccessFile.writeFrom
It is now the same as for RandomAccessFile.writeFromSync

Added some tests.

R=lrn@google.com
BUG=http://dartbug.com/23521

Review URL: https://codereview.chromium.org//1156993003
2015-05-27 10:01:24 +02:00
Søren Gjesse 99e9842ccc Fix test 'platform_executable_test'
If the PATH environmant variable is not passed when overriding the
exnironment for a spawned process on Linux a default is used.

From the man page for 'execvp':

The file is sought in the colon-separated list of directory
pathnames specified in the PATH environment variable.  If this
variable isn't defined, the path list defaults to the current
directory followed by the list of directories returned by
confstr(_CS_PATH).  (This confstr(3) call typically returns the
value "/bin:/usr/bin".)

If one have Dart installed in e.g. /usr/bin the test would fail, as
starting 'dart' would succeed.

R=kevmoo@google.com
BUG=

Review URL: https://codereview.chromium.org//1158743003
2015-05-27 09:55:12 +02:00
Karl Klose 7962c37755 Update dart2js_cps-ir test expectations.
- Add suppressions for crashing dart2js_extra tests after addition of null-aware operators (a8db3278e2).
- Change suppressions in the cps-ir section to tool-friendly format.
- Add suppressions for new io/platform_executable tests (52f9548d58).

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1159553004
2015-05-26 10:38:23 +02:00
Kevin Moore d16e342f7a fix build bot break - Windows 2015-05-25 13:16:25 -07:00