Commit Graph

39 Commits

Author SHA1 Message Date
Peter von der Ahé e7c6416f80 Run bootstrap test in strong mode
Fixes https://github.com/dart-lang/sdk/issues/33811

Change-Id: Ie4863d5a1e8932bbf5d16a3a84236f7a66d27534
Reviewed-on: https://dart-review.googlesource.com/65084
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2018-07-18 11:21:23 +00:00
Peter von der Ahé cc1a7b35d0 Update SDK wrt to void and invalid returns
Change-Id: Ia1a6b056351beb9faddc2c6e86280983a2395d45
Reviewed-on: https://dart-review.googlesource.com/65140
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2018-07-17 13:37:47 +00:00
Lasse R.H. Nielsen 6bc7288e70 Fix fused UTF-8/JSON decoding.
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.

Added test to check this.

Fixes #33251

Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-05-29 12:34:25 +00:00
Vyacheslav Egorov 1142aaa713 [VM] Cleanup more typing issues in convert_patch.
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: Id39d6e44f49b539a5416ea6f5f62f252ee5a4c94
Reviewed-on: https://dart-review.googlesource.com/15122
Reviewed-by: Erik Corry <erikcorry@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-19 14:01:07 +00:00
Vyacheslav Egorov a771e05fa4 [VM] Fix typing issues in convert_patch.dart
Bug: https://github.com/dart-lang/sdk/issues/31052
Change-Id: I65cea214cb4f053850a05c107f78a8af1bdde81f
Reviewed-on: https://dart-review.googlesource.com/12446
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2017-10-10 11:09:11 +00:00
Peter von der Ahé e8aef37eac Clean up patches so they can be compiled by Fasta.
Change-Id: Ie436375c78496366accf0ba82938e54cbe30b143
Reviewed-on: https://dart-review.googlesource.com/3001
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2017-10-05 14:05:50 +00:00
Samir Jindel 195c62ff0c [kernel] Begin reducing type erasure.
1. We no longer remove type parameters on functions.
2. We no longer remove type arguments at call sites.
3. We allow non-captured function type parameters to be used outside closures. 

Bug:
Change-Id: I116ec54c90b04be90e1157042c22797e57a7c51c
Reviewed-on: https://dart-review.googlesource.com/9342
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2017-10-03 14:33:30 +00:00
Peter von der Ahé 327d8d1b0d Fix various warnings found in runtime patches.
Change-Id: I2dd82849df1bfe32c99577f6604e6a4501759697
Reviewed-on: https://dart-review.googlesource.com/7709
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
2017-09-22 13:12:48 +00:00
Florian Loitsch f6020b6d7e Make json-maps implement Map<String, dynamic>.
Fixes #26407.
http://dartbug.com/26407

R=lrn@google.com

Review-Url: https://codereview.chromium.org/1980663002 .
2017-05-02 14:51:32 +02:00
Erik Corry 4b9bba55b4 Stoppp using trippple consonants
R=ahe@google.com
BUG=

Review-Url: https://codereview.chromium.org/2833073002 .
2017-04-21 17:50:13 +02:00
Jacob Richman a129931cda The formatter struggles a bit with these files.
BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2765523003 .
2017-03-21 18:00:52 -07:00
Kevin Millikin 50348f5f22 Fixes to patch files necessary to use the analyzer
The analyzer has a stricter patch parser than the VM.  Patch files
cannot change signatures of patched members.  Specifically, they cannot
change:

  - the return type
  - a parameter's name
  - a parameter to an initializing formal
  - an optional parameter's default value

BUG=
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2612043002 .
2017-01-05 12:23:51 +01:00
Lasse R.H. Nielsen 44594277e1 Make core libraries use generic method syntax.
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math

The HTML related libraries are not changed. The templates used to build them
must be changed as well.

R=floitsch@google.com

Committed: https://github.com/dart-lang/sdk/commit/68818315b5cc6c63fea0e10e90f515f6083ec095
Committed: https://github.com/dart-lang/sdk/commit/3f74b8d82edca8c342c43306714e68ddf84548e1
Review-Url: https://codereview.chromium.org/2529393002 .
2017-01-03 12:05:40 +01:00
Lasse Reichstein Holst Nielsen 3f74b8d82e Make core libraries use generic method syntax.
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math

The HTML related libraries are not changed. The templates used to build them
must be changed as well.

R=floitsch@google.com

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

Committed: https://github.com/dart-lang/sdk/commit/68818315b5cc6c63fea0e10e90f515f6083ec095
2016-12-14 12:24:36 +01:00
Lasse Reichstein Holst Nielsen 68818315b5 Make core libraries use generic method syntax.
Removes comment syntax where possible for the following platform libraries:
* async
* collection
* convert
* core
* internal
* io
* math

The HTML related libraries are not changed. The templates used to build them
must be changed as well.

R=floitsch@google.com

Review URL: https://codereview.chromium.org/2529393002 .
2016-12-14 11:32:16 +01:00
Matthias Hausner 1a6d1eca32 Implement @patch annotation for patch class members
Allow members of patch classes to be annotated with @patch. The VM
ignores the annotation. I simply replaces the original method
if the name matches, or reports an error if field names match.

Adding a bit is_patched to members to do more checking remains a
TODO. There are currently no unused bits available, and I don’t want
to increase the size of Function objects for this.

BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/2230383003 .
2016-08-10 12:54:57 -07:00
Matthias Hausner e11ca24053 Use metadata annotation @patch for patch classes
Annotate patch classes and top-level patch functions with @patch
instead of the pseudo-keyword patch. This allows the analyzer
to read patch files, and matches the syntax that dart2js uses.

The deprecated syntax is still supported, but a warning is printed when detected.

BUG=

Review URL: https://codereview.chromium.org/2220883004 .
2016-08-09 09:48:03 -07:00
Florian Loitsch fe1fda0766 Make dart:convert strong mode clean.
Also removes the ChunkedConverter.

R=lrn@google.com

Review URL: https://codereview.chromium.org/1964953003 .
2016-05-11 16:15:31 +02:00
Florian Loitsch 50bdab3841 Steps towards making the convert library strong-mode compliant.
This version has a few deprecated methods. In a future release they will be removed.

See https://codereview.chromium.org/1827803002 for the final patch (once the deprecated methods have been removed).

R=leafp@google.com, lrn@google.com

Committed: https://github.com/dart-lang/sdk/commit/4ab1219bf93a33a2a3d4803e053ccd70ce190371
Reverted: https://github.com/dart-lang/sdk/commit/045a3753665268761508c8053e0ee84372d9ef35

Review URL: https://codereview.chromium.org/1847843002 .
2016-04-12 20:59:21 +02:00
Florian Loitsch 045a375366 Revert "Steps towards making the convert library strong-mode compliant."
This reverts commit 4ab1219bf9.

Review URL: https://codereview.chromium.org/1881553002 .
2016-04-11 19:52:57 +02:00
Florian Loitsch 4ab1219bf9 Steps towards making the convert library strong-mode compliant.
This version has a few deprecated methods. In a future release they will be removed.

See https://codereview.chromium.org/1827803002 for the final patch (once the deprecated methods have been removed).

R=leafp@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/1847843002 .
2016-04-11 19:16:04 +02:00
Lasse R.H. Nielsen de68aaa595 Clean up JSON parsing code.
Fixes some hard-to-find bugs and warnings.
Improves the layout of all the constants.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//1150033013
2015-06-04 14:55:32 +02:00
iposva@google.com 7b7cbb4017 - Allow implementations to hook into the Utf8Decoder.convert method.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43033 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 01:29:14 +00:00
lrn@google.com de2b7c40d4 Optimize creation of ASCII strings in UTF-8 JSON parser.
Recognize that the string is ASCII only during scanning, and just use
String.fromCharCodes directly, instead of interpreting as UTF-8 first.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42857 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-14 10:22:53 +00:00
lrn@google.com e3d4226c63 Make JSON.fuse(UTF8) be more efficient by not creating intermediate string.
Adds JsonUtf8Encoder class that can be used directly, or through jsonEncoder.fuse(utf8Encoder) or jsonEncoder.startChunkedConversion(_Utf8EncoderSink).

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41479 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-04 10:25:41 +00:00
lrn@google.com 8050a0392b Fix assertion not holding (calling with start==end) and typo.
Review URL: https://codereview.chromium.org//677423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41317 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 14:00:13 +00:00
lrn@google.com 7485b6fff2 Fix type-errors.
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41315 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 13:33:49 +00:00
lrn@google.com a3dd8cd26f Fix typo reutrn -> return typo.
R=whesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41314 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 13:05:21 +00:00
lrn@google.com e2e17c3f26 Make JSON parsing work as a chunked conversion sink.
This allows JSON parsing to work on individual chunks of source instead
of collecting and concatenating all the parts before parsing.

This is made in anticipation of having a UTF-8 version that parses directly
on the input codes, without creating a String first.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41311 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 12:11:39 +00:00
lrn@google.com 109c16e204 Add import of dart:typed_data in dart:convert.
Was previously handled by patch file for VM, and was now missing
for dart2js.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39585 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 08:53:50 +00:00
lrn@google.com 32011bb93e Use Uint8List for byte lists in dart:convert.
BUG= http://dartbug.com/11971
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39580 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 08:24:49 +00:00
lrn@google.com 4feb28b5c2 Fix error message for unexpected characters in JSON.
The current version treats any unexpected character as a number
error.

R=kustermann@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38185 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 11:08:36 +00:00
lrn@google.com d433906b18 Fix error message for unexpected characters in JSON.
The current version treats any unexpected character as a number
error.

R=kustermann@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38184 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 10:40:50 +00:00
lrn@google.com d983493c1a Add extra information to FormatException.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38181 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 07:47:45 +00:00
lrn@google.com cf8ac68c0d Make VM JSON parser parse doubles without doing substring.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38155 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 12:14:23 +00:00
lrn@google.com cb3e82c2f8 Optimize VM parsing of JSON String and number literals.
Extracted from https://codereview.chromium.org/181543004/

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34297 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-24 10:24:20 +00:00
lrn@google.com d0651286c6 Make _Utf8Encoder create its buffer through an external function.
This allows the VM to use a Uint8List, where dart2js still has to use a plain List (due to versions of IE not supporting typed data).

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32193 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-31 13:11:25 +00:00
lrn@google.com 3408c5bc88 Make the result of JSON.decode be marked by "null" in the reviver.
They are currently marked by "", which can match a property as well.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26768 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:25:34 +00:00
lrn@google.com 6764a2462c Made old dart:json library use convert to parse JSON.
Make convert library use "null" as marker for top-level value in reviver calls.
Moved JSON implementation into convert_patch files.
Move error classes into convert library, and reexport from dart:json.

R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26767 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 07:56:12 +00:00