Commit Graph

79322 Commits

Author SHA1 Message Date
hausner@google.com b7cf1328a1 Very first steps for a debugger
- Introduce Debugger class.
- Each isolate has a debugger object.
- Introduce stubs that can be put in place of static or dynamic
  Dart function calls.
- Very rudimentary command line option to place a breakpoint
  at the beginning of a function.
Review URL: http://codereview.chromium.org//8687037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1928 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 17:04:45 +00:00
ager@google.com 3653ebdd17 Only report poll failures when it is something we cannot recover from.
R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8742013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1922 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 13:32:26 +00:00
whesse@google.com 2529c010d0 tools/test.dart: Add multitest support to Dart implementation of test runner.
BUG=
TEST=tools/test.dart

Review URL: http://codereview.chromium.org//8715006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1919 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 10:18:09 +00:00
jmesserly@google.com fab57b1ee4 Fix status to mark StringConcatTest as failing in unchecked mode
Review URL: http://codereview.chromium.org//8744008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1917 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 06:31:04 +00:00
jmesserly@google.com b6543c04f1 Fix a bunch of issues with 'hidden' DOM types.
Hidden DOM types are types whose prototype is not accessible until you have an instance--they cannot be used at init time.

Issues fixed for these types include:
* "is", type assertions, and getters/setters are now inserted on the prototype lazily
* now patches correct prototype when binding these
* handles incompatible hidden native overloads (rare in practice, but we have a test case for it)

Also some other type check fixes:
* Type checks handle false correctly
* Dart TypeError is now used (before--would pick up the JS one)
* TypeError has an actually usable error message
These last fixes cause some code bloat (lots of type check fallbacks on Object.prototype), but for right now I think it's more important to give good errors.

Review URL: http://codereview.chromium.org//8746005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1916 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 06:17:00 +00:00
efortuna@google.com 4abe74e1e4 Adding the performance and browser benchmarking script.
Review URL: http://codereview.chromium.org//8670013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1914 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 02:57:08 +00:00
sra@google.com 8ba5d3517a Frog: Fix parsing of hex literals with >31 bits
BUG=
TEST=

Review URL: http://codereview.chromium.org//8739002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1912 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 02:14:07 +00:00
srdjan@google.com e165afda1b Inline instance of test with List<Dynamic>.
Review URL: http://codereview.chromium.org//8686016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1911 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 01:58:25 +00:00
turnidge@google.com 4c744fce5b Fix checked mode test.
Review URL: http://codereview.chromium.org//8735006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1908 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 22:11:52 +00:00
turnidge@google.com d07287b06e Fix the linux build.
Review URL: http://codereview.chromium.org//8724008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1907 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 22:06:16 +00:00
turnidge@google.com cf23dbad75 Add a mid-sized integration test for the Dart Embedding Api which
demonstrates how to create a custom isolate abstraction.  In this
test, we use an event queue to share a single thread among our custom
isolates.

Add a callback which allows embedders to see when a port is created.
Not sure if I should keep this or not.

New apis:
  Dart_CreatePort() -- allocates a port id and adds a port->isolate mapping.
  Dart_IsolateHasActivePorts() -- does the current isolate have open ports?
  (this name a bit awkward...)

Bail out of PortMap::ClosePorts() early if there are no open ports.
This suppresses calls to the close_port_callback when there are no
open ports.

Use DART_CHECK_VALID to provide better error output when the test lib
has errors.

-------------------------
Sample output of the test:

-- (isolate=0x815600) Constructing isolate
-- Enter: CustomIsolateImpl_start --
-- Adding port (7111) -> isolate (0x830800) --
-- Adding StartEvent to queue --
-- Exit: CustomIsolateImpl_start --
-- Adding port (7112) -> isolate (0x815600) --
-- Posting message dest(7111) reply(0) --
-- Adding MessageEvent to queue --
-- Starting event loop --
>> StartEvent with isolate(0x830800)--
-- (isolate=0x830800) Running isolateMain
$$ MessageEvent with dest port 7111--
-- (isolate=0x830800) Received: 42
-- Posting message dest(7112) reply(0) --
-- Adding MessageEvent to queue --
$$ MessageEvent with dest port 7112--
-- Closing port (7112) --
-- Adding ShutdownEvent to queue --
-- (isolate=0x815600) Received: 43
<< ShutdownEvent with isolate(0x815600)--
-- Finished event loop --
Review URL: http://codereview.chromium.org//8588040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1906 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:55:13 +00:00
sigmund@google.com 502d497e14 Fixing string compile-time constant evaluation
Review URL: http://codereview.chromium.org//8729018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1905 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:48:44 +00:00
turnidge@google.com 932628e0fd Add Dart API scoping around the call to Dart_HandleMessage. This
allows us to print the error message in the case that there is an uncaught
exception while handling an inter-isolate message.


Add a couple of unit tests that exercise
Dart_RunLoop/Dart_HandleMessage a bit.
Review URL: http://codereview.chromium.org//8659012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1904 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:41:00 +00:00
codefu@google.com 498e76f6d9 Missing scope variable causing build error for dartcombat
http://code.google.com/p/dart/issues/detail?id=626

BUG=
TEST=

Review URL: http://codereview.chromium.org//8724005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1903 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 21:30:20 +00:00
jacobr@google.com 1ea93e5f9f Fixes to the html library matching vsm's changes to the generated code.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8659025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1901 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 18:59:47 +00:00
rnystrom@google.com 64a619f032 Use right path to html lib.
Review URL: http://codereview.chromium.org//8726038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1899 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 18:04:04 +00:00
regis@google.com f43ffceffd Update function type checking in VM after spec change (issue 444):
- the return types must be covariant or contravariant (an earlier version of the
  guide specified contravariance only).
- the names of optional parameters must match in the same order (an earlier
  version of the spec specified that any subset was allowed, no order required).
Review URL: http://codereview.chromium.org//8664015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1898 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 17:00:16 +00:00
mmendez@google.com d63b9d0ad1 Fix recursion bug when adding members to native JS objects.
Review URL: http://codereview.chromium.org//8659041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1896 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 16:15:18 +00:00
whesse@google.com 9d834082ce Test script tools/test.dart: fix type error in test_suite.dart.
BUG=
TEST=dart --enable-type-checks tools/test.dart

Review URL: http://codereview.chromium.org//8664029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1894 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 15:12:59 +00:00
ager@google.com 38c6bf8659 Support batch running of dartc tests.
R=whesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8729030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1890 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 12:38:14 +00:00
sgjesse@google.com 286d5dff90 Change handling of accepting socket connections
The accept method have been removed from the ServerSocket class and
the signature for the connectionHandler callback have been changed to
provide the accepted socket as an argument.

This is to avoid the possibility for accept to return null even in the
case of pending connection. This could happen if an error like EAGAIN,
EWOULDBLOCK and EINTR was returned by it OS accept call and previously
there was no way of propagating this without returning null from the
Dart call to accept.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8726031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1889 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 12:02:01 +00:00
ager@google.com 946b015d0a Fix memory leak in MacOS process handling.
Report error for failing writes. We used to enter a poll loop
because we kept on attempting to write.

Currently the error handling in the socket interface is inconsistent.
We have a big TODO item on general error handling including the socket
interface.

R=sgjesse@google.com
BUG=
TEST=

Review URL: http://codereview.chromium.org//8659032

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1887 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 10:10:07 +00:00
rnystrom@google.com 95f64cbf9f Lots of stuff hooking up markdown to dartdoc.
- Add support for [foo] implicit links to markdown.
- Add hook so that outside code can define what markup a [foo] link creates.
- Make dartdoc look up [foo] names to resolve the identifier.
- Fix unmatched tag unwinding bug.
- Add [:...:] code support to dartdoc.
- Fix text and URLs for generic types in docs.
- Sort classes by name.
- Don't generate docs for private types.
- Fix generated docs for inheritance chain.
- Make source code in generated docs optional.
- Fix showing base class in docs.
- Implement insertRange() for List in frog.
- Add dartdoc shell script.

Review URL: http://codereview.chromium.org//8725007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1886 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 02:47:18 +00:00
iposva@google.com a75ffe679a - Ignore marking bits when visiting pointers.
Review URL: http://codereview.chromium.org//8727015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1883 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-29 00:26:04 +00:00
iposva@google.com edd46d501f - Add support for marking bits in the object header.
Review URL: http://codereview.chromium.org//8728016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1882 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 23:44:08 +00:00
srdjan@google.com 35916f5eb2 More --use_slow_path tests, add that VMOption to two tests.
Review URL: http://codereview.chromium.org//8725009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1881 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 23:38:39 +00:00
vsm@google.com 1d2dbb040b Temporary build fix in generated code
TBR=jacobr

Review URL: http://codereview.chromium.org//8659020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1880 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 22:47:27 +00:00
jacobr@google.com 2dbe767ed6 Split html library into html and html_impl
BUG=
TEST=

Review URL: http://codereview.chromium.org//8548007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1879 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 22:16:54 +00:00
sra@google.com a6f410174d Generate constants for IDL classes
We will have to revert this if we go back to pure interfaces.

Fixes:
dartfrog-generated/dom/Cache.html	text
dartfrog-generated/dom/Exceptions.html	text
dartfrog-generated/dom/IsolateLight.html	text
dartfrog-generated/dom/DOMConstructors.html	text

BUG=
TEST=

Review URL: http://codereview.chromium.org//8473008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1878 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 21:28:12 +00:00
asiva@google.com 5d0ad4091f Fix type warnings in coreimpl lib.
Review URL: http://codereview.chromium.org//8664003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1876 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 21:06:25 +00:00
mmendez@google.com 7fb21ee64a Adds a class for computing the dependencies that a given JS AstNode has.
Review URL: http://codereview.chromium.org//8561015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1874 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 19:35:15 +00:00
regis@google.com 0c2d2598bd Fix slow path for allocation of implicit closures (issue 613).
Review URL: http://codereview.chromium.org//8664005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1873 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 19:08:25 +00:00
floitsch@google.com a8543e8bb8 Integrate double-conversion into build-process.
Review URL: http://codereview.chromium.org//8725003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1872 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 19:04:33 +00:00
floitsch@google.com 326417a3ba double-conversion drop.
Not yet integrated into build process.

Review URL: http://codereview.chromium.org//8632010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1870 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 18:38:38 +00:00
zundel@google.com 6089e32a26 Reduces output & memory usage of compiler by using prototype chain for inherits
The setting of $inherits for superclasses in each class is redundant,
since this property is set on the prototype.   This reduces the JS output
of co19 test LangSpecTest/13_Types/13_4_Interface_Types/A11/t01 from
43 MB to 1.6 MB.

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

Review URL: http://codereview.chromium.org//8698021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1868 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 18:22:21 +00:00
srdjan@google.com 799b1c5c72 Add flag --use_slow_path to test slow paths. Started with implementation for implicit closure allocation.
Review URL: http://codereview.chromium.org//8713015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1866 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-28 17:08:38 +00:00
sgjesse@google.com 45fe59bcef Refactor some of the duplicated code in the tests using a socket server
This is a first step in making these tests easier to understand.

R=ager@google.com

BUG=
TEST=

Review URL: http://codereview.chromium.org//8662038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1838 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 12:11:04 +00:00
sgjesse@google.com da1ecfb1ab Fix handling of VMOptions= in multi tests
R=kasperl@google.com

BUG=dart:483

TEST=

Review URL: http://codereview.chromium.org//8679025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1837 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 11:37:05 +00:00
sra@google.com 7172f72d66 Add tests for is-checks on hidden native classes.
BUG=
TEST=

Review URL: http://codereview.chromium.org//8680042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1832 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 03:18:30 +00:00
rnystrom@google.com fa59ed59d6 First pass at a markdown parser in Dart.
Review URL: http://codereview.chromium.org//8680025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1830 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 01:18:05 +00:00
srdjan@google.com 35faa6aaa9 Move more nodes to the optimizing code generator.
Review URL: http://codereview.chromium.org//8678033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1829 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 01:14:15 +00:00
iposva@google.com d2069f9ff2 - Remove the redundant dart_bin executable.
Review URL: http://codereview.chromium.org//8682031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1828 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 01:03:21 +00:00
regis@google.com 5382e56f05 Optimize type checks of list and map literals.
Introduce an ast node for explicit 'assignable to' type checks.
Remove Instance::Is() helper.
Review URL: http://codereview.chromium.org//8678031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1827 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 00:26:18 +00:00
hausner@google.com 620d772233 Revert initializing formals change in client code
Didn't revert those initializers that refer to private fields.

TBR=sra
Review URL: http://codereview.chromium.org//8680038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1826 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-24 00:25:10 +00:00
hausner@google.com 45fff0023d Undo some of the initializing formal change 1755
I didn't undo those initializing formas that are initializing a private field.
Review URL: http://codereview.chromium.org//8677027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1824 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 23:44:14 +00:00
turnidge@google.com 901f5d693c Print the failing command if we run into trouble while creating snapshot.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1823 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 23:41:35 +00:00
hausner@google.com ac4b099912 Fix even more builds
My code is apparently breaking everywhere except on the Mac...
Review URL: http://codereview.chromium.org//8680031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1822 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 22:39:22 +00:00
hausner@google.com 0b3cc43b89 Fix Windows build
Write once, fix everywhere...
Review URL: http://codereview.chromium.org//8680029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1820 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 22:34:14 +00:00
hausner@google.com 0ef3609ec0 Allow optional initializing formals again
After removing optional initializing formal parameters from the VM
yesterday, the language team decided that they should be allowed
and made usable.

- The name of an optional initializing formal is the name of
  the field it initializes.
- The parameter is only visible at the call site of the constructor,
  to name the parameter.
- The parameter is NOT visible in the constructor's initializer list
  and body.

class A {
  A([this.x = 10]);
  A.bad([this.x = 10]) : y = x;  // Error: parameter x not in scope
  A.ok([this.x = 10]) { print(x); } // Refers to field x, not parameter x.
  var x, y; 
}

o = new A(x: 50);  // o.x == 50.
o = new A();       // o.x == 10.
Review URL: http://codereview.chromium.org//8682025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1819 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 22:31:09 +00:00
srdjan@google.com 88878148ac Fix crashes when going to natives. Throw an exception instead.
Review URL: http://codereview.chromium.org//8678025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1817 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 22:03:51 +00:00