Commit Graph

3219 Commits

Author SHA1 Message Date
ahe@google.com d3b04b2939 For reasons beyond logic, null matches any exception type.
Review URL: https://chromiumcodereview.appspot.com//9549002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5017 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 11:30:49 +00:00
lrn@google.com 8471f81acd Change labeled statement to use visitSubGraph for its body instead of marking its "exit block" specially.
Review URL: https://chromiumcodereview.appspot.com//9601009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5014 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 10:52:14 +00:00
ahe@google.com 29c84a5d61 Generate code for some switch statements.
Review URL: https://chromiumcodereview.appspot.com//9599026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5013 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-06 10:09:07 +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
ahe@google.com ad681432d1 Complete AST nodes for switch statement.
Review URL: https://chromiumcodereview.appspot.com//9599013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4973 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 19:10:30 +00:00
ahe@google.com 166e950db3 Revert "Refactor constant part."
This reverts revision 4958.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4965 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 17:54:04 +00:00
floitsch@google.com bab3cfdc26 Refactor constant part.
The Ssa backend now uses the CompileTimeConstantHandler's Constants.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4958 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 16:16:23 +00:00
floitsch@google.com 88e8bb43f7 parseInt fixes.
Review URL: https://chromiumcodereview.appspot.com//9595013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4937 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 09:53:20 +00:00
ngeoffray@google.com bd722a762c Fix one crash in the compiler.
Review URL: https://chromiumcodereview.appspot.com//9597011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4936 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-05 09:28:25 +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
ahe@google.com db4a87c8e7 Changes to make leg build bots green
Review URL: https://chromiumcodereview.appspot.com//9572041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4918 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-03 07:56:43 +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
zundel@google.com ab603367c0 Update test.dart for detection output of machine formatted errors
This change causes the 'dartc' tests to be more sensitive to the difference
between a static type error and a compilation error.   Instead of
relying on the return value from the test being 0 or non zero, the
code now turns on '--error_format machine' and checks type
error level 'ERROR' or 'WARNING' and the type of error for
'STATIC_TYPE' if there is a static type error.  A new annotation
format adapted from multitests is introduced for standard test cases:

  int foo = "hello";   /// static type error

The above annotation means that a static type error is expected.
Currently enforcement is very lenient.  There must be at least as
many STATIC_TYPE error messages as there are '/// static type error'
annotations (and no ERROR level messages.)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4895 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 18:50:09 +00:00
ahe@google.com 6ba4024e32 No IntegerDivisionByZeroException in Leg (as it only has doubles). Also fix a rounding issue.
Review URL: https://chromiumcodereview.appspot.com//9562006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4887 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 17:04:28 +00:00
ahe@google.com acddebb598 Those debug failures are not Windows only.
Review URL: https://chromiumcodereview.appspot.com//9572012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4879 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 15:09:02 +00:00
ahe@google.com 529b7ae098 Update co19 status file for Windows.
Review URL: https://chromiumcodereview.appspot.com//9580006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4878 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 14:55:05 +00:00
ahe@google.com 0523e97db0 Expect a '(' before calling parseArguments (which asserts this is the case).
Review URL: https://chromiumcodereview.appspot.com//9586007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4877 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 14:49:29 +00:00
ahe@google.com f4f96c8a09 Remove stale LangGuide refs and update status for checked mode.
Review URL: https://chromiumcodereview.appspot.com//9584010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4876 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 13:29:38 +00:00
ahe@google.com eb55e1d85b Bad syntax in status file.
Review URL: https://chromiumcodereview.appspot.com//9587001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4875 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 13:15:37 +00:00
ahe@google.com 18d49ba97a Update to co19 revision 147.
Review URL: https://chromiumcodereview.appspot.com//9582004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4868 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 11:15:06 +00:00
cshapiro@google.com 3e648e2ac7 Remove the pow_A07_t01 exception for Win32 builds. It no longer fails.
Review URL: https://chromiumcodereview.appspot.com//9570060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4853 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-02 02:14:46 +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
ahe@google.com f494288228 Add test inspired by Leg bug.
Review URL: https://chromiumcodereview.appspot.com//9570002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4799 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 15:16:52 +00:00
ngeoffray@google.com e42663a314 Tests timeout on the bots.
Review URL: https://chromiumcodereview.appspot.com//9569004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4781 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 08:41:30 +00:00
ahe@google.com b7f62dcb1a Work around buggy break in List.sort and optimize constant folding of negative values.
Review URL: https://chromiumcodereview.appspot.com//9536020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4779 260f80e4-7a28-3924-810f-c04153c831b5
2012-03-01 07:04:19 +00:00
zundel@google.com e2e9ca6c7c test.dart sometimes associates the wrong stderr with a task.
Problem is due to stdout status being processed before
all of stderr is read.

http://code.google.com/p/dart/issues/detail?id=1898

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4770 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 22:52:16 +00:00
ahe@google.com 38b5ade1ee Special case -0.0 when constant folding.
Review URL: https://chromiumcodereview.appspot.com//9536012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4760 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 19:12:21 +00:00
ahe@google.com b4da51c990 Create mock versions set and sort implementations.
Review URL: https://chromiumcodereview.appspot.com//9537009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4752 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 13:24:50 +00:00
ahe@google.com f5d46724d5 Generate code that throws an exception on unimplemented features.
Review URL: https://chromiumcodereview.appspot.com//9539009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4751 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 13:03:10 +00:00
floitsch@google.com 8d1b6ade1b Fix this capturing in closures.
Review URL: https://chromiumcodereview.appspot.com//9542001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4749 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 12:35:00 +00:00
regis@google.com 47724a8491 Add support for malformed types and postpone some related errors from compile
time to execution time.

Still to do (once spec is clarified):
- properly handle generic type bounds errors
- properly handle 'instance of' type checks involving malformed types
- fix bad tests
Review URL: https://chromiumcodereview.appspot.com//9515011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4732 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-29 02:14:18 +00:00
asiva@google.com 86ce6f8b75 Remove dependency on openssl in the dart VM.
Review URL: https://chromiumcodereview.appspot.com//9477017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4718 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 18:37:23 +00:00
ahe@google.com 55ff24ec82 Implement String.hashCode.
Review URL: https://chromiumcodereview.appspot.com//9490003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4714 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 18:06:03 +00:00
floitsch@google.com fd74243036 Add FunctionDeclaration node.
Review URL: https://chromiumcodereview.appspot.com//9502002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4707 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 17:36:20 +00:00
ahe@google.com 64867a3bcf Improve exception handling:
* Translate native JS exceptions to corresponding Dart objects.

* Implement rethrow.

Also handle abstract methods and final fields correctly.

Finally, don't cancel compilation when seeing a continue statement, instead generate code that throws an exception.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4701 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 16:46:15 +00:00
ahe@google.com 514f5da9b8 Return null from stringValue and call slowToString() instead of toString().
Review URL: https://chromiumcodereview.appspot.com//9447100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4699 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 16:18:53 +00:00
floitsch@google.com 3c2b298a75 Implement Double.{toString, toStringAsExponential, toStringAsPrecision}
Also switch to -0.0.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4681 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 13:19:50 +00:00
floitsch@google.com f87598ab31 Initialize fields with their default values.
Review URL: https://chromiumcodereview.appspot.com//9487004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4670 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 10:39:40 +00:00
sigmund@google.com ee6a907611 isolates refactor: this change introduces 'dart:isolate' as a library. This is a
big global change, so let me explain in more detail. This refactoring CL does
the following:
- moves all the dart code for isolates in a common library (lib/isolate)

- changes frog to understand 'dart:isolate' imoprts by loading the code from the
  location above.

- changes the vm to undernstand 'dart:isolate' imports by creating a separate
  library that is part of the bootstrap. This follows the same code-structure
  that Todd suggested in his CL introducing the mirror library

- changes dartc to use the shared isolate library as the source of truth for
  type checking. I left around some of the internal js code in dartc so that the
  backend continues to work for apps that don't use isolates.

- changes all tests that use isolates to import the library explicitly (this is a large bulk of the files in this CL)

- changes test status for tests we can't fix in this repo (e.g. co19)

- splits the isolate library code to make it possible to preserve some tests
  without exposing internal types (e.g. tests about
  serialization/deserialization)

- changes the create_sdk script to copy the isolate library to the sdk

- includes the isolate library in dartdoc

I'll wait for at least one lgtm from each area (dartc, vm, frog, sdk)

There is one important pending thing this CL doesn't do:
- update test_runner.dart: This should be updated next time we upload the new
  binaries to tool/testing/bin
- dartium specific changes: Vijay, is there anything I need to do for dartium?

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4647 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:50:44 +00:00
ahe@google.com d807846be3 Start supporting fixed length and immutable lists.
Review URL: https://chromiumcodereview.appspot.com//9453021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4608 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 12:42:31 +00:00
ahe@google.com 57f0a9464d Implement operator-is for interfaces' supertypes and String's supertypes. Also, improve stack traces.
Review URL: https://chromiumcodereview.appspot.com//9429047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4544 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 17:45:12 +00:00
floitsch@google.com b5f8367c7c Implement hackish version of const list literals.
Review URL: https://chromiumcodereview.appspot.com//9443017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4533 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 14:32:35 +00:00
kasperl@google.com da4d85e836 Update test expectations after issue 1804 was fixed.
R=lrn@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4514 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-23 08:54:19 +00:00
ahe@google.com fef1247082 Update status file for frog/leg on debug VM
Review URL: https://chromiumcodereview.appspot.com//9428043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4486 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 19:59:25 +00:00
ahe@google.com 3fbed82d9d Stopwatch.elapsed must always increase after start has been called.
Review URL: https://chromiumcodereview.appspot.com//9416065

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4479 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 18:03:52 +00:00
regis@google.com 25fcaf5044 Generic bound errors are static type errors not to be reported by the VM.
Review URL: https://chromiumcodereview.appspot.com//9428015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4476 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 17:48:05 +00:00
srdjan@google.com 7e24821862 Implement more missing pieces in VM's core library. Although it does not seem to make sense to have toStringAsFixed, toStringAsExponential and toStringAsPrecision in integers, the interface 'num' specifies them, most likely because of troubles in Javascript versions.
Note that Double_toStringAsExponential and Double_toStringAsPrecision are still unimplemented in C++. Instead of crashing, throw an exception. Also fix argument passing.
Review URL: https://chromiumcodereview.appspot.com//9416084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4463 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 15:31:08 +00:00
ahe@google.com ac33f3bfaa Update leg status files.
Review URL: https://chromiumcodereview.appspot.com//9416099

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4459 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 15:20:10 +00:00
ahe@google.com 6583d2ceae Update VM co19 status
Review URL: https://chromiumcodereview.appspot.com//9428032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4456 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 14:28:21 +00:00
floitsch@google.com 3b96c23926 Allow binary operators on compile-time-constants.
Review URL: https://chromiumcodereview.appspot.com//9427012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4455 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-22 14:25:27 +00:00