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
hausner@google.com
08893af550
Revert change 12289
...
Will resubmit tomorrow. Dartc and Editor need to cleanup static finals.
Review URL: https://codereview.chromium.org//10928169
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12291 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 00:22:12 +00:00
hausner@google.com
b740a3266f
Stop treating finals as const
...
Toplevel final variables and static final fields are no longer
considered compile-time constants.
Review URL: https://codereview.chromium.org//10918203
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12289 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 00:03:16 +00:00
regis@google.com
e860f819a0
Limit the maximum number of formal parameters (32K fixed and 32K optional)
...
in order to save space in function objects.
Naming cleanup.
Review URL: https://codereview.chromium.org//10928160
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12288 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 23:35:05 +00:00
iposva@google.com
609f39c69e
- Fixed patching of named factory constructors. Bug 4727.
...
- Added test to check for error free patching of native factories.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12280 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 20:13:25 +00:00
kasperl@google.com
55140fd125
Remove support for operator negate and replace occurrences with unary
...
operator -.
In the VM, I have disabled the operator negate support in the parser but I
have not removed the keyword because the token is used in quite a few other
places.
R=ahe@google.com ,iposva@google.com ,hausner@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10911206
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12233 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 05:29:03 +00:00
hausner@google.com
a32a698c6f
Support new library/import syntax
...
This change simply adds new syntax support for the functionality we
currently have in the VM.
- Support for library and import, import-as.
- Still to do: show/hide combinators, export, library parts.
Review URL: https://chromiumcodereview.appspot.com//10928121
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12216 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 20:10:56 +00:00
iposva@google.com
a8a8f1e7de
- Do not limit the compiler message buffer, by allocating the message
...
into a String object.
Review URL: https://chromiumcodereview.appspot.com//10933021
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12202 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:03:40 +00:00
vegorov@google.com
a528a1a3ea
Refactor building of StoreStaticField and StoreLocal to manually preserve value.
...
This is first step towards eliminating manual value preservation in the write barrier's fast-path.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10905182
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12124 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 16:02:40 +00:00
hausner@google.com
5aff33a57f
Add missing dot in comment
...
Review URL: https://chromiumcodereview.appspot.com//10908152
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12079 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 23:10:43 +00:00
hausner@google.com
22fdbae05b
VM can parse and ignore metadata
...
Support parsing of metadata in all legal locations except library
and import directives. The metadata is simply ignored. It is not
evaluated or validated for correctness.
Review URL: https://chromiumcodereview.appspot.com//10913138
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12078 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 23:06:48 +00:00
regis@google.com
7cc84c2892
Implement new optional parameters syntax in the vm (issue 4290).
...
Provide --reject_named_argument_as_positional flag to ease transition to new
syntax (default is false).
Add tests.
Review URL: https://chromiumcodereview.appspot.com//10910119
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12004 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 01:13:27 +00:00
hausner@google.com
e0ed54ea8e
Add named constructor name checking
...
Named constructors may not clash with any other class members.
Add a check but enable it only when --construcotr_name_check
runtime flag is passed to the VM.
Eliminate one named constructor in Process class in core library,
as well as a couple of cases in dart2js.
The dart2js team may want to rename the constructors I changed.
Issue 3990 (http://code.google.com/p/dart/issues/detail?id=3990 )
Review URL: https://chromiumcodereview.appspot.com//10905109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11972 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 18:02:41 +00:00
cshapiro@google.com
da14bf70a7
Add attributions so printf like functions can have their arguments checked.
...
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.
Review URL: https://chromiumcodereview.appspot.com//10869063
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
tball@google.com
90bd62f488
Fixed parsing of parameterized type test assert statement in production mode.
...
BUG=3741
TEST=Verified with bug's test, plus all VM tests.
Review URL: https://chromiumcodereview.appspot.com//10911042
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11843 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 21:42:20 +00:00
hausner@google.com
dce2c6a275
Catch illegally declared constructors
...
Constructors cannot be abstract or static.
Review URL: https://chromiumcodereview.appspot.com//10910079
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11842 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 21:28:48 +00:00