Commit Graph

33 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen 7cc4d76a30 Add tryParse alternatives to parseFunctions.
Deprecate `onError` arguments to parse methods.

Change-Id: Iac1d87416abc8a73ce1853edffab49df8a8cb5fe
Reviewed-on: https://dart-review.googlesource.com/50723
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-04-12 13:16:49 +00:00
Lasse R.H. Nielsen 0b58c4bd10 Change some constant declarations to lowerCase.
Retain the old values.

Reapply of https://dart-review.googlesource.com/c/sdk/+/20680 with fixes
for VM method fingerprints.

Change-Id: Ie14e7ccc3194d5561983348e6b6752728913ff4d
Reviewed-on: https://dart-review.googlesource.com/20664
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 12:59:14 +00:00
Lasse R.H. Nielsen e61fc07b58 Revert "Change some constant declarations to lowerCase."
This reverts commit c048cfb178.

Reason for revert: VM code fingerprints needs update.

Original change's description:
> Change some constant declarations to lowerCase.
> 
> Retain the old values.
> 
> Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
> Reviewed-on: https://dart-review.googlesource.com/11520
> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
> Reviewed-by: Florian Loitsch <floitsch@google.com>

TBR=lrn@google.com,floitsch@google.com

Change-Id: I095e8198304ca4e59b39d30b0fdf0af4945e5231
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/20680
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2017-11-14 11:23:08 +00:00
Lasse R.H. Nielsen c048cfb178 Change some constant declarations to lowerCase.
Retain the old values.

Change-Id: I03bd326f379fe5f96d8f6081a7133de956d745c0
Reviewed-on: https://dart-review.googlesource.com/11520
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2017-11-14 11:13:04 +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
Jacob Richman 4360e99d18 Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Committed: https://github.com/dart-lang/sdk/commit/62be0eacfbb36bdc92a05c7c35bb4506621b6a3a
Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-21 10:07:26 -07:00
Jacob Richman 62be0eacfb Revert "Fix observatory tests broken by running dartfmt."
This reverts commit b1f7e6d94673b098c93c187fe3efc45c15f27edc.

BUG=

Review-Url: https://codereview.chromium.org/2767533002 .
2017-03-20 22:19:22 -07:00
Jacob Richman 88f8aacd5f Re-apply rolled back CL to apply dartfmt to runtime.
Fix observatory tests broken by running dartfmt due to line and column changes.
Temporarily reverted formatting for evaluate_activation_test.dart as dartfmt doesn't yet handle multitests.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2759973004 .
2017-03-20 21:44:59 -07:00
Ryan Macnak ea4744a06f Revert "Run dartfmt on all files under runtime."
This reverts commit 15f393f189.

The change caused many service test failures due to changed line numbers.

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2762583003 .
2017-03-20 13:42:55 -07:00
Jacob Richman 15f393f189 Run dartfmt on all files under runtime.
I've omitted files where the formatter output is significantly uglier
than the original code and I'll send those files in a separate CL
with options for how to make the code look reasonable while still
taking advantage of the formatter.

BUG=
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2751423005 .
2017-03-20 13:13:50 -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
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
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 d8a2043098 Fix wrong limit on list index in double.parse.
Review URL: https://codereview.chromium.org//623073002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40892 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 07:03:45 +00:00
lrn@google.com 3192c983bf Dart version of double.parse that works for numbers that can be represented exactly as doubles.
BUG= http://dartbug.com/17711
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40891 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 06:01:44 +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 7a32a75dcc Avoid unnecessary copying when parsing doubles.
R=sgjesse@google.com, vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37863 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-01 11:59:31 +00:00
srdjan@google.com 97021b5861 Add class id constants fields to dart:_internal class 'ClassID'. Use the fields in the library (more uses to come).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37628 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-23 22:41:59 +00:00
srdjan@google.com d44423b766 Add VM internal Dart class 'ClassID' used to manage class-ids of known classes. Next CL: add constant fields corresponding to each class id (smiCid, oneByteStringCid, etc).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37567 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-20 20:56:55 +00:00
lrn@google.com ef66be8610 Change Expect.identical(NaN, x) to not assume NaNs are identical.
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30667 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 10:32:51 +00:00
lrn@google.com e1b4afa85d Add num.parse.
The implementation is still primitive: It calls int.parse, then double.parse, and then fails if it hasn't found a result yet.

BUG= http://dartbug.com/8237
R=floitsch@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30663 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 08:44:38 +00:00
lrn@google.com f5bf3613dc Revert "Add num.parse."
Fails on IE9.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30631 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 14:52:23 +00:00
lrn@google.com e0f3bb3092 Add num.parse.
The implementation is still primitive: It calls int.parse, then double.parse, and then fails if it hasn't found a result yet.

BUG= http://dartbug.com/8237
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30624 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 13:09:04 +00:00
lrn@google.com 4723e4142d Changed names of parameters of double.parse in patches to match change in external signature.
Review URL: https://codereview.chromium.org//23146008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26273 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-16 12:41:07 +00:00
floitsch@google.com 09d7da9250 Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

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

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

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

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23071 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 14:30:16 +00:00
floitsch@google.com 9849fb8900 Revert "Rewrite double.parse."
This reverts commit r23066.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23068 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:28:37 +00:00
floitsch@google.com 75cafec89d Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

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

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23066 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:09:05 +00:00
floitsch@google.com 724fb6b4aa Revert "Rewrite double.parse."
This reverts commit r23062.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23065 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 13:00:05 +00:00
floitsch@google.com d39ef26225 Rewrite double.parse.
BUG= http://dartbug.com/5654
R=lrn@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23062 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-23 12:00:45 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
iposva@google.com 7ae807a19c - Move MathNatives from dart:core to dart:math.
- Split out double and integer parsing from MathNatives.
Review URL: https://codereview.chromium.org//11316031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15032 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 19:42:02 +00:00
lrn@google.com 26fab5183a Move parseInt parseDouble to int/double classes as a static method.
Remove math dependency from core/coreimpl in dart2js.
The existing Math.parseInt and Math.parseDouble are kept *for now*, but
simply redirect to the static methods.
They will be removed in time (when library code is ready for it).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12417 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 07:25:38 +00:00