Commit Graph

342 Commits

Author SHA1 Message Date
regis@google.com 02a8df0c83 Remove private class helping the parser to construct literal lists and maps.
Patch List and Map (implementation) classes with literal factories.
Review URL: https://codereview.chromium.org//11369234

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14873 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 04:28:02 +00:00
srdjan@google.com 439110bf48 Move lazy deoptimization of all optimized code from top level parsing to end of class finalization (after installing new classes, and --use_cha, we need to invalidate some optimzied code)
Review URL: https://codereview.chromium.org//11370008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14871 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 23:31:07 +00:00
regis@google.com ebc3402925 Create symbols for string constants.
Review URL: https://codereview.chromium.org//11360231

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14866 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 21:05:55 +00:00
regis@google.com 7614e956dc Check result type of redirecting factory in checked mode.
Review URL: https://codereview.chromium.org//11369219

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14862 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 19:02:08 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

Review URL: https://codereview.chromium.org//11365196

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
hausner@google.com 4ca0c72fd5 Enforce proper library/import syntax
Review URL: https://codereview.chromium.org//11312197

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14828 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 01:06:48 +00:00
hausner@google.com b2cbdba375 Remove named function literals from library and tests
Start eliminating old-style function literals, i.e. remove
return type and function names.

Enforcing new style function literal syntax can be turned
on with the vm flag --strict_function_literals.
Review URL: https://codereview.chromium.org//11377102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14805 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 19:55:11 +00:00
lrn@google.com 1555c1db26 Convert String to a class.
Remove the StringImplementation class.

Review URL: https://codereview.chromium.org//11085003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14779 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 08:16:59 +00:00
regis@google.com 40276f8c30 Fix result type checking of factory constructors of generic classes in VM.
Add a language test.
Fix some language tests.
Fix runtime library.
Note: This does not yet fix result checking of redirecting factories.
Review URL: https://codereview.chromium.org//11369168

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14769 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 23:51:06 +00:00
srdjan@google.com 2fdbeb2153 Make sure that ParsedFunction holds onto zone handles.
Review URL: https://codereview.chromium.org//11364166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14718 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:58:21 +00:00
hausner@google.com be175c758e Implement const expressions for local variables
Review URL: https://codereview.chromium.org//11265047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14716 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:19:43 +00:00
regis@google.com d372a816bb Pass closure object as first implicit argument to closure functions.
Remove code passing captured receiver to native instance closures; instead,
access captured receiver in context, as non-native functions do.
Review URL: https://codereview.chromium.org//11360116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14698 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:28:07 +00:00
hausner@google.com 323c735040 Make sure setter does not conflict with method
Review URL: https://codereview.chromium.org//11312109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14600 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 22:51:01 +00:00
hausner@google.com 99c505e9b3 Fix various inheritance bugs
Fields can be overridden by subclasses
A setter does not conflict with a method
Eliminate outdated tests

Fixes issue 6482
Review URL: https://codereview.chromium.org//11312095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14583 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 17:54:27 +00:00
hausner@google.com 95c79712da Make library, import, export, part pseudo-keywords
Resubmit cl 14446 after Ivan's keyword table fix.
Review URL: https://codereview.chromium.org//11367069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14500 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 20:30:08 +00:00
hausner@google.com e4880d6698 Revert cl 14446
Review URL: https://codereview.chromium.org//11293054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14448 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 00:19:48 +00:00
hausner@google.com 4c6b490ab8 Make library, import, export, part built-in identifiers
Review URL: https://codereview.chromium.org//11360051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14446 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 23:47:25 +00:00
srdjan@google.com 081e765eb5 Fix issue 6288, move DeoptimizeAll to top level parsing. Allow optimizing compiler to optimize even when ooptimzied code is active.
Review URL: https://codereview.chromium.org//11293038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14422 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 18:10:30 +00:00
hausner@google.com 29c1668cb9 Prevent mutation of final variables
Fixes issue 4328
Review URL: https://codereview.chromium.org//11363012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14366 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 19:43:44 +00:00
lrn@google.com a8720a6d9c Change signature of noSuchMethod to take an InvocationMirror.
Requires VM and dart2js/dart2dart changes to work.

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

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

Review URL: https://codereview.chromium.org//11231074

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14324 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 10:32:54 +00:00
hausner@google.com 5a51906fa3 Disallow 'dynamic' as type parameter name
Fixes issue 2492
Review URL: https://codereview.chromium.org//11343044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14296 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 17:45:36 +00:00
ajohnsen@google.com 806fa6fab1 Move StringImplementation from coreimpl to core as _StringImpl.
BUG=

Review URL: https://codereview.chromium.org//11348035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14281 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 14:19:57 +00:00
ajohnsen@google.com dbbf15abd8 Move ListImplementation from coreimpl to core, as a private member.
BUG=

Review URL: https://codereview.chromium.org//11189141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14274 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 13:25:04 +00:00
iposva@google.com 15114867c7 - GrowableArray::RemoveLast returns the value being removed
to avoid having to call Last() followed by RemoveLast().
Review URL: https://codereview.chromium.org//11348026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14237 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 00:52:21 +00:00
hausner@google.com d4c5f9f05b Handle super call to unary operators
Fix issue 1288.
Review URL: https://codereview.chromium.org//11342027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14233 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 00:02:22 +00:00
hausner@google.com feff694279 More fixes for super[]
Extend the LoadIndexedNode to also handle super[] and super[]=

Make sure super []= returns the value.
Handle side effects in index expression correctly.
Defer operator function resolution to the flow graph build phase.
Review URL: https://codereview.chromium.org//11267027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14157 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-26 22:31:49 +00:00
floitsch@google.com 0e47b363ae Make hasNext a getter instead of a method.
Review URL: https://codereview.chromium.org//11230011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14015 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 13:05:11 +00:00
regis@google.com d00ed7fbc6 Ambiguous references do not necessarily cause compilation errors (issue 5736).
Triage related co19 test failures.
Review URL: https://codereview.chromium.org//11232071

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13987 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 22:29:44 +00:00
hausner@google.com aad056b3f3 Fix resolution of super getters and setters
Issue 2243
Review URL: https://codereview.chromium.org//11230061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13981 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 18:02:25 +00:00
hausner@google.com 76ef223e2d Make super accessible in closures.
Fix issue 3197.
Review URL: https://codereview.chromium.org//11225050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13917 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-23 00:13:39 +00:00
tball@google.com e0db231c1a Fixed failing 4_External_Functions_A01_t01 test, updated co19-runtime.status with triaged test bug numbers.
BUG=5430

Review URL: https://codereview.chromium.org//11231015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13843 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-19 22:15:11 +00:00
hausner@google.com 63cf1b15d2 Handle super != and ?
Fix two bugs regarding != and argument definition test.

issue 2554
issue 6050
Review URL: https://codereview.chromium.org//11225006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13837 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-19 20:06:03 +00:00
hausner@google.com ddcca5bc14 Check illegal reference to 'this' in factory redirection
Fixes bug 2103.
Review URL: https://codereview.chromium.org//11190033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13790 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-18 17:20:59 +00:00
hausner@google.com 506ae29b8a Enable constructor name check by default
Remove the runtime flag that turns on the name check
for named constructors.

Eliminate obsolete test and test case.
Review URL: https://codereview.chromium.org//11194033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13755 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 20:02:07 +00:00
hausner@google.com 533b525b7a Add warning flag for legacy getter syntax
Review URL: https://codereview.chromium.org//11190009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13753 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-17 18:36:37 +00:00
hausner@google.com 384115d235 Remove built-in identifier 'negate' from VM
Keep the token kNEGATE for the backend to distinguish between
unary and binary - operator.
Review URL: https://codereview.chromium.org//11199002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13700 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 20:19:06 +00:00
hausner@google.com 1811a6b913 Support for type dynamic in VM
Old name Dynamic is supported, and automatically converted to
lower-case dynamic when parsed.

VM flag --warn_legacy_dynamic prints warnings when Dynamic
is found.
Review URL: https://codereview.chromium.org//11125005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13637 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-12 22:40:24 +00:00
iposva@google.com 5f2f50f960 Land http://codereview.chromium.org/11047027/ for Matthias:
Implement export clause in VM 

Implement export namespace support in VM compiler. 

Missing functionality: ensuring that a name is only re-exported once.
Review URL: https://codereview.chromium.org//11028084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13384 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 00:14:42 +00:00
regis@google.com 6c7a1f30fd Look up getter in super call (issue 3621).
Review URL: https://codereview.chromium.org//11088014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13376 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-08 21:37:34 +00:00
ager@google.com 70216ab4cd Hide internal details of VM string implementation.
R=lrn@google.com,srdjan@google.com
BUG=

Review URL: https://codereview.chromium.org//11035057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13352 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-08 13:00:33 +00:00
regis@google.com 3a45259cc5 Implement new scope rules for type variables (issue 5230).
Fix tests.
Review URL: https://codereview.chromium.org//11030056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13316 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 20:29:02 +00:00
hausner@google.com be9679261e Better error message for const loop variables
issue 5629

The new error message is:


'file:/n.dart': Error: line 4 pos 8: Loop variable cannot be 'const'
  for (const i in [1,2,3]) {
       ^
Review URL: https://codereview.chromium.org//11027036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13255 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 19:42:25 +00:00
hausner@google.com ed960e0432 Add catchless catch clauses
The Dart grammar says the catch clause is optional, ie. the following is legal:

try {
  ...
} on String {
  ...
}

Added a test case
Review URL: https://codereview.chromium.org//11051031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13240 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 16:10:45 +00:00
regis@google.com 1b8e614d7d Change compile-time errors into dynamic errors in instance creation expression
(issue 3085).
Change compile-time errors into dynamic errors in static getter and setter
calls (issues 3088, 3094).
Fix a crash in flow graph builder for missing static getter (issue 4360).
Add support in VM for NoSuchMethodError.
Remove support in VM for StaticResolutionException.
Add, remove, update related language tests.
Triage related co19 tests.
Review URL: https://codereview.chromium.org//11049038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13208 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:15:38 +00:00
regis@google.com ccacc62ec6 Change many instance creation errors from compile-time errors to dynamic errors
per revised spec (issue 3801).
Add negative tests for factory redirection.
Review URL: https://codereview.chromium.org//10979053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12975 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 17:52:35 +00:00
ager@google.com 81e81825c9 Make data setter private on GrowableObjectArray.
There is no data setter on Lists. Additionally, this allows to
create buffer overflows.

R=vegorov@google.com,iposva@google.com
BUG=

Review URL: https://codereview.chromium.org//10982045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12941 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-27 06:21:07 +00:00
hausner@google.com a241a7bae6 Make throw an expression
Throw e is now an expression rather than a statement. The language
spec says that throw without an expression (i.e. rethrowing the
current exception) is an expression as well. I have not implemented
this. It is rather difficult to determine at expression level whether
the keyword "throw" is followed by an expression or not. Thus,
throw without an expression is only allowed at statement level.

I think we should change the language spec to that effect.
Review URL: https://codereview.chromium.org//10982051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12928 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 20:53:36 +00:00
hausner@google.com ffedcb612d Make assert a reserved word
Issue 5051.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12861 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 17:59:35 +00:00
hausner@google.com c13e591405 Implement part header
This is the final piece in the new import syntax.
Review URL: https://codereview.chromium.org//10989010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12850 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 16:45:14 +00:00
hausner@google.com aaf9159b8a Implement part directive
This replaces the existing #source directive.
Review URL: https://codereview.chromium.org//10985005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12818 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 23:18:04 +00:00