Commit Graph

15405 Commits

Author SHA1 Message Date
iposva@google.com e3a8f10c52 - D:\rive\letters
Review URL: https://chromiumcodereview.appspot.com//9608028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5140 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-08 00:02:17 +00:00
iposva@google.com a37d9578d2 - Fix build: unused vars.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5138 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 23:18:16 +00:00
iposva@google.com 67b02b441d - Proper URI resolution when loading scripts from the standalone binary.
Review URL: https://chromiumcodereview.appspot.com//9614006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5135 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 22:57:57 +00:00
turnidge@google.com 5a23b7814b Remove unused variable in my last CL.
Review URL: https://chromiumcodereview.appspot.com//9624020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5126 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 21:28:14 +00:00
turnidge@google.com d70bc0e65f Adds new apis Dart_GetField/Dart_SetField.
These are intended to replace Dart_{Get,Set}{Static,Instance}Field.

---

Mess with Library::PrivateName.

Add field/function lookup to Library.
Review URL: https://chromiumcodereview.appspot.com//9616044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5124 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 21:15:58 +00:00
srdjan@google.com 25b3c2feeb Implement '==', '!=' and instanceof (without code generation).
Review URL: https://chromiumcodereview.appspot.com//9615025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5123 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 21:12:29 +00:00
turnidge@google.com 7647d8ff7f Add the vm internal dart tests into the test suite.
Review URL: https://chromiumcodereview.appspot.com//9414032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5113 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:43:59 +00:00
cshapiro@google.com 0b6ca9919c Implement a garbage collection prologue and epilogue callback mechanism.
Review URL: https://chromiumcodereview.appspot.com//9605033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5112 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:38:51 +00:00
cshapiro@google.com 4aa45f32da Address two review comments from 9531001.
Review URL: https://chromiumcodereview.appspot.com//9546042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5111 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:29:32 +00:00
asiva@google.com e4d024664e Add a first class GrowableObjectArray type in the VM and use it internally in the VM at all spots were we use GrowableArray first and then copy the contents into an Array object.
Next step is to use this type in growable_array.dart
Review URL: https://chromiumcodereview.appspot.com//9594028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5109 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 19:14:02 +00:00
mattsh@google.com d8af601ce4 removed unused 'prefix' line from status files
Review URL: https://chromiumcodereview.appspot.com//9621003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5101 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 16:10:57 +00:00
ager@google.com 50fa742ebf Remove trailing ',' in enum.
Compiling code with g++ and all warnings turned on complaints about
this.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5099 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 16:03:01 +00:00
sgjesse@google.com 67d055d29c Fix hostname lookup on Windows
The previous implementation was broken and did not use the result retreived from
gethostbyname. Changed the implementation to use getaddrinfo as gethostbyname has
been deprecated in the Winsock2 library.

Added a test to test that something can be read from www.google.com.

R=ager@google.com

BUG=none
TEST=tests/standalone/src/io/HttpClientTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5097 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 15:18:50 +00:00
sgjesse@google.com f0f34bf277 Add the ability to get the current directory
Added constructor current to directory. Use like this:

var cwd = Directory.current()

R=ager@google.com

BUG=dart:1793
TEST=tests/standalone/src/io/DirectoryTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5087 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 13:23:08 +00:00
floitsch@google.com cacd793d1a Handle Bigint.toCString when remainder equals 0.
Review URL: https://chromiumcodereview.appspot.com//9620002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5081 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 12:51:45 +00:00
kmillikin@google.com 01695137f8 Turn CopyTemp and SetTemp into instructions.
These were always used and assumed to be in a stylized form (CopyTemp in
Bind and SetTemp in Do).  Make this required by the IL.  This change allows
eliminating the relative indexing in favor of temporary names, without
restructuring the compiler at all.

R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5072 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 10:24:01 +00:00
floitsch@google.com 2d94a8c288 Make pow call unambiguous.
Review URL: https://chromiumcodereview.appspot.com//9600078

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5069 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 09:39:22 +00:00
floitsch@google.com 5f5f63ff1c Implement BigintOperations::ToDecimalCString.
Review URL: https://chromiumcodereview.appspot.com//9536016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5068 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 08:25:32 +00:00
regis@google.com f4ddc43cdf Generate dynamic type errors according to spec.
Fix a few bad tests.
Turn a couple negative tests in multi-tests.
Triage a few co19 failing tests.

Still to do:
Check bounds of generic types at runtime in checked mode.
Stop reporting bounds error in new operator as a compile time error.
Review URL: https://chromiumcodereview.appspot.com//9615035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5064 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 02:23:12 +00:00
srdjan@google.com d6abdfb6b8 Eliminate IncrOpStaticFieldNode, replace a set of nodes.
Review URL: https://chromiumcodereview.appspot.com//9592031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5063 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 00:40:48 +00:00
iposva@google.com 5ac44be67f - Fix new/free mismatch.
Review URL: https://chromiumcodereview.appspot.com//9618034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5062 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-07 00:28:36 +00:00
rice@google.com 0b4c8203fc Allow std{in,out,err} to be a socket
Review URL: http://chromiumcodereview.appspot.com/9617012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5056 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 21:36:07 +00:00
srdjan@google.com 28aa93c232 Implement DoWhile.
Review URL: https://chromiumcodereview.appspot.com//9553008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5055 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 21:02:56 +00:00
antonm@google.com 5ece65c673 Force non-Unicode build in all configurations.
Review URL: https://chromiumcodereview.appspot.com//9618018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5044 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 19:00:08 +00:00
sgjesse@google.com ac12107c2f Add method available to StringInputStream
The StringInputStream did not have any way for checking the number of
available characters. Added method available like on a binary
InputStream.

R=ager@google.com

BUG=dart:1945
TEST=tests/standalone/src/io/StringStreamTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5021 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 12:42:30 +00:00
sgjesse@google.com 144e6d044c Add handling of HTTP header "Expires"
The value of the "Expires" header is now available as a property on
the HttpResponse and the HttpClientResponse.

Added formatting of dates as HTTP dates in RFC 1123 format and parsing
of HTTP dates in all three formats mentioned in RFC 2616.

R=ajohnsen@google.com

BUG=none
TEST=tests/standalone/src/io/HttpDateTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5016 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 11:24:11 +00:00
sgjesse@google.com 93eecd778e Add handling of the HTTP header "Host"
R=ajohnsen@google.com

BUG=none
TEST=tests/standalone/src/io/HttpTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5015 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 10:59:28 +00:00
kmillikin@google.com 0a9194319d Implement postfix indexed increment.
Chosen because of its wartiness.  A pair of new computations are introduced
to allow the IL to express duplication of temporaries and storing to
temporaries.  These will be translated away by the optimizing compiler, but
allow the instruction stream to represent exactly the deoptimization state
we are intereseted in (with at most one deopt point per instruction).

Translation of:

test(a, i) {
  return a[i]++;
}

is

 0: [target]
    t0 <-#0
    t1 <-LoadLocal(a)
    t2 <-LoadLocal(i)
    t3 <-CopyTemp(-1)
    t4 <-CopyTemp(-1)
    t3 <-InstanceCall([], t3, t4)
    SetTemp(-3)
    t4 <-#1
    t3 <-InstanceCall(+, t3, t4)
    InstanceCall([]=, t1, t2, t3)
    return t0

R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5012 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 09:49:21 +00:00
hausner@google.com 5f72e92b4e Re-introduce string concatenation
This change re-introduces concatenation of adjacent
string literals, i.e. the compiler concatenates "abc" "123"
into the literal "abc123" at compile time. If the literals
contain interpolations, the concatenation happens at
runtime.

The change also re-introduces interpolated compile-time
string literal constants, but the feature is disabled because
several tests need to be changed.
Review URL: https://chromiumcodereview.appspot.com//9582040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4991 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 23:47:34 +00:00
iposva@google.com d8c7e85a30 - Reintroduce a library privacy disabling option.
Review URL: https://chromiumcodereview.appspot.com//9594040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4987 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 22:54:02 +00:00
srdjan@google.com fcebdcf28a Add Load/Store Static/Instance fields.
Review URL: https://chromiumcodereview.appspot.com//9586024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4972 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 19:07:08 +00:00
antonm@google.com 7c443aefcf Force not-Unicode version of libdart_builtin.
Current implementation of file/process/etc. assumes it anyway.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4955 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 15:11:51 +00:00
ager@google.com b2b123d24b Update Timer API to take the callback as the last parameter.
This makes the code easier to read when the callback actually does
work:

  new Timer(1000, (t) {
    // do
    // lots
    // of
    // stuff
  });

Also, it is more consistent with the rest of the APIs.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4945 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 12:43:41 +00:00
kmillikin@google.com 6f1fc66fdd Remove an unneeded temp in instance setters and indexed stores.
R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4938 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 10:26:07 +00:00
sgjesse@google.com b29e72fdbd Make the HttpParser and HttpUtil classes private
Move to separate files for sourcing these in the tests.

R=ager@google.com

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4934 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 08:04:04 +00:00
sgjesse@google.com 086c1f0c3a Handle closing of HTTP client and server
For the server keep track of the state of the connection and close the
socket when it is closed by the client. The client might close the
connection both when processing a request and while the connection is
an idle keep alive connection.

For the client keep track of the active connections as well as the
idle keep alive connections. When the client is closed make sure to
close all connections.

R=ajohnsen@google.com

BUG=none
TEST=tests/standalone/src/io/HttpShutdownTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4932 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 07:06:37 +00:00
floitsch@google.com effc73b1e9 Unify Date.fromString and support more Iso 8601.
Review URL: https://chromiumcodereview.appspot.com//9568011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4923 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-04 14:12:10 +00:00
cshapiro@google.com 05fc273cfa Implement weak references sets and provide an embedding API.
Weak reference sets are similar to "populations" or "weak pairs".
Like these structures, objects in a key set preserve members of an
associated value set.  Unlike these structures, a weak reference set
is not a general associative container.  Weak reference sets exist
for the duration of a garbage collection.

Weak reference sets are proceesed iteratively allowing values of one
weak reference to be keys of a other weak reference sets.  The garbage
collector will process weak reference sets iteratively, revisiting all
unmarked weak reference sets if any one weak reference set is marked.
This process repeates until a fixed-point is reached.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4917 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 02:30:20 +00:00
asiva@google.com 4f7f9021c5 - Always write a Null Object for Code objects
- Do not populate the FunctionsCache array as it causes the function cache
  to become inconsistent if we execute some dart code before capturing a
  snapshot.
- Allow preallocation of objects even when generating snapshot and remove the
  flag preallocate_objects_called_ (use a null test instead).
Review URL: https://chromiumcodereview.appspot.com//9580036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4915 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 01:53:26 +00:00
hausner@google.com 4e88231326 Fix bug 1557
Better handling of malformed library tags.

TBR=iposva
Review URL: https://chromiumcodereview.appspot.com//9582036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4912 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 00:39:04 +00:00
hausner@google.com 661d0195fa Support breakpoints in closures
Properly set breakpoints in the code of closure functions.
Fix bug 1894.

Also renaming StackTrace to DebuggerStackTrace since we already have a class Stacktrace in the VM.
Review URL: https://chromiumcodereview.appspot.com//9572022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4910 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 23:43:34 +00:00
srdjan@google.com 923ed6eb53 It is the setter that can have a result, but not the StoreInstanceFieldNode.
Review URL: https://chromiumcodereview.appspot.com//9581016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4902 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 21:52:03 +00:00
hausner@google.com 0428eb229e Placate Windows compiler
Review URL: https://chromiumcodereview.appspot.com//9580014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4893 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 18:08:56 +00:00
hausner@google.com e58b6e4d4c Splitting debugger breakpoints into two parts
Splitting breakpoints into SourceBreakpoint that represent
a user-defined source location of a breakpoint, and
CodeBreakpoint, which represents a code location. There can
be more than one CodeBreakpoint per SourceBreakpoint, e.g.
for functions that are also called as closures (and are thus
compiled twice.)

Functions are no longer compiled as a side effect of setting
a breakpoint. When they eventually get compiled, the previously
recorded SourceBreakpoint is found and a CodeBreakpoint is set.
Review URL: https://chromiumcodereview.appspot.com//9581013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4891 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 18:01:38 +00:00
srdjan@google.com e2ab4d25fd Added stack overflow checks at backward branches in order to allow interrupting endless loops. Better code will detect if the loop calready contains calls and therefore can omit the extra check (in next compiler).
Review URL: https://chromiumcodereview.appspot.com//9562045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4889 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 17:53:28 +00:00
kmillikin@google.com 0930238061 Support instance getters and setters, indexed loads and stores.
These can be supported as instance calls.  In the case of instance
setters and indexed stores, there is a new computation type because of
the semantics of preserving the value.  For the example program:

void test(e) {
  print(e.forty_two);
  print(e.forty_two = 41);
}

we generate the graph:

 0: [target]
    t0 <-LoadLocal(e)
    t0 <-InstanceCall(get:forty_two, t0)
    StaticCall(print, t0)
    t0 <-#0
    t1 <-LoadLocal(e)
    t2 <-#41
    t0 <-InstanceSetter(t0, t1, t2)
    StaticCall(print, t0)
    return #null

and emit the correct code.

R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4861 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 09:47:49 +00:00
kmillikin@google.com 9058b2b8f3 Implement StaticCall and InstanceCall in the new code generator.
1. Introduce a value visitor for argument values.

2. Add enough information to StaticCallComp and InstanceCallComp IL
computations so that we can generate code.

3. Enable code generation for them.

R=srdjan@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4859 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 09:03:45 +00:00
sgjesse@google.com 096badbb62 Use a pool of native ports for file operations
See description on https://chromiumcodereview.appspot.com/9568010/

R=ager@google.com

BUG=none
TEST=tests/standalone/src/ManyFileOperationsTest.dart

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4854 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 07:29:20 +00:00
cshapiro@google.com 0d4375b68e Check array bounds using an overflow-safe comparison.
Review URL: https://chromiumcodereview.appspot.com//9569044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4850 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 01:27:27 +00:00
srdjan@google.com 2f05ee5d11 Some fixes to Math.pow.
Review URL: https://chromiumcodereview.appspot.com//9565035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4848 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 01:16:07 +00:00