Commit Graph

730 Commits

Author SHA1 Message Date
regis@google.com f955de9bc0 Throw a type error in production mode when the type of the type test is not
declared (issue 2571).
Add test.
Delete bad negative test now covered by new test.
Update status files of different compilers.
Review URL: https://chromiumcodereview.appspot.com//10035058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6754 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 17:01:28 +00:00
asiva@google.com a61ffc6210 Fix a pretty blatant GC bug (was the cause of all the weird crashes on windows).
Review URL: https://chromiumcodereview.appspot.com//10025033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6726 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 05:30:30 +00:00
srdjan@google.com 344aba1e75 Assign ids to incoming arguments (to be used in checked mode).
Review URL: https://chromiumcodereview.appspot.com//10115053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6718 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 00:04:47 +00:00
regis@google.com 75de3a8cc2 Move type check elimination from backend to graph builder in new compiler.
Review URL: https://chromiumcodereview.appspot.com//10021070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6713 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 21:58:46 +00:00
asiva@google.com d807f2a7dd Initialize tags back to 0 before using it.
Review URL: https://chromiumcodereview.appspot.com//10021046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6711 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 21:50:15 +00:00
turnidge@google.com a70b90933a Add a missing arity check for top-level methods in Dart_Invoke.
Add a new EXPECT_ERROR macro to make it easier to verify meaningful
error messages in tests.
Review URL: https://chromiumcodereview.appspot.com//10115034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6705 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 18:11:55 +00:00
hausner@google.com e74cd5fc3a Static members are not visible in subclasses
Fix for issue 1598.

Lexical scope comes before inherited names. Also, Static members
are not inherited and are not visible in subclasses.
Code in the subclass (or any other code for that matter) has to
qualify the names of these members with the class name.

We had a few tests that were wrong and only passed in the VM because
this was not implemented correctly.

Also had to fix code in frog and dartdoc.

I hope I ran enough tests. I built an all.deps tree using tools/build.py from the root directory, which brought up the frog and dartdoc issues.

Tested:
tools/test.py --compiler=dart2js --runtime=drt
tools/test.py -c none -r drt
tools/test.py -c frog -r drt
tools/test.py -r vm

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6698 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 16:09:22 +00:00
srdjan@google.com 953daeaf89 Add more timing information.
Review URL: https://chromiumcodereview.appspot.com//10116012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6697 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 15:53:20 +00:00
iposva@google.com 74201ff9fd Fix issue 2621:
- Properly restore long_jump_base when returning early.
Review URL: https://chromiumcodereview.appspot.com//10083046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6693 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 15:08:59 +00:00
asiva@google.com 17c7958b33 Some minor cleanup.
Review URL: https://chromiumcodereview.appspot.com//10114012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6668 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 00:20:30 +00:00
asiva@google.com 38999bf488 Address review comments.
Review URL: https://chromiumcodereview.appspot.com//10052030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6667 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 23:55:42 +00:00
srdjan@google.com 951c878e49 Fix potential problem with mismatch between ICData inloine cache miss handler in optimizing compiler.
Review URL: https://chromiumcodereview.appspot.com//10114010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6664 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 23:10:05 +00:00
srdjan@google.com 64226e65ac Share intrinsification framework across architectures, started on instrinsification in the new compiler x64.
Review URL: https://chromiumcodereview.appspot.com//10035006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6661 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 22:44:41 +00:00
cshapiro@google.com ff7d78833a Fix an invalid character escape sequence.
Review URL: https://chromiumcodereview.appspot.com//10108025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6659 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 20:53:24 +00:00
regis@google.com 3f6efe251b Relax assert so that the ia32 disassembler does not choke on C-heap allocated
constant strings.
Review URL: https://chromiumcodereview.appspot.com//10114002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6654 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 19:56:29 +00:00
hausner@google.com 69d33b8d8d Fix bug 1991, variable resolution in string interpolation
Check to make sure string interpolation expressions cannot
contain type parameter names.
Review URL: https://chromiumcodereview.appspot.com//10108020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6645 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:10:35 +00:00
ahe@google.com 56f34d7514 Move cygwin_dir to shared gypi file.
Review URL: https://chromiumcodereview.appspot.com//9877003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6626 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 11:53:56 +00:00
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
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
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
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
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
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
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
hausner@google.com 84d10e0561 Basic support for reading and writing JSON objects.
This is a minimal implementation that we can grow as needed
for debugger protocols and isolate communication.
Review URL: https://chromiumcodereview.appspot.com//9949054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6362 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 15:28:07 +00:00
cshapiro@google.com 54837ce8eb Process weak reference sets when a scavenge invokes the API callbacks.
BUG=2391

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6348 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-10 02:57:43 +00:00
asiva@google.com 8f208ad7ca Wire GrowableArray to use the internal VM object.
This also fixes issue (5526318 : Make access to GrowableArray objects through the dart api more efficient)
Review URL: https://chromiumcodereview.appspot.com//10012042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6341 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 21:50:53 +00:00