Commit graph

85 commits

Author SHA1 Message Date
Lasse R.H. Nielsen 4f9645c406 Add trailing commas to argument and parameter lists.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2060163002.
2016-07-06 15:17:46 +02:00
Lasse R.H. Nielsen 65421fb2bf Various fixes to wording and typos.
R=eernst@google.com

Review URL: https://codereview.chromium.org/2060773002.
2016-06-14 15:55:06 +02:00
Harry Terkelsen 1745ba77f5 fix all instances of "the the"
BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1980573003 .
2016-05-13 12:38:25 -07:00
Lasse R.H. Nielsen 2a0cc74db1 Expand the definition of potentially constant expression.
The current definition requires the expression to be valid and
compile-time constant if constructor parameters are considered
compile-time constants with types appropriate for their context.

This is necessary but not sufficient, so this CL adds the further
requirement that the expression must also be a valid (not necessarily
constant) expession if the parameters are considered non-constant
variables.

This rules out the case:

    const C(x) : y = const [x];

where the current specification would, technically, allow it as a
potentially constant expression and therefore be a valid const
constructor. In practice it would never work if the constructor is
used with "new" instead of "const".

This is not really a specification *change* - existing implementations has this restriction anyway.

Addressed the concern of #24970.
BUG= http://dartbug.com/24970
R=eernst@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org/1465473002 .
2016-01-20 13:21:39 +01:00
Lasse R.H. Nielsen fd59c87146 Make ?? a compile-time constant operator.
Update specification, change analyzer, VM and dart2js.

Fixes issue #25054.
BUG= http://dartbug.com/25054
R=floitsch@google.com, gbracha@google.com

Review URL: https://codereview.chromium.org/1493693002 .
2016-01-12 12:30:07 +01:00
Gilad Bracha a0e4f28160 Unnamed libraries do not cause warnings.
BUG=
R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org//1299283002 .
2015-08-19 13:21:29 -07:00
Gilad Bracha b11670f899 Ensure null aware ops on statics are unsurprising.
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1218483004.
2015-06-29 15:33:06 -07:00
Gilad Bracha 4fb7507c3e Remove mixin DEP annotation from header
BUG=

Review URL: https://codereview.chromium.org//1202733006.
2015-06-24 12:40:08 -07:00
Gilad Bracha 2c7234bd61 Mixin DEP changes
BUG=
R=eernst@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//1190453003.
2015-06-24 12:33:18 -07:00
Gilad Bracha d8b47ad0a6 Added language spelling out static type of prefix objects
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1195133002.
2015-06-23 11:41:35 -07:00
Kevin Millikin 2e5a132fe1 Fix a typo in the specification of switch cases.
In the grammar, labels must before the word 'case'.  However, in the
description the labels come between the word 'case' and the comparison
expression.  Closes #22127.

BUG=
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1189523004.
2015-06-16 12:02:16 +02:00
Gilad Bracha f71b48a041 Revise static typecheck rules for for-in.
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1184183010.
2015-06-15 17:50:37 -07:00
Gilad Bracha b34c19d0ce Add missing clause for LUB(Bottom, T)
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1179113010.
2015-06-15 16:20:30 -07:00
Gilad Bracha 1ab7736b57 Added type rules for e++ and friends
BUG=
R=paulberry@google.com

Review URL: https://codereview.chromium.org//1183493005.
2015-06-15 15:00:55 -07:00
Gilad Bracha 2b95ed1ae1 Make use of call on Function exempt from warnings,
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1176853003.
2015-06-15 13:24:10 -07:00
Gilad Bracha 67b99e4b33 Make sure we use lexical scope consistently when dealing with prefixes.
BUG=
R=lrn@google.com, paulberry@google.com

Review URL: https://codereview.chromium.org//1184583002.
2015-06-12 17:38:42 -07:00
Gilad Bracha 58708e3ad1 Specify behavior of e?.v++ and e?.v--
BUG=
R=hausner@google.com

Review URL: https://codereview.chromium.org//1181733003.
2015-06-11 15:01:06 -07:00
Gilad Bracha c448d7fb0b Make package: URI schema implementation dependent per latest DEP.
BUG=
R=lrn@google.com

Review URL: https://codereview.chromium.org//1170393002.
2015-06-10 12:36:31 -07:00
Gilad Bracha 89607f06e9 Updates for 1.10: warnings when for-in uses an expression that has no iterator; assorted typos.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org//1171283002.
2015-06-09 15:44:31 -07:00
gbracha@google.com 099e37e003 Changes for TC52 3rd edition
R=eernst@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44726 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 01:45:31 +00:00
gbracha@google.com ae83a06400 Assorted fixes to async: yield may suspend in async* methods; yield* skips emptysequences; definition of flatten.
R=hausner@google.com, paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44569 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-18 23:18:06 +00:00
gbracha@google.com e259e8f86f Correct reference to definition of flatten
Review URL: https://codereview.chromium.org//993213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44391 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-11 00:59:51 +00:00
gbracha@google.com c82a633c65 Strengthen warnings for return types of async/async*/sync* functions.
R=paulberry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43420 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 19:06:09 +00:00
gbracha@google.com 609e6ebb66 Clarify behavior of iterables and iterators with sync*.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43415 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-03 18:19:11 +00:00
gbracha@google.com dff3b74a05 Remove restrictions on scope of doc comments.
R=sethladd@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42940 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-15 23:51:50 +00:00
gbracha@google.com 1bc0e8dc1d insure type vars are bound properly when executing field initializers. Also correct assoc tablefor ?:
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42785 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-12 18:52:14 +00:00
gbracha@google.com 8672603473 Fix name of spawnIsolate to spawn.
Review URL: https://codereview.chromium.org//808373003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42560 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-23 00:23:31 +00:00
gbracha@google.com 73de52110f Correct last revision
Review URL: https://codereview.chromium.org//825463002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42554 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 19:51:21 +00:00
gbracha@google.com 509c16c9cb Fix error in grammar for assignableExpression
Review URL: https://codereview.chromium.org//817723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42553 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 19:06:55 +00:00
gbracha@google.com 0faaa550d1 Fix circular dependency between null equality and identity.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42552 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 18:58:06 +00:00
gbracha@google.com 38606de2a5 Change static typing so that inherited noSuchMethod silences errors,
including undefined abstract members.

R=justinfagnani@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42521 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 18:44:39 +00:00
gbracha@google.com 11db20e680 Main function of a script can be function valued getter.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42464 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-18 18:55:30 +00:00
eernst@google.com 93f4f00719 Working insertion of hash values; added a few labels in spec
Hash values are now computed for each "paragraph" starting with \LMHash
(which includes subsequent grammar, dartCode, itemize blocks, but stops
at \section-like commands).  Now addlatexhash.dart expects three arguments
(first the source latex file, then the destination simplified and
hash-value-annotated latex source file, and finally a file name used to
create the list of hash values emitted).  Adjusted testing accordingly.
Added a test for robustness of the hash value generation: It is checked
that lots of different "unimportant" changes make no difference for the
generated hash values (e.g., we can add/remove comments, change white
space, add \commentary{..} etc. without changing the hash values).

In order to ensure that all "structure" commands in the spec have a label,
I added an \LMLabel{..} a handful of places, following the style which is
used throughout the spec.

In dart.sty, the \renewcommand that made \LMHash{} produce a fixed
hash value has been removed such that the actual hash values are now
inserted into the generated spec PDF/DVI file.  Tests have been adjusted
to handle this difference between the spec with and without hash values
when comparing the two.

R=gbracha@google.com, lrn@google.com, ricow@google.com

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

Reverted: https://code.google.com/p/dart/source/detail?r=41662

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41687 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:41:55 +00:00
eernst@google.com 36122ae11f Recovered \LM.. commands
Recovered the \LM.. commands inserted in order to support SHA1 hash value
markers on spec paragraphs; also recovered a couple of changes directly
required for the \LM.. commands to work.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41686 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-12 08:27:43 +00:00
eernst@google.com 4074b50818 Revert "Working insertion of hash values; added a few labels in spec"
This reverts commit r41658.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41662 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 11:39:40 +00:00
eernst@google.com 9570a582eb Working insertion of hash values; added a few labels in spec
Hash values are now computed for each "paragraph" starting with \LMHash
(which includes subsequent grammar, dartCode, itemize blocks, but stops
at \section-like commands).  Now addlatexhash.dart expects three arguments
(first the source latex file, then the destination simplified and
hash-value-annotated latex source file, and finally a file name used to
create the list of hash values emitted).  Adjusted testing accordingly.
Added a test for robustness of the hash value generation: It is checked
that lots of different "unimportant" changes make no difference for the
generated hash values (e.g., we can add/remove comments, change white
space, add \commentary{..} etc. without changing the hash values).

In order to ensure that all "structure" commands in the spec have a label,
I added an \LMLabel{..} a handful of places, following the style which is
used throughout the spec.

In dart.sty, the \renewcommand that made \LMHash{} produce a fixed
hash value has been removed such that the actual hash values are now
inserted into the generated spec PDF/DVI file.  Tests have been adjusted
to handle this difference between the spec with and without hash values
when comparing the two.

R=gbracha@google.com, lrn@google.com, ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41658 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 10:08:12 +00:00
gbracha@google.com 27db1ea7af orrect cut/paste error that replicated an item in the list of constants and (worse) deleted another.
Review URL: https://codereview.chromium.org//715653003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41647 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 20:23:06 +00:00
eernst@google.com bf339367c3 Introduced hash valued location markers in the spec
Introduced support for adding SHA1 hash valued location markers
at several levels in the language specification, added long explanatory
comment at the end, added a script 'addlatexhash.dart' to normalize
spacing, remove comments, etc., in the spec, such that the hash values
are more robust than they would be with a direct usage of the spec.

The script passes the "dvi2tty test", that is, when the location markers
are empty, the resulting *.dvi files created from dartLangSpec.tex and
from the version processed by the script give rise to the same text via
dvi2tty, i.e., the script does not destroy the spec.

R=gbracha@google.com, ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41191 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-20 14:02:23 +00:00
gbracha@google.com 3f7b6cf6a0 Fix typos due to TeXShop quote (mis)processing
R=eernst@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41078 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-13 17:12:08 +00:00
gbracha@google.com 8080adfa27 Added missing keywords for async etc.
R=eernst@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40992 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 15:55:04 +00:00
eernst@google.com 422284dc73 Await always awaits
Fetched from https://codereview.chromium.org/572283003/
and committed to resolve commit issue for Gilad Bracha

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40427 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 09:09:55 +00:00
gbracha@google.com 6a6b49775d async/await, async*, sync* and yield
Review URL: https://codereview.chromium.org//498873003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40052 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 20:51:31 +00:00
gbracha@google.com b55e02f083 Add enums to the main grammar entry point.
Review URL: https://codereview.chromium.org//493453003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39386 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:53:33 +00:00
gbracha@google.com 60f5a0c18d Enums.
R=kasperl@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39385 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-19 21:39:45 +00:00
gbracha@google.com f9ccd0d318 Clarify that prefixes may not be built-in identifers
R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38567 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 00:49:05 +00:00
gbracha@google.com b500b5333a Change rules so prefixes obey lexical scope. Do this by basing member access on objects uniformly.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38518 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 20:29:48 +00:00
gbracha@google.com 5dfa44d0a2 Explicitly specify what happens when noSuchMethod(x) is not found
R=lrn@google.com, regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38212 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 20:15:23 +00:00
gbracha@google.com c85dae8a03 Rtrying change to make const classes finals constant
Review URL: https://codereview.chromium.org//387733003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38139 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 23:13:07 +00:00
gbracha@google.com 53f5ad1cd3 Integrated deferred loading into main spec.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38091 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-09 17:19:51 +00:00
gbracha@google.com 12422f1083 Replace subtyping with << for function type emulation.
R=jwren@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38072 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-08 21:46:38 +00:00