Commit Graph

79322 Commits

Author SHA1 Message Date
ager@google.com 9ef42b14d9 Various test script changes:
- Supply options to cctests and filter based on name.
- Add samples test suite.
- Minor cleanup in the scripts.

R=whesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1703 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 15:12:01 +00:00
ager@google.com 40e896bf17 Fix timing of both dart and python test scripts.
The scripts (in particular the python one) were not counting all
of the setup code that is run before tests are started. The time
reported by the progress indicator now matches the time reported
by 'time test_script'.

R=sgjesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1697 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 10:36:34 +00:00
ager@google.com 1a09eb8f6a Implement cc test suite and use it to run the VM tests.
R=whesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1696 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 10:06:53 +00:00
iposva@google.com 372d425658 - Move generated_tests into the build output directory.
Review URL: http://codereview.chromium.org//8608004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1693 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 07:25:29 +00:00
iposva@google.com deb49138ef - Build libdart as a static library. First step towards
removing dart_bin.
Review URL: http://codereview.chromium.org//8610004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1692 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 05:56:00 +00:00
vsm@google.com 7a0c8ebee2 Generate constructors for frog DOM
Note, this overlaps with the other CL (http://codereview.chromium.org/8595020/) as the underlying IDL has changed.

Stephen: If this looks good, I can autogen the wrapper templates as well.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1691 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 04:51:45 +00:00
vsm@google.com 0da36c6374 Cleanup old code and refresh on IDL
Note, this picks up Pavel's custom->any IDL change.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1690 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-21 04:43:03 +00:00
jimhug@google.com baedd53cd3 json bug fix
BUG=522
TEST=client/tests/json

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1688 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 17:14:43 +00:00
sra@google.com d98d380d29 Cleanup generators
Make generators uniform.

Remove some dead code from the old use of interface injection to
constructing union types.

This CL makes no changes to the generated files.

TBR=vsm
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1684 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 05:55:38 +00:00
jmesserly@google.com 5e4805a30a Parser fix for lambdas. All the heavy lifting courtesy of Stephen :)
(http://codereview.chromium.org/8400017/)

Only difference in this version is using a List instead of a Map (due to Maps having not so great performance at the moment when the keys are numbers. And we could get even better perf by tweaking this to cache the lookahead on the Token, if we really wanted to)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1683 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 01:46:51 +00:00
sra@google.com a58b347f0b Add test for scope accessed by multiple closures.
Currently fails on frog.

TBR=jmesserly
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1682 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 01:36:04 +00:00
cshapiro@google.com 1cff31c3d0 Implement external strings.
External strings refer to character data in memory located outside of
the managed heap.  This memory is considered to be owned by the
embedding application.  To help with the management of external
memory, the virtual machine allows the embedding application to
register for a "death notice" when an external string object is
garbage collected.  A death notice takes the form of a callback
invoked by the garbage collector with the address of the external
memory.  Death notices will be implemented in the garbage collector by
future commit.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1679 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-19 00:33:23 +00:00
srdjan@google.com abbe12ab38 Print uninstantiated type with --trace_type_checks for instanceof (easier to identify what caused calls to runtime).
Review URL: http://codereview.chromium.org//8598023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1676 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 22:49:52 +00:00
sigmund@google.com e8939015d8 Add a regression test.
Review URL: http://codereview.chromium.org//8558028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1673 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 22:07:53 +00:00
srdjan@google.com 8b6dbe1b76 Do not allow allocation of FallThroughError and AssertionError by the user.
Review URL: http://codereview.chromium.org//8569013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1671 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 20:36:42 +00:00
jmesserly@google.com 17dd3cba7a Fixes to get Swarm demo app working again.
The key fix is that we correctly specialize the parent of a generic type, and ensure that inherited generic members are created on the correct concrete type. Otherwise, we end up pulling the base method into the derived ConcreteType, potentially pulling it into a totally different library and messing up private member access. To make this work in the generated code, we need to also pull these members into the derived ConcreteType's prototype.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1670 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 19:54:51 +00:00
scheglov@google.com 2f84543a8b Forgot to commit ParserException
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1669 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 19:03:16 +00:00
scheglov@google.com e52594eddd Expect 'extends' in type parameters declaration and recover, issue 341
http://code.google.com/p/dart/issues/detail?id=341

R=zundel@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1668 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 18:58:00 +00:00
sigmund@google.com 682511e998 Support globals in frog isolates.
Review URL: http://codereview.chromium.org//8591033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1667 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 18:38:17 +00:00
srdjan@google.com ef28b12301 Added a factory test that fails in frog and dartc. Will add bug numbers to status file once the correctness of the test has been confirmed.
Review URL: http://codereview.chromium.org//8586040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1666 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 18:33:45 +00:00
asiva@google.com 0ce8298541 Refactor the library tag handler to share code between standalone dart and the snapshot generator.
Review URL: http://codereview.chromium.org//8549009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1665 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 18:24:04 +00:00
hausner@google.com 8a6a9e645d Better error handling when scanning library tags
Fixes Issue 516 
http://code.google.com/p/dart/issues/detail?id=516

#!/dart_bin
##library("foo");

void main() {
  print("goodbye");
}


Errors encountered while loading script: '/private/tmp/t.dart': Error: line 2 pos 2: Unrecognized library tag
##library("foo");
 ^
Review URL: http://codereview.chromium.org//8586052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1664 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:50:32 +00:00
zundel@google.com 0ea6fba5fd Addresses a ClassCastException seen in the editor from MemberBuilder
Added a simple test to protect against the class cast exception and a JUnit test to
exercise it.

BUG=413

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1663 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:49:40 +00:00
regis@google.com a5dc8b60d1 Fix code generation issue with new factory syntax.
Convert VM core library to new factory syntax.
Review URL: http://codereview.chromium.org//8602004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1662 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:47:12 +00:00
sigmund@google.com bba5ed03e1 Make HashMap's delete key a const expression.
Review URL: http://codereview.chromium.org//8591022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1661 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 17:24:01 +00:00
zundel@google.com 0afd79a58c Sort the status lines in language.status for dartc.
Adding new ones at the end always causes conflicts, and the sort order has no logic behind it.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1660 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 16:00:34 +00:00
mmendez@google.com 46882b7fb0 Added a suite for JS analysis so we run as part of test.py.
TBR=codefu,fabiomfv,zundel

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1659 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 15:59:17 +00:00
mmendez@google.com f739bfb992 This is not meant to be a general purpose indexer, but it is meant to be sufficient for conservative tree shaking of dartc generated JS code and the native code of the various libraries.
Review URL: http://codereview.chromium.org//8486015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1656 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 14:03:33 +00:00
ager@google.com ea78edb762 Attempt to fix buildbot.
Having multiple tests write and delete the same file is not such
a great idea. :-)

R=whesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1655 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 13:11:08 +00:00
ager@google.com eb2ed9e25f Implement delete on File objects.
R=whesse@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1652 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 12:27:56 +00:00
sra@google.com 3e199eec2d Wrapper dom changes in preparation for SVG
SVG defines methods that override base class methods. This requires
the Dart static helper methods to have unique names since Dart
inconveniently does not permit static method shadowing.  Rather than
furr up all the names with yet another copy of the class or interface
name, this change only adds the interface name if there actually is a
base class method of the same name.

Almost all of this change is due to applying the same technique to the
attribute getters and setters, which makes many names a little shorter.

BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1646 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 06:10:51 +00:00
vsm@google.com 31dc1074ee Fix build, spirodraw
Tested spirodraw with frog in the browser.

TBR=sra,drfibonacci

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1645 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 04:33:37 +00:00
vsm@google.com f0e5d25767 Roll DOM APIs forward on IDL & update Frog DOM
Note, the frog DOM is generated via:
> ../tools/copy_dart.py frog frog_dom.dart
to keep it a single file.

I'll experiment to get rid of this level of indirection in a later CL.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1644 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 03:04:12 +00:00
asiva@google.com 5e6441a5cd Change loaded_ flag in RawLibrary to load_state_ in order to register different
states of the load process.
This state can then be used to ensure we report errors on duplicate loads.
Review URL: http://codereview.chromium.org//8520030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1643 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-18 00:09:13 +00:00
jmesserly@google.com c21417ef6e Revert "Fix some type warnings in html library."
The factory change seems to have broken tests on Dartium.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1642 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 23:58:43 +00:00
nweiz@google.com a4297bff0d Dynamically dispatch getters and setters on dynamically-typed variables.
This breaks MethodBindingTest, but only because first-class methods aren't
really supported by Frog in the first place. The fundamental issue is that Frog
doesn't know to compile a property-syntax getter for a method (e.g.
"get$methodName"). Teaching it to do so is outside the scope of this change.

This would technically fix ConstObjectsAreImmutableTest, but only because it
causes what used to be "a.x = 499" to become "a.set$x(499)", which raises an
error not because a is const but because A doesn't have a "set$x" method. Thus
this change adds a type declaration to the test so it continues to use "a.x =
499".

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1641 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 23:57:55 +00:00
srdjan@google.com 3bad587ddd Update language.status for the VM.
Review URL: http://codereview.chromium.org//8588043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1640 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 23:51:53 +00:00
pquitslund@google.com 3341e8d3db Fix to workaround non-propagation of exception stack-traces by dartc.
Net-net: The previous work-around, assigning '' to the trace var inside the try block, had stopped working.  Somewhere along the line dartc started properly respecting try/catch block scoping of vars.

In an attempt to verify that this fix hasn't broken anything unexpected, I ran test.py and confirmed that all tests still pased and re-ran it with a broken test and confirmed that a stack trace was emitted.

Here's how I built and ran:

./tools/build.py --arch=ia32
./tools/test.py --mode=release --component=dartium client -v --keep_temporary_files
Review URL: http://codereview.chromium.org//8586041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1639 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 23:36:55 +00:00
jmesserly@google.com 0c187847e4 Fix some type warnings in html library.
Two changes:
* factories for Element are typed to return Element. That way we know they're downcastable to things like CanvasElement.
* switch "final" to an explicit "dom.HTMLElement", so we know it has innerHTML on it.  (from looking at the static tpes, it thought "temp" was just an dom.Element. You're probably familiar with this "feature" of the DOM... ;-) )

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1637 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 22:22:34 +00:00
regis@google.com 747ffe77c2 Use correct issue number in co19 status file.
Review URL: http://codereview.chromium.org//8585045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1636 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 22:19:34 +00:00
asiva@google.com 2d88131bfe Fix prototype of Dart_Initialize.
Review URL: http://codereview.chromium.org//8574075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1635 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:59:38 +00:00
jmesserly@google.com 3a321d88f6 Fixes issues in string interpolation tests
This started as my attempt to add a test for http://codereview.chromium.org/8591010/, but it snowballed into fixing other issues when I discovered that StringInterpolateTest was failing already.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1634 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:48:39 +00:00
regis@google.com 80d89cc93b Fix parsing of factory calls (issue 500).
Add test.
Fix test.
Adjust co19 status file.
Review URL: http://codereview.chromium.org//8591025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1633 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:42:55 +00:00
asiva@google.com 804c3c4ace When URL mapping was specified, library loads where not being called for the URLs that were mapped.
Review URL: http://codereview.chromium.org//8588016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1632 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:26:02 +00:00
zundel@google.com 5b1797ece4 Fix the dartium build: CTConst4Test did not include library directive
Review URL: http://codereview.chromium.org//8587048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1630 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:05:39 +00:00
asiva@google.com 9f49e2bf74 Implement automatic loading of dart:core_native_fields library
with predefined classes having native fields.
Classes that need native fields in them can import this library and
extend these predefined classes.
Review URL: http://codereview.chromium.org//8537023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1629 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:04:43 +00:00
dgrove@google.com 9ccef48844 Add libdir when invoking frog.
Review URL: http://codereview.chromium.org//8590039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1628 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 21:03:51 +00:00
rnystrom@google.com 92f55bcfd5 Clean and create output directory when generating docs.
Review URL: http://codereview.chromium.org//8572044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1627 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 20:59:14 +00:00
asiva@google.com d15e57879e Fix assertion during throwing an exception.
We could be throwing an exception from a stub frame and not have any dart frames at all, just treat the stack trace as empty in this case and go with an unhandled exception.
Review URL: http://codereview.chromium.org//8587041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1626 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 20:53:35 +00:00
zundel@google.com 5c0361579f Compile Time Constants cycle check
http://code.google.com/p/dart/issues/detail?id=120

This adds a check to compile time constants to make sure there
are no cycles.  This turned out to be a bit more difficult than
I had hoped, due to interaction with incremenatal compile, when
only a diet parse tree was available for modules that did not
need a full compile. To fix this, I added a lite resolution step
(CompileTimeConstantResolver) to be performed on all units.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1625 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-17 20:52:48 +00:00