Commit Graph

15405 Commits

Author SHA1 Message Date
regis@google.com 9c9652be6f Implement condition type checks in new compiler, thereby removing last bailouts.
Remove svn:eol-style property on various files.
Review URL: https://chromiumcodereview.appspot.com//9969192

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6613 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 00:17:33 +00:00
hausner@google.com 02661e6905 Accept keyword abstract in front of a class declaration
We can just ignore it. The VM has nothing to do for abstract
classes.
Review URL: https://chromiumcodereview.appspot.com//10103014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6612 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 23:46:55 +00:00
hausner@google.com 475fbca314 Implement implicit interfaces
Amazingly, this small change is all it seems to take to implement
implicit interfaces.
Review URL: https://chromiumcodereview.appspot.com//10103009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6607 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 22:21:54 +00:00
srdjan@google.com e68746422f Fix issue 2125: do not reparse a function being deoptimized.
Review URL: https://chromiumcodereview.appspot.com//10103005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6604 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 21:37:45 +00:00
turnidge@google.com e5022d70d4 Add fast paths for Smi values in the dart embedding api.
This speeds up the UseDartApi microbenchmark by 30%.  Thanks to Carl
for suggesting this.
Review URL: https://chromiumcodereview.appspot.com//10052027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6602 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 20:30:37 +00:00
iposva@google.com 926d554112 - Free completely empty pages as part of sweep.
Review URL: https://chromiumcodereview.appspot.com//10093010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6578 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 14:25:00 +00:00
sgjesse@google.com c9a325f704 Start refactoring of the HTTP header handling
This change moves the headers into a separate object.

There will be follow-up changes for handling whether the headers are
read-only or mutable. Also additional tests will be added later.

R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10082003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6567 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 12:18:45 +00:00
ager@google.com f366f9d913 Make it an error to call close twice on a file using the async API.
This is to make it consistent with the sync API.

Additionally, fix situations where a non-exception was passed to
error handlers on File objects.

R=sgjesse@google.com
BUG=dartbug.com/2451
TEST=standalone/io/File*

Review URL: https://chromiumcodereview.appspot.com//10095009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6564 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 11:32:03 +00:00
asiva@google.com f9655463c7 Remove code index table.
Review URL: https://chromiumcodereview.appspot.com//10082017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6557 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-14 02:03:58 +00:00
srdjan@google.com 04100d8ced Introduce an equality compare node. Equality will need to be handled specially soon (not just an instance call) and today it needs special code for efficeintly handling null receivers (null-class is never entered into IC data). This fixes a significant performance regression between the old and the new compiler.
Review URL: https://chromiumcodereview.appspot.com//10079018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6544 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:35:57 +00:00
regis@google.com cb6c1b27f3 Implement checked mode in new compiler.
The only remaining bailout is the boolean type check for conditions.
Review URL: https://chromiumcodereview.appspot.com//10080015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6542 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:16:59 +00:00
hausner@google.com b8d3cc0929 Fix bug 918
Don't choke to top-level native function declarations.
Review URL: https://chromiumcodereview.appspot.com//10086015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6541 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 22:02:31 +00:00
srdjan@google.com 242b4facdd Measure code generation time as well.
Review URL: https://chromiumcodereview.appspot.com//10084014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6534 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 17:39:07 +00:00
srdjan@google.com 36b456b3b4 Simplify code in code code generator, move checks to flow graph builder. We can assume that any type analysis will occur before the code generator gets called.
Review URL: https://chromiumcodereview.appspot.com//10069042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6532 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 16:49:22 +00:00
sgjesse@google.com e7f5afdbb8 Add HTTP/1.0 support and simplify persistent connections handling
The HTTP parser now recognized both HTTP/1.1 and HTTP/1.0 in
request and response headers. The only difference between the
handling of HTTP 1.1 and HTTP 1.0 is in the decection of
persistent connections. For HTTP 1.1 persistent connections are
the default and for HTTP 1.0 persistent connections are speficified
throught the "Connection: Keep-Alive" header.

Removed the getters and setters for keepAlive from all the
interfaces. They are not of much use and persistent connection
handling should be transparent. The HTTP client currently always
sends requests using HTTP 1.1 and in the reare cases where one wants the
connection to be closed after the request adding the
header "Connection: close" should work.

With this change using wget to get resources from the chat server.

R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10008083

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6509 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 10:58:58 +00:00
ager@google.com 4e1f754730 Fix Process test, fix Process factory, diable tests on dart2js.
Florian and I will investigate the dart2js failures.

R=sgjesse@google.com,floitsch@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10069053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6502 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 09:21:54 +00:00
ager@google.com 84b0410d5a This is a request for comments.
First attempt at implementing a higher-level API for processes.
Add a startNonInteractive constructor that takes a callback which
is called with the exit code and the complete stdout and stderr
when the process terminates.

Let me know what you think. This obviously needs at least tests.
Not entirely sure what I think about the interface in the first
place.

R=sgjesse@google.com
BUG=1689
TEST=

Review URL: https://chromiumcodereview.appspot.com//9863015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6499 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 08:53:35 +00:00
asiva@google.com 8f19524eb6 Report FATAL OOM error when the old heap space is exhausted.
Review URL: https://chromiumcodereview.appspot.com//10010049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6493 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 01:07:38 +00:00
srdjan@google.com f122c9e1b7 Add node id for return node.
Review URL: https://chromiumcodereview.appspot.com//10038032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6484 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 21:57:57 +00:00
srdjan@google.com a0a700026f Eliminated last bailout (except for type checked mode) in the new compiler: generate type arguments for instanceof if needed.
Review URL: https://chromiumcodereview.appspot.com//10071016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6467 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 17:20:43 +00:00
sgjesse@google.com 49859f8d08 Add basic handling to connection upgrade to the HTTP parser
See description in runtime/bin/http_parser.dart on how the upgrade works.

R=ajohnsen@google.com

BUG=dart:2002
TEST=tests/standalone/src/io/HttpParserTest.dart

Review URL: https://chromiumcodereview.appspot.com//10068013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6464 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 14:31:47 +00:00
ager@google.com aba2e48950 Support length operation without opening file.
Use fstat instead of multiple seek calls to get length of
opened files.

R=sgjesse@google.com
BUG=dartbug.com/1592
TEST=standalone/io/File*Test

Review URL: https://chromiumcodereview.appspot.com//10065013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6459 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 11:47:32 +00:00
ajohnsen@google.com f5bccdbb14 Close socket, and not non-existing outputStream. Fixes crash in HttpServer.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10008075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6455 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 09:30:49 +00:00
ajohnsen@google.com abd5d671f5 Mark as closing, when we close the connection manually.
Succeeding calls to write* would have failed without this.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10008072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6454 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 06:41:58 +00:00
ager@google.com 1f974c3c09 Fix flaky message queue test.
The test assumes that MessageQueue::Dequeue(0) cannot return NULL.
However, MessageQueue::Dequeue(0) returns NULL in case of spurious
wakeup.

R=turnidge@google.com,sgjesse@google.com
BUG=dartbug.com/2004
TEST=

Review URL: https://chromiumcodereview.appspot.com//10052011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6453 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 05:50:59 +00:00
cshapiro@google.com bcd940867d Persist the scanning state across invocations of ProcessToSpace.
This provides an signal that scanning is required to complete a
scavenge.  When reinvoking the scanner, scanning now resumes from the
lowest unscanned address instead of from the lowest to-space address,
thereby avoiding repeated work.

BUG=2524

Review URL: https://chromiumcodereview.appspot.com//10065005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6449 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 04:12:31 +00:00
regis@google.com 85e4a9c054 Do not require type class to be finalized when performing a type test.
However, make sure that the interfaces are resolved (issue 2523).
A later change will cleanup interface resolution code.
Review URL: https://chromiumcodereview.appspot.com//10050034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6446 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 00:18:43 +00:00
srdjan@google.com d8ffeb2f8a Fix performance issue with instanceof String checks on ia32. x64 in new compiler is coming in a following CL: use inlined type-test cache to compare against String interface and simplify test against bool. This CL addresses the issue 2530.
Review URL: https://chromiumcodereview.appspot.com//10056004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6445 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 00:14:49 +00:00
srdjan@google.com dee5447c56 Fix a crash when optimizing instance field increment: if the increment operation gets interrupted because of an exception during increment the collected classes at getter and setter phases may differ (e.g., one class at getter, zero classes at setter).
Review URL: https://chromiumcodereview.appspot.com//10020058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6443 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 22:28:03 +00:00
asiva@google.com fe77f95469 Fix for Issue 2367
The '\r' character was included in the string literal when parsing integer or double literals. This was resulting in incorrect integer values being created.
Review URL: https://chromiumcodereview.appspot.com//10054027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6442 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 22:07:47 +00:00
regis@google.com fce1a7e45e Fix lazy initialization of static fields (issue 2472).
Review URL: https://chromiumcodereview.appspot.com//10050022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6438 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 21:24:17 +00:00
rnystrom@google.com c47bd07592 Fix merge bug.
Review URL: https://chromiumcodereview.appspot.com//10020049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6435 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 20:27:57 +00:00
rnystrom@google.com eea5e1a621 Fix "package:" stuff on Windows and skip tests on dart2js since it doesn't support it yet.
Review URL: https://chromiumcodereview.appspot.com//10052021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6431 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 20:14:08 +00:00
srdjan@google.com 037cfcf849 Add optional arguments to NullPointerException so that it can report more information (make it similar to what is reported by NoSuchMethodException):
NullPointerException : method: 'foo'
Receiver: null
Arguments: [1, 2]
Review URL: https://chromiumcodereview.appspot.com//10034026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6429 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 19:58:45 +00:00
rnystrom@google.com 93e45629c9 Add support for importing using "package:" to the standalone VM.
Review URL: https://chromiumcodereview.appspot.com//10034001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6428 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 19:40:51 +00:00
hausner@google.com 2fc3bb679d Introduce a flag to disable string operator +
If allow_string_plus is set to false, the compiler will report an error
when it finds a string literal followed by +. Invoking the + operator on a
string value throws a noSuchMethod exception.

This is temporary code that we'll eliminate once the + operator on
strings is completely removed.
Review URL: https://chromiumcodereview.appspot.com//9960084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6423 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 18:23:22 +00:00
regis@google.com d1d3235013 Modify 'movq reg, reg' encoding in 64-bit code.
Use 0x89 encoding (instead of 0x8B encoding), which is expected by gdb64
older than 7.3.1-gg5 when disassembling a function's prolog (movq rbp, rsp)
for proper unwinding of Dart frames (use --generate_gdb_symbols and -O0).
Review URL: https://chromiumcodereview.appspot.com//10052013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6422 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 18:13:09 +00:00
regis@google.com 113c4b6626 Add missing calls to class finalizer in various tests.
Make 'sentinel' and 'transition_sentinel' instances of class Null.
Review URL: https://chromiumcodereview.appspot.com//10034019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6421 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 18:12:28 +00:00
regis@google.com 3c063c8d4f Eliminate type checks that can successfully be performed at compile time.
Review URL: https://chromiumcodereview.appspot.com//10051011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6420 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 17:42:39 +00:00
srdjan@google.com 3bf28e7d3f Implement finally in new compiler.
Review URL: https://chromiumcodereview.appspot.com//9999045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6419 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 17:35:06 +00:00
ajohnsen@google.com d480a1eeef Add member localHostname() to the Dart IO Platform class.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10050011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6409 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 12:27:55 +00:00
iposva@google.com 85b2b6f32a - Use the free top of old-space pages when allocating.
Review URL: https://chromiumcodereview.appspot.com//10057001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6405 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 11:54:01 +00:00
ager@google.com c6a91ef4b6 Remove check whether async has been used from File objects.
It makes it hard to use libraries and doesn't really help.

R=sgjesse@google.com
BUG=dartbug.com/2426
TEST=

Review URL: https://chromiumcodereview.appspot.com//10054005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6400 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 09:27:53 +00:00
ajohnsen@google.com 0117638cf1 Socket.available should never return a negative value.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10052007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6399 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 08:43:34 +00:00
sgjesse@google.com 8efb4d4e8a Address additional comments from http://codereview.chromium.org/9956062/
R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10050007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6398 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 07:10:49 +00:00
sgjesse@google.com 52eb1e2139 Fix bug in HTTP header parsing
R=ajohnsen@google.com

BUG=dart:2370
TEST=tests/standalone/src/io/HttpParserTest.dart

Review URL: https://chromiumcodereview.appspot.com//10033023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6397 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 07:09:45 +00:00
asiva@google.com 2393f17f1a Fix win32 Socket test errors
SocketInfoTest and SocketPortTest are failing on windows.
Review URL: https://chromiumcodereview.appspot.com//10014037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6390 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 23:29:02 +00:00
srdjan@google.com d154a7ffce Try/catch in new compiler. Added try index to appropriate instructions. If any instruction throws an exception, the try index tells us which catch entry the exception belongs to.
Review URL: https://chromiumcodereview.appspot.com//10014006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6389 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 23:22:40 +00:00
asiva@google.com a45c0b86be Fix OS::VSNPrint to make it behave similar to linux and macos versions.
Mathias found this bug will using it in the JSON parser.
Review URL: https://chromiumcodereview.appspot.com//10037018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6380 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 20:42:35 +00:00
ricow@google.com 4a4b4da476 Speculative fix for the windows compilation failure.
Review URL: https://chromiumcodereview.appspot.com//10032030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6363 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:47:59 +00:00