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
hausner@google.com
928148cfc3
Address Siva's comments
...
TBR=asiva
Review URL: https://codereview.chromium.org//10982012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12811 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 21:53:45 +00:00
hausner@google.com
201bce4219
Support for show/hide combinators
...
- Add a new VM object called a Namespace.
- A Namespace is a library, and two list of names to hide/show.
- Convert Library and LibraryPrefix to contain Namespace
objects instead of Libraries in their import list.
Review URL: https://codereview.chromium.org//10967052
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12804 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 20:46:56 +00:00
regis@google.com
61297238fb
Support redirecting factory constructors in the VM (issue 3969).
...
Add test (negative tests still missing).
Some more work is needed regarding when to throw a dynamic error and when to
report a compile-time error. Some questions are not answered by the spec.
Review URL: https://codereview.chromium.org//10964058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12791 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 17:28:37 +00:00
ager@google.com
b065e9cb29
Fix implicit super constructor calls for sub-classes of native field wrappers.
...
The current code does not add implicit super calls for any sub-classes
of native field wrappers. It should only omit them from the actual
native field wrappers.
I encountered this issue when looking into dartbug.com/5301.
The test in the parser is not pretty. However, since the native field
wrappers can be generated through the API a better solution was not
immediate. I wanted to check if the class was from the
dart:nativewrappers library, but through the API you can create
native wrappers in any other library as well.
R=hausner@google.com ,asiva@google.com
BUG=
Review URL: https://codereview.chromium.org//10963009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12679 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 05:40:33 +00:00
asiva@google.com
4140ed9d5b
Fix for issue 5223 : Import 'dart:core' implicitly only if it has not been
...
already explicitly imported in the script.
Review URL: https://codereview.chromium.org//10949028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12673 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 00:43:08 +00:00
asiva@google.com
72f3a9c2ba
Issue a more meaningful error message when we see duplicate definitions (ambiguous reference)
...
Review URL: https://codereview.chromium.org//10969002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12657 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 21:04:14 +00:00
iposva@google.com
b9327e0236
- Make the VM understand the --checked flag to be aligned with dart2js.
...
- Adjust some of the checked mode tests to pass --checked and --enable-checked-mode.
Review URL: https://codereview.chromium.org//10962013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12651 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 18:19:06 +00:00
vegorov@google.com
cd578d9de7
Ensure that parser throws an error when parsing x is! T with malformed type T.
...
Otherwise VM crashes in the flow graph builder
R=regis@google.com
BUG=
Review URL: https://codereview.chromium.org//10944041
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12608 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 21:48:50 +00:00
regis@google.com
99818005d8
Control static type propagation with a flag in optimizing compiler.
...
Minor cleanup.
Review URL: https://codereview.chromium.org//10952009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12601 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-19 20:59:01 +00:00
hausner@google.com
19c8f19f5e
Stop making classes implicitly abstract
...
Allocating an implicitly abstract class is no longer a runtime error.
Review URL: https://codereview.chromium.org//10910284
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12408 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-14 22:46:54 +00:00
hausner@google.com
731f692895
Get rid of #resource directive in VM
...
Review URL: https://codereview.chromium.org//10918226
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12358 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 22:25:09 +00:00
turnidge@google.com
a28d475ff3
Implement more of the mirrors library, primarily stuff to do with types.
...
Highlights:
- Implement FunctionClassMirror, used to reflect on the class of
function objects.
- Implement TypeVariableMirror, used to reflect on type variables.
- Implement TypedefMirror, used to reflect on typedefs.
- Implement returnType for MethodMirror
- Implement type for VariableMirror/ParameterMirror
- Added supporting functions to the dart embedding api:
- Dart_ClassIsTypedef
- Dart_ClassGetTypedefReferent
- Dart_ClassIsFunctionClass
- Dart_ClassGetFunctionClassSignature
- Dart_FunctionReturnType
- Dart_FunctionParameterType
- Dart_VariableType
- Dart_GetTypeVariableNames
- Dart_LookupTypeVariable
- Dart_IsTypeVariable
- Dart_TypeVariableOwner
- Dart_TypeVariableUpperBound
Other stuff:
- Fixed bug in Function::NumberOfImplicitParameters for signature
functions.
- Chnaged the default upper bound for type variables to Object from
Dynamic. Discussed this with Gilad and Regis.
- Fixed some smaller problems in mirrors_impl.dart.
Review URL: https://chromiumcodereview.appspot.com//10916252
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12342 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 17:47:25 +00:00
kasperl@google.com
d1da3ed908
Re-land r12289.
...
Looks like Johnni has fixed the dartdoc issues.
R=iposva@google.com ,hausner@google.com
BUG=
Review URL: https://codereview.chromium.org//10919263
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12321 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 12:37:00 +00:00
lrn@google.com
292da5cc48
Make int an abstract class.
...
This looks deceptively simple (the only real change is in init, which
just copies the code for double, and the rest are just renaming for
consistency). It seems to work.
Review URL: https://chromiumcodereview.appspot.com//10933039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12304 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 07:17:27 +00:00