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