codefu@google.com
09061281f7
Don't allow elements of a DartBinaryExpression to be null.
...
Issue:
http://code.google.com/p/dart/issues/detail?id=832
Note; I'm still getting NPEs, but the corelibrary isn't being found (a
different issue between Editor/DartC usage?).
R=danrubel@google.com ,mmendez@google.com
Review URL: http://codereview.chromium.org//8993011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2600 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 23:23:31 +00:00
zundel@google.com
9d697de426
Updates dartc to recognize 'default' keyword on interface and updated factory method syntax.
...
Note: this does not have backwards compatibility for the old
factory syntax and updates the tests.
http://code.google.com/p/dart/issues/detail?id=417
Review URL: http://codereview.chromium.org//8948001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2597 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 22:34:57 +00:00
codefu@google.com
0739223eeb
Issue 467: NPE with missing source
...
This was addressed in another issue / cl, however Brian suggested the error
reporing was wrong. Let me know if this is what you are looking for.
R=brianwilkerson@google.com ,mmendez
BUG=
TEST=
Review URL: http://codereview.chromium.org//8999001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2594 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-19 20:57:46 +00:00
codefu@google.com
2afd27cbf6
Increase Mac stack size
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8970033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2552 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 23:28:23 +00:00
codefu@google.com
3fae5d29a6
Promote class to a reserved word
...
Promote class as a reserved word http://code.google.com/p/dart/issues/detail?id=870
Cleaning old test that had invalid assumptions; makeing two new tests
(jUnit and shared test). Marking Frog and VM as failing.
R=mmendez
BUG=
TEST=
Review URL: http://codereview.chromium.org//8972003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2550 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 23:26:14 +00:00
shauvik@google.com
263a78d588
Code for Dartest which consists of two parts:
...
1. Test runner library located in client/testing/
2. Instrumentation code for adding coverage probes
Added some fixes to the AST Writer and changes to highlight instrumented nodes.
Review URL: http://codereview.chromium.org//8905021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2549 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 23:24:15 +00:00
codefu@google.com
4f655be31e
Issue 839: Bad code leading to top level methods being something other than identifier
...
Note; borrowed code from http://codereview.chromium.org/8914015/ as the
editor had the same issue.
Added support for the AST writer to handle Function Expressions and updated
the parser to give the AST writer a chance to dump the unit (if requested
via the current command line parameters) before bailing on the whole
program.
BUG=
TEST=
Review URL: http://codereview.chromium.org//8913016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2515 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 12:57:19 +00:00
mrrussell@google.com
11abfc21e6
Fix the Dart formatter
...
This cl addresses fixing tests 001 and 002.
Other cl's will be created for continue to fix the formatter.
Review URL: http://codereview.chromium.org//8966004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2502 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-16 02:14:58 +00:00
mmendez@google.com
dbd3ee5514
Don't allow new of interface without constructors.
...
Addresses http://code.google.com/p/dart/issues/detail?id=868 . The behavior of allowing default construction of interfaces that have factories has been there for sometime. We can remove that behavior once the issue has been settled.
BUG=http://code.google.com/p/dart/issues/detail?id=868
Review URL: http://codereview.chromium.org//8954016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2470 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-15 18:38:49 +00:00
codefu@google.com
e9487a92e4
Expands on previous function RTT to support named/optional parameters.
...
Issues encountered:
http://code.google.com/p/dart/issues/detail?id=847
http://code.google.com/p/dart/issues/detail?id=848
BUG=
TEST=
Review URL: http://codereview.chromium.org//8913006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2465 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-15 13:31:32 +00:00
mmendez@google.com
03810b7877
Guard against NPE in: http://code.google.com/p/dart/issues/detail?id=815 .
...
BUG=
TEST=
Review URL: http://codereview.chromium.org//8895029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2429 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-14 14:30:25 +00:00
zundel@google.com
2c38b7de7f
This adds a check to the resolver to detect when an override
...
has different number of parameters than in its superinterface.
Review URL: http://codereview.chromium.org//8632020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2354 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 19:19:18 +00:00
danrubel@google.com
34a06ec871
Use VM specific types if DartC types are not available
...
Review URL: http://codereview.chromium.org//8894031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2344 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 16:32:04 +00:00
scheglov@google.com
4a11fd42a3
Tweaks for reporting duplicates, issue 519.
...
http://code.google.com/p/dart/issues/detail?id=519
New tests, plus inlining existing *.dart files into tests with strict checks.
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8846002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2343 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-12 16:20:05 +00:00
zundel@google.com
40e46c0d60
Remove duplicate arguments from hoisted functions.
...
See example Dart code that tickles this problem here:
http://code.google.com/p/dart/issues/detail?id=565
Review URL: http://codereview.chromium.org//8894004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2315 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 16:49:47 +00:00
codefu@google.com
5613c66865
Function type checking: Part Deux
...
This replaced the following CL that was falling behind head.
http://codereview.chromium.org/8566022/
Summary:
Add support for function runtime type checking and typedefs; re-worked to
support tree-shaking at head. Static, instance, top level, and hoisted
methods have RTT lookup methods to identify their types. Respective
getters() and binds() have been updated or added to link the lookup methods
to bounded methods. Static method getters were added as well to perform this
linking for non-bound situations.
BUG=
TEST=
Review URL: http://codereview.chromium.org//8845002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2263 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 18:12:00 +00:00
scheglov@google.com
c95fa9c286
Check for using 'this' and 'super'. Tests. Issue 662.
...
http://code.google.com/p/dart/issues/detail?id=662
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8867001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2252 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 16:25:23 +00:00
zundel@google.com
98504921ed
Report error on parsing URI cleanly (don't throw exception)
...
Issue 712: http://code.google.com/p/dart/issues/detail?id=712
Review URL: http://codereview.chromium.org//8855010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2197 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 21:36:05 +00:00
danrubel@google.com
93a4a8a116
DartC minor fix and doc cleanup
...
Review URL: http://codereview.chromium.org//8856003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2193 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 20:16:54 +00:00
scheglov@google.com
06d54c8d64
Support for 'abstract' modifier for class and spec recommended warnings, issue 375
...
http://code.google.com/p/dart/issues/detail?id=375
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8728001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2181 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 16:15:20 +00:00
danrubel@google.com
1b1a96f972
Prevent "complete" file from being cached across compilation sessions to save space
...
Review URL: http://codereview.chromium.org//8806032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2127 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 16:16:13 +00:00
scheglov@google.com
54c5f79d42
Check that interface constructors and default class constructors are compatible.
...
1. Number of required parameters.
2. Names and order of named parameters.
3. [disabled] type warning for non-identical types.
4. [wait for Eric, not implemented] type parameters check.
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8786002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2124 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-06 14:58:16 +00:00
devoncarew@google.com
21e0fc247c
Added code to associate a dart doc comment with a dart declaration node.
...
Review URL: http://codereview.chromium.org//8769044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2090 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 21:15:28 +00:00
mmendez@google.com
734ac5a5a4
JS tree shaking for incremental builds.
...
This patch does two things:
1) Introduces the infrastructure that is needed by dart-level tree shaking so that it can properly deal with native JS code and thereby prune both dart and JS code.
2) Leverages the infrastructure above to enable JS-level tree shaking of the output of incremental builds by default. Non-incremental builds are not impacted and neither are libraries without entry points.
Prior to this patch an empty application compiled to 558,508 bytes, but with it the size is reduced to 103,679 bytes. It is important to note that the large lower bound is driven by the dependency chain introduced by isolate$processWorkerMessage in corelib/implementation/isolate.js.
For applications like total the savings are much bigger. Prior to this patch Total compiled to 12,151,122 bytes, but with it the size is reduced to 3,758,174. For an app the size of total this additional tree shaking takes about 2 seconds.
Once this patch lands the plan is to thread it into the pending dart-level tree shaking work if needed. This second arc of work will allow us to further compress the output during non-incremental builds by eliding RTT, native JS code, dart methods exposed to native JS code and do dead code elimination.
Review URL: http://codereview.chromium.org//8676041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2077 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 16:12:08 +00:00
mmendez@google.com
0a54d3b612
Revert r2061.
...
r2061 caused a OOME in one of the co19 tests in debug mode for dartc and caused one of the dart editor tests to fail. Rolling back while I take a look.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2062 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 03:30:08 +00:00
mmendez@google.com
01999e7f7d
Patched change from bad branch.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2061 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 03:13:01 +00:00
mmendez@google.com
5e54419eb9
Revert r2058 - incomplete commit.
...
TBR=codefu,fabiomfv,zundel
Review URL: http://codereview.chromium.org//8799003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2060 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 02:50:42 +00:00
mmendez@google.com
6456939045
I run the JS treeshaking and pass the complete file size.
...
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2058 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-05 02:43:43 +00:00
zundel@google.com
7e210b682a
Trying to unbreak dart editor build - new use of rollback messes up code completion
...
Review URL: http://codereview.chromium.org//8788001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2038 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 22:18:17 +00:00
brianwilkerson@google.com
d8d90a89de
Add support for ignoring a string after the native keyword in a method, needed for compatability with frog
...
Review URL: http://codereview.chromium.org//8769023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2029 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 18:55:49 +00:00
zundel@google.com
f8c0479aaf
Parse method names that include type variables.
...
As a first step to allow factory methods to specify type variables, this
allows the parser to accept statements similar to the form:
class A {
factory B<T>.create() { }
}
http://code.google.com/p/dart/issues/detail?id=417
Committed: https://code.google.com/p/dart/source/detail?r=2004
Review URL: http://codereview.chromium.org//8774024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2024 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-02 14:50:10 +00:00
zundel@google.com
8455d926f6
Parse method names that include type variables.
...
As a first step to allow factory methods to specify type variables, this
allows the parser to accept statements similar to the form:
class A {
factory B<T>.create() { }
}
http://code.google.com/p/dart/issues/detail?id=417
Review URL: http://codereview.chromium.org//8774024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2004 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 23:46:25 +00:00
zundel@google.com
b721a2962a
Puts JsScope on a diet
...
Lazy initialization of the names field and interning the description field
reduces memory consumption from > 128M to < 64 M in a unit test that was
suffering from OOM problems.
Review URL: http://codereview.chromium.org//8659022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1986 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-01 15:42:32 +00:00
scheglov@google.com
bb1c53ac58
Fix for resolving interface constructors in factory, issue 521.
...
http://code.google.com/p/dart/issues/detail?id=521
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8747016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1945 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 21:37:44 +00:00
mmendez@google.com
61dd161180
Simplify named method trampolines if named parameters are not involved.
...
There is no need to declare seen and def for methods that don't have named arguments. Saves ~25k for an empty app and ~416k for Total.
Review URL: http://codereview.chromium.org//8746017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1938 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 19:49:41 +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
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
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
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
scheglov@google.com
73cf5451f1
Support for parsing returning qualified type. Issue 513.
...
http://code.google.com/p/dart/issues/detail?id=513
R=codefu@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8662019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1805 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-23 18:52:33 +00:00
zundel@google.com
ccad2889cd
Don't allow invoking a constructor as 'const' if it wasn't declared 'const'.
...
BUG=5142545
Review URL: http://codereview.chromium.org//8624001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1751 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 17:07:49 +00:00
zundel@google.com
7287d25eac
Makes an error message friendlier when trying to invoke
...
a field as a method.
BUG=395
Review URL: http://codereview.chromium.org//8643001
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1750 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-22 16:59:44 +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
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
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
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
shauvik@google.com
5491527d87
Added support for dumping AST to console, text file or dot file
...
Review URL: http://codereview.chromium.org//8566019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1587 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-16 22:33:55 +00:00
codefu@google.com
efcbffc225
Handle NPE case for 'dart:typo'
...
http://code.google.com/p/dart/issues/detail?id=203
R=jwren@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8572026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1553 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 22:36:03 +00:00
scheglov@google.com
f53a4aa109
Report errors for default parameter values, issue 351
...
http://code.google.com/p/dart/issues/detail?id=351
R=zundel@google.com
BUG=
TEST=
Review URL: http://codereview.chromium.org//8564027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1536 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-15 16:58:28 +00:00