Commit Graph

1286 Commits

Author SHA1 Message Date
regis@google.com fb6d24945f Introduce class TypeRef in the VM to fully support recursive types.
Fix issues 15244, 15148, 14869, 14000, and 13688 (was closed, but fragile).

Note that the current solution is not final as it may not be correct in more
complex cases not yet covered by language tests.
The final solution will require a 'trail' instead of a simple mark bit to
prevent operations involving recursive types to diverge.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31087 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-11 22:51:19 +00:00
kustermann@google.com e898028b18 Attempt to deflake our status files
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31022 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 15:37:34 +00:00
regis@google.com d1e945994e Improve type test and type equality for generics (issue 15148).
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30546 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 21:30:51 +00:00
kustermann@google.com 4489c3e7dc Mark language/vm/optimized_identical_test as Pass,Crash on simarm/simmips
Review URL: https://codereview.chromium.org//80593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30503 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 10:02:55 +00:00
regis@google.com 528a7ce3d9 Complete latest spec changes regarding malformed types (see issue 14006).
Update language tests and mark them as failing in dart2js as appropriate.
Mark a few co19 tests as failing.
Mark a dart2js test as failing due to unresolved types.

Unfortunately, https://codereview.chromium.org/53583003/ was uncomplete and
missed a few mappings of malformed types to dynamic.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29924 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 18:46:13 +00:00
johnniwinther@google.com 4b297d0819 Make test of malformed types a dynamic type error.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29897 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 12:28:39 +00:00
iposva@google.com 3dced243b3 Fix http://dartbug.com/14763
- Find main in the exported names of the root library.
- Unify how the main function is called from spawnUri
  and the initial isolate.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29865 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 00:55:41 +00:00
kasperl@google.com d05899db11 Because drt/dartium wraps tests before running them, the new semantics for how to find and run main is essentially already implemented there.
R=kustermann@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29833 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 18:39:20 +00:00
kasperl@google.com 0b71a1a85f Only expect the VM to fail the new 'export main' tests if compiler == none.
R=johnniwinther@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29814 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 16:01:00 +00:00
kasperl@google.com 7cd5977b62 Re-land "Search for main in the exported names of the main library, not in the library itself."
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29812 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 15:40:57 +00:00
kasperl@google.com 306f78c12b Revert "Re-land "Search for main in the exported names of the main library, not in the library itself.""
This reverts commit 2323a2ca0c702657021f0cb2b532402eafd13d49.

R=johnniwinther@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29810 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 15:27:51 +00:00
kasperl@google.com 660e5e5f15 Re-land "Search for main in the exported names of the main library, not in the library itself."
BUG=
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29809 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 14:48:52 +00:00
kasperl@google.com 857a995ce8 Revert "Search for main in the exported names of the main library, not in the library itself."
This reverts commit 74a865df6d58a87dce5a9d8c77cbc70c694ba50b.

TBR'ed.

R=johnniwinther@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29808 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 13:53:12 +00:00
kasperl@google.com b5c09ad8cc Search for main in the exported names of the main library, not in the library itself.
R=johnniwinther@google.com
BUG=http://dartbug.com/14762

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29807 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 13:49:57 +00:00
fschneider@google.com 91ca330ac8 VM: Fix initialization of statics in presence of exceptions.
In a static- or top-level variable v

var v = expr
static v = expr

If the initializer expression expr throws, the VM throws a
CyclicInitializationError when loading v afterwards, even though
this has nothing to do with cyclic initialization.

I'm changing the way implicit static getters and static initializers are
compiled. Static initializers are invoked from static getters.

They look as follows:

get:v {
  if (field.value === transition_sentinel) {
    field.value = null;
    throw new CyclicInitializationError();
  }
  if (field.value === sentinel) {
    field.value = transition_sentinel;
    init:v();
  }
  return field.value;
}


init:v {
  try {
    field.value = expr;
  } catch {
    if (field.value === transition_sentinel) {
      field.value = null;
    }
    rethrow;
  }
}

BUG=http://dartbug.com/5802
TEST=language/lazy_static3_test,
language/throwing_lazy_variable_test,
co19/Language/12_Expressions/30_Identifier_Reference_A08_t02

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29797 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 10:08:47 +00:00
fschneider@google.com 44ee398946 Fix Dartium status after my change.
Isolate.spawn is not yet supported in Dartium.

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29745 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 11:57:20 +00:00
rmacnak@google.com 9a41994d31 Handle metadata with qualified identifiers.
BUG=http://dartbug.com/11857
BUG=http://dartbug.com/14652
R=gbracha@google.com, hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29720 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 01:19:31 +00:00
kasperl@google.com d58e01975d Mark the metadata test as failing on drt and dartium too.
R=ricow@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29676 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 14:46:06 +00:00
kasperl@google.com d897d356a9 Update metadata syntax test to check for non-existing constants and type literals (see issue 14647).
R=bak@google.com, hausner@google.com, scheglov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29667 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 12:57:32 +00:00
fschneider@google.com 96b636b9a1 Update language.status for Dartium.
Some tests require the correct VM options to pass.
Filed issue 14651.

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29663 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 11:39:05 +00:00
lrn@google.com c00d3584d2 Remove implicit_setter_test.
Implicit throwing setters for final fields were reverted from the spec.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29660 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 10:22:11 +00:00
asiva@google.com 0cb03d0eb9 Update the status file to remove the Pass,Fail setting for issue 13266.
I have not been able to reproduce this, I am going to remove the status file update and let it run on the build bots to see if this is still a problem.

R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29582 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 20:08:44 +00:00
johnniwinther@google.com 70e0cd4207 Support checking of malbounded types.
BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29531 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 11:26:37 +00:00
vsm@google.com 74add7c58c Update status file on fixed test
This bug appears to have been fixed by my recent refactoring.

TBR=asiva@google.com

BUG=14003

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29512 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 02:59:03 +00:00
regis@google.com 65379851a8 Implement stricter rule about self referencing typedefs (fix issue 13675).
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29460 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:04:21 +00:00
kustermann@google.com c76242a7b7 Remove passing tests in the status file for the analyzer in --checked mode
TBR=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29353 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 11:56:35 +00:00
kustermann@google.com 94ebff2225 Bugfix in test.dart, adding of specialized test outcomes for analyzer
This CL will:
 - fix a bug in the legacy AnalyzerCommandOutputImpl class (in certain cases
   we did not report that the analyzer was missing a warning).
 - make the outcome of running the analyzer on a test be one of:
   * CompileTimeError
   * MissingCompileTimeError
   * StaticWarning
   * MissingStaticWarning
 - Make status file updates using the new Expectation markers
 - Remove support for '@static-clean':
     Previously running the analyer on a test could either result in
     'Pass' or in 'Fail'. The '@static-clean' annotation has been used
     as a (poor) mechanism to distinguish between errors and warnings.
     Having the 4 markers mentioned above means we can remove '@static-clean'
 - Remove 100 lines of rotted legacy code in our testing scripts.
 - Make a status file entry for every test that has analyzer errors or warnings

R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29350 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 10:39:38 +00:00
hausner@google.com e88158649a Fix language test status
Review URL: https://codereview.chromium.org//42103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29220 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 22:30:00 +00:00
asiva@google.com 910c318003 Fix status file to mark spawnFunction as crashing until 14400 is fixed.
R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29199 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 19:51:57 +00:00
kustermann@google.com b3ba5c5c95 test.py: Support for running tests in checked mode on none-dartium with the browser controller
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29175 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 15:37:33 +00:00
regis@google.com 177276f059 Report compile-time error for const factories redirecting to malformed type
(fix issue 14305).

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29123 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 21:03:11 +00:00
fschneider@google.com 77669aac3e Fix VM issue 1372: super constructor invocation with redirection.
A redirecting super constructor simply passes the phase parameter
on to the target which executes the corresponding phase.

BUG=https://code.google.com/p/dart/issues/detail?id=1372
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29097 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 16:18:20 +00:00
johnniwinther@google.com 1ff2bb97d5 Update status.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29081 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 13:53:26 +00:00
johnniwinther@google.com 12acea6f99 Check const expressions for malformed types.
BUG=http://dartbug.com/14299
R=ngeoffray@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29080 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 13:01:30 +00:00
zra@google.com d507fb5197 Updates status files for fixed ARM builder.
Review URL: https://codereview.chromium.org//36223002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29046 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 23:19:38 +00:00
hausner@google.com e7255e091a Do not generate a compile-time error if there is more than one catch-all clause
This includes catch clauses with malformed types, which are essentially
catch-all clauses.

The spec does not mandate such a compile-time error. (It probably did a long
time ago.)

Fixes issue 8601, 12159, 13019

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28999 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 15:44:28 +00:00
hausner@google.com dbe0e4c9b4 Allow string literal concatenation in import clauses
Added benefit: if there is no interpolation in any of the adjacent
string literals, the compiler concatenates the strings without
invoking Dart code.

Fixes issues 12521, 6877

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28964 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 22:13:42 +00:00
kustermann@google.com d71c26f94d Status file update for ARM
TBR=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28955 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 21:47:55 +00:00
regis@google.com 5a5edb7f0c Report use of malbounded interface in type test.
Fix language tests related to malbounded types (issues 14123, 14131, 14132).

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28943 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 19:49:19 +00:00
kustermann@google.com 41ccaf2334 Mark language/vm/load_to_load_forwarding_vm_test as crashing on arm
Review URL: https://codereview.chromium.org//30683004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28938 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 17:50:53 +00:00
hausner@google.com 0e099ff048 Check that class member names do not conflict with type parameters
Implement check that member names do not conflict with type
parameters. Simplify name checks in class namespace.
Mark typevariable_mirror_metadata_test as failing now that we
report the proper compile time errors. (The test expects no errors.)
Some co19 tests expect a name conflict between a setter X= and type
parameter X. This is still in flux from a language perspective. This
change list does not introduce an compile error for this case.

Fix for issue 13701.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28808 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 17:39:08 +00:00
johnniwinther@google.com e872bec1c3 Update status.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28789 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 07:59:58 +00:00
johnniwinther@google.com c7a9f21e26 Update check for cyclic typedefs.
BUG= http://dartbug.com/9792, http://dartbug.com/11986
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28786 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-17 07:05:18 +00:00
rmacnak@google.com 15bc17777f Add mirror tests for generic interfaces. Add base-language test for malbounded interfaces.
B=http://dartbug.com/14118
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28703 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-16 01:06:56 +00:00
hausner@google.com c646aed258 Implement new mixin application syntax
Implment the class X = S with M syntax, add warning on deprecated
typedef syntax. Also convert a handful of tests. More tests to
be converted subsequently.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28652 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-15 16:13:02 +00:00
aprelev@gmail.com a2a244ea1c Switch dart2js 'typedef name = mixinApplication' to 'class name = mixinApplication'.
BUG=
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28561 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 00:55:17 +00:00
rmacnak@google.com c284d119a1 Base-level test for equality of f-bounded types.
BUG=http://dartbug.com/14000
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28534 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 17:52:55 +00:00
ricow@google.com 526b539a4e Suppress crash in language/source_self_negative_test on drt on mac
We are hitting an assertion, see issue 14003 for details.

R=kasperl@google.com, vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28498 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 06:13:21 +00:00
regis@google.com 42ceee4cba Allow malbounded literal types (fix issue 13952).
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28474 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 20:45:09 +00:00
rmacnak@google.com f6c9abbc43 Add test for using a type literal for a malbounded type. Crashes the VM in debug mode.
R=gbracha@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28428 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-09 23:09:30 +00:00