Commit Graph

55 Commits

Author SHA1 Message Date
benl@google.com c0a59669cf Do away with the PromiseQueue.
Instead of queuing messages with promises in them until the promises
are ready, send immediately. This is done by sending a port down which
the receiver sends a port which can be used to signal completion of
the outgoing promise.
Review URL: https://chromereviews.googleplex.com/3573013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@427 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 11:18:12 +00:00
karlklose@google.com 7ab879eb30 Implement correct resolving of library private members.
Make findElement take the library into account when looking up _-prefixed members.

Review URL: https://chromereviews.googleplex.com/3531017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@425 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 08:58:10 +00:00
johnlenz@google.com b8bdb780ee Set the source position on a DartFunction if an error is reported. (b/4337388)
Review URL: http://codereview.chromium.org//8271023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@419 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-14 00:14:20 +00:00
codefu@google.com 3731f4148e If we run into a "super()" in a function body, report and error and parse it
as a literal.

R=jat@google.com,messick@google.com
BUG=
TEST=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@414 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 20:42:02 +00:00
jat@google.com a2ecb69279 Detect re-throws outside of a catch block.
R=johnlenz
Review URL: http://codereview.chromium.org//8247007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@407 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 18:22:58 +00:00
johnlenz@google.com 145154cf2b Enabled class name minification in production mode. Reduces removes 52K (optimzed) from swarm.
Review URL: http://codereview.chromium.org//8252006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@401 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 16:16:33 +00:00
johnlenz@google.com 54a65cf7e8 Don't emit calls to "Object.$Constructor" and "Object.$Initializer". Saves 17K (optimized) off of swarm.
Review URL: http://codereview.chromium.org//8253003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@385 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-13 00:13:15 +00:00
codefu@google.com e77d724568 Check library dependency changes before deciding on a zero-delta run.
Bundled libraries report as being up to date with respect to their compiled
resources, but changes to classes and interfaces still need to be verified
against local depenencies.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@384 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-12 23:49:05 +00:00
jbrosenberg@google.com 0ecdacb6d0 Don't allow a #source directive in a library unit include itself
Review URL: http://codereview.chromium.org//8229028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@383 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-12 22:25:21 +00:00
johnlenz@google.com 7bc0683761 Add support for exception rethrowing using "throw;"
Review URL: http://codereview.chromium.org//8208016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@372 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-12 18:56:01 +00:00
johnlenz@google.com f88f5bd311 Pull "$instanceOf" methods off of the native object. No change in behavior.
Review URL: http://codereview.chromium.org//8241013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@371 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-12 18:54:48 +00:00
johnlenz@google.com 6701769d35 Fix named parameters handling of values that are falsy in JS, also fixes issues with named parameters that whose "default" value should default to "null".
Review URL: http://codereview.chromium.org//8232014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@358 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-11 23:43:20 +00:00
codefu@google.com 6c9a5a1989 Hashcodes were being improperly calculated for public API of libraries.
This triggers reparsing of files dependent on the API.  The error occured
because we were checking hashcodes in the frontend while calculating them
after normalization/backend.  This patch:
-Moves calculation of hashcodes to the same functions that generate the
API files.
-Writes the cached hashcode to depenency files
-Includes an end to end test to guard against regression

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@354 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-11 23:01:55 +00:00
johnlenz@google.com 4b6eb1bab1 Review URL: http://codereview.chromium.org//8218022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@320 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-10 23:21:29 +00:00
johnlenz@google.com ffeb400831 Speed the optimzed build a little bit.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@319 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-10 22:41:23 +00:00
zundel@google.com 77a77962b0 Fix crash of language/InstantiateTypeVariableNegativeTest
The resolver catches this test with a NO_SUCH_METHOD exception,
but if you run with --warn_no_such_type that is not fatal.  This
change detects the problem with a type variable being used so
it doesn't get to code generation.

BUG=5433122

Review URL: https://chromereviews.googleplex.com/3578019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@308 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-10 20:10:55 +00:00
zundel@google.com 0294b62be1 remove TestRunner and revector callers to DartRunner
It only had a few methods in it that all ended up delegating to DartRunner.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@306 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-10 19:11:41 +00:00
jbrosenberg@google.com 61f4d4472c Redo for: Bypass precompiled libs for up to date checks
Fixes to bundledArtifact handling

Review URL: https://chromereviews.googleplex.com/3579012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@302 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-10 15:37:06 +00:00
mmendez@google.com 6091c0dc03 When running with with --warn_no_such_type the backend would assert on non-existent types. Previously, we would add a default ctor to a non-existent type.
In this patch, we don't add ctors to non-existent types and we generate NSME's for instantiation of non-existent types or types with non-existent ctors.

BUG=5433121

Review URL: https://chromereviews.googleplex.com/3563019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@283 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-09 05:02:07 +00:00
zundel@google.com 3866a85d54 Avoid crashing on new invocations that are not fully resolved.
R=mmendez@google.com

Review URL: https://chromereviews.googleplex.com/3568019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@282 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-09 04:47:04 +00:00
zundel@google.com 870da8ef9d Fixing bad merge in CommandLineOptions
Review URL: https://chromereviews.googleplex.com/3565017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@276 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-08 15:31:25 +00:00
zundel@google.com 4ccb7c5810 Add --enable-type-checks to allow certain resolution errors to be non-fatal
This is to match the  behavior outlined in Gilad's
"Optional Types in Dart" document.  Extra type checks are turned
on when --enable-type-checks is passed on the command line *or*
optimization mode is enabled in the compiler.

See also https://chromereviews.googleplex.com/3563014/

Review URL: https://chromereviews.googleplex.com/3561023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@275 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-08 15:11:10 +00:00
mmendez@google.com fc7390d97b Add support for --enable_type_checks (developer mode) for dartc.
This patch is based on https://chromereviews.googleplex.com/3520019/.  However it addresses the following issues:

1) TypeError exceptions will now have the stack trace filled in.
2) Type parameters are now accessible from closurized code, including the trampoline shims for named optinal parameters.
3) Suppress use of FunctionExpressionInliner with type checks because the inline normalization can leave return nodes in the AST.
4) Pass the generateHumanReadableOutput flag to the closure backend.
5) TypeDartcTest passes in debug and release modes with type checking enabled.  We still need to enable the additional cases in the code.

Review URL: https://chromereviews.googleplex.com/3558021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@271 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-08 04:11:34 +00:00
johnlenz@google.com 179f836439 Fix source map stack deobfuscation for test runner.
Review URL: https://chromereviews.googleplex.com/3573020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@270 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-08 01:50:04 +00:00
sigmund@google.com 4c9be10f18 Remove my email
Review URL: https://chromereviews.googleplex.com/3578016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@253 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 19:54:03 +00:00
floitsch@google.com 385e90dd3b Remove my mail from some of the files.
Review URL: https://chromereviews.googleplex.com/3573018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@251 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 19:28:26 +00:00
rchandia@google.com 770771127b Deactivates ANSI colors on errors for non-interactive consoles
R=zundel@google.com
BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3572015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@245 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 18:06:23 +00:00
jgw@google.com d0cd03b159 Revert "Changed error messages to report the URI of the offending file, rather than its "name"."
Review URL: https://chromereviews.googleplex.com/3566013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@240 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 17:23:04 +00:00
jgw@google.com 340daa5ed0 Changed error messages to report the URI of the offending file, rather than its "name".
Now you can actually find them.

Review URL: https://chromereviews.googleplex.com/3569014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@237 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 16:46:07 +00:00
jgw@google.com 87d272b003 Fully removes support for positional parameters with default values.
Review URL: https://chromereviews.googleplex.com/3576012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@204 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 09:18:48 +00:00
karlklose@google.com c3f3596e68 Store referenced element for invocations and property access.
Review URL: https://chromereviews.googleplex.com/3460036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@195 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 07:02:03 +00:00
jbrosenberg@google.com f5d2bc1d69 Revert 192: "Bypass precompiled libs for up to date checks"
Appears to have broken chromium-release build

Review URL: https://chromereviews.googleplex.com/3571012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@194 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 06:38:05 +00:00
jbrosenberg@google.com b66797f6e4 Bypass precompiled libs for up to date checks
Fixes to bundledArtifact handling

Review URL: https://chromereviews.googleplex.com/3562014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@192 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 05:11:24 +00:00
zundel@google.com 909ba0d3a7 A problem with options parsing due to half-way converting from RunnerFlags
Cleans up the usage message for cmdline parsing, and passes the
object CompilerOptions (and friends) around instead of the array
of command line arguments.

Committed: https://code.google.com/p/dart/source/detail?r=187

Review URL: https://chromereviews.googleplex.com/3565012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@189 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 02:05:19 +00:00
johnlenz@google.com 5d45b72a3a Rollback breaking change.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@188 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 01:16:59 +00:00
zundel@google.com b5b46da81c A problem with options parsing due to half-way converting from RunnerFlags
Cleans up the usage message for cmdline parsing, and passes the
object CompilerOptions (and friends) around instead of the array
of command line arguments.

Review URL: https://chromereviews.googleplex.com/3565012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@187 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-07 00:56:18 +00:00
johnlenz@google.com 8dda0078b8 Fix bad merge.
Review URL: https://chromereviews.googleplex.com/3555012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@170 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 23:11:00 +00:00
zundel@google.com 6bd18f8086 Fix name shadowing problem in compiler
Names in a scope should create shadow copies of names in enclosing scopes.

BUG=5382396

Review URL: https://chromereviews.googleplex.com/3543020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@147 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 19:17:31 +00:00
fabiomfv@google.com be8e6320b3 http://b/issue?id=5407575
Review URL: https://chromereviews.googleplex.com/3548017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@145 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 18:57:17 +00:00
codefu@google.com da07089568 DynamicElementImplementation: return dynamic type
MemberBuilder: accept broken methods
DeltaAnalyzer: Corelib types

BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3531013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@133 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 15:50:13 +00:00
zundel@google.com fa609a58ec Updates the resolver to print the line and column number for name conflicts
Along the way I gave the ResoverTest more specific errors to test
against and found some cases that weren't being flagged properly
as errors.

BUG=5415945

Review URL: https://chromereviews.googleplex.com/3544012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@132 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 15:35:05 +00:00
jgw@google.com 4265230569 Fixes declaration of named-parameter trampoline parameters
(to avoid name conflicts with explicit ones).
BUG=5404211

Review URL: https://chromereviews.googleplex.com/3544015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@115 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 12:27:59 +00:00
benl@google.com 7ddf68b7b3 Review URL: https://chromereviews.googleplex.com/3507025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@112 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 11:19:01 +00:00
ager@google.com 7d4f364d53 Minor changes to documentation generation.
Filter out private classes so no file is generated for them.

R=ngeoffray@google.com
BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3540013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@110 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 11:02:55 +00:00
jgw@google.com e2daa7e89b Remove support for variadic parameters.
Review URL: https://chromereviews.googleplex.com/3528012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@101 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 08:28:42 +00:00
johnlenz@google.com b2918972e8 Changes to allow the ClosureJsBackend to give people some options to play with:
- introduce a "fastDraft" mode that only runs the main code-removal passes and runs in about half the time and but produces code 2x the size (but still less than 10% of the original).
- allows it to run in an quasi-incremential mode by consuming the incrementially generated js (cuts ~4s off the build time but source maps are useless).
- allow source map generation to be turned off (saves a couple seconds).
- turns off not useful check passes and makes the rest switchable.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@91 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 06:41:19 +00:00
johnlenz@google.com 30232ec2c0 Remove more class name references from optimized code. Only removes 800 bytes from swarm.
Review URL: https://chromereviews.googleplex.com/3548012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@90 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 05:51:25 +00:00
mmendez@google.com 115fc3df08 Revert "Revert "Eliminate retarded constructors.""
This reverts r66 which was a revert of r64.  The original commit failed because "optimized" mode builds won't generate NoSuchMethodErrors and that is why the release mode test won't pass.  So for that issue, I updated the language.status file.

The client failure appears to be test infrastructure flakiness because my rollback failed but the subsequent build succeeded and I'm unable to reproduce the failure at my desk.

Review URL: https://chromereviews.googleplex.com/3508025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@88 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-06 02:46:31 +00:00
fabiomfv@google.com 02fc5cc91f add debugging compiler flags:
--human-readable-output : generates readable source code in optimized output. 
--disable-type-optimizations : disables type optimizations. 
Review URL: https://chromereviews.googleplex.com/3513020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@70 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 20:40:38 +00:00
mmendez@google.com ad9389b6ca Revert "Eliminate retarded constructors."
This reverts commit r64.

BUG=
TEST=

Review URL: https://chromereviews.googleplex.com/3530013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@66 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 20:03:49 +00:00