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
Peter von der Ahé
00bed94e0c
Fix various nits in VM patch files.
...
R=vegorov@google.com
Review-Url: https://codereview.chromium.org/2705593002 .
2017-02-17 16:28:57 +01: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
Regis Crelier
bb649318e4
Remove support for Javascript warnings in the VM.
...
This cl is a clone of cl https://codereview.chromium.org/1683363002/ deleted by
accident. Already LGTM'ed.
Review URL: https://codereview.chromium.org/1690903003 .
2016-02-11 09:16:06 -08:00
Regis Crelier
09954546fb
Add a 'secure' constructor to Random in dart:math returning a cryptographically
...
secure random generator which reads from the entropy source provided by the
embedder for every generated random value.
Add a test.
Fixes #1746 .
R=lrn@google.com
Review URL: https://codereview.chromium.org/1398453004 .
2015-10-15 10:16:03 -07:00
Florian Schneider
b19d518ede
VM: Use const instead of final for constants in runtime libraries.
...
It does not make a difference for optimized code (final does not help in
optimized code either btw), but allows using those constants directly in
unoptimized code.
BUG=
R=srdjan@google.com
Review URL: https://codereview.chromium.org//1284873002 .
2015-08-12 09:40:22 +02:00
Srdjan Mitrovic
caa3cce77e
Fix some TODOs
...
BUG=
R=regis@google.com
Review URL: https://codereview.chromium.org//1263963003 .
2015-08-04 17:13:22 -07:00
srdjan@google.com
ff45a972b5
Refactor and improve code for pow.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//270743004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35946 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 22:18:04 +00:00
srdjan@google.com
05633cfa3d
Revert unused optimization in math.pow and implement same code in Dart as is done in the inlined version.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//243923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35203 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 15:02:42 +00:00
srdjan@google.com
833476b2b3
Improve double pow performance for few simple exponents (0.0, 1.0, 2.0, 3.0).
...
R=iposva@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//237313004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35035 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-14 18:04:51 +00:00
iposva@google.com
383f9c03c2
- Avoid exposing the 64-bit state of the PRNG to Dart code.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//199263005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33778 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 21:27:24 +00:00
iposva@google.com
214ecc0e2a
- Do not rely on time to seed the default PRNG.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//200483003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33704 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-14 17:30:05 +00:00
iposva@google.com
070d3dedf7
- Add a per-isolate pseudo random number generator to the
...
VM internals. This PRNG is not used to generate random
numbers in Dart code.
- Use the PRNG to generate JIT cookies for large constants
if needed during assembly.
- Add the possibility to set an external entropy source
for the PRNG through the C API.
R=asiva@google.com
Review URL: https://codereview.chromium.org//59773007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29950 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 00:59:46 +00:00
lrn@google.com
479386335b
Make pow fail for non-number arguments.
...
Previous change removed a check that was expected by a co19 test.
Review URL: https://codereview.chromium.org//23073005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26351 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:57:52 +00:00
lrn@google.com
5343ef8d32
Add documentation to dart:math pow function.
...
Also add test, and modify implementation to match on the single case where it didn't.
BUG= http://dartdog.com/1952
R=floitsch@google.com
Review URL: https://codereview.chromium.org//22943005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26347 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 12:23:00 +00:00
lrn@google.com
653ee92bfb
Remove int.pow and double.pow from VM library.
...
BUG= http://dartbug.com/10268
R=regis@google.com
Review URL: https://codereview.chromium.org//23129005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26340 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 08:13:13 +00:00
srdjan@google.com
c891612920
Adapt Random class to be able to run in javascript integer compatibility mode.
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//21966003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25753 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-02 23:07:55 +00:00
iposva@google.com
4271b30c89
- Extend the coin test for slightly different scenarios.
...
- Crank the generator a couple of times before returning
a newly allocated one.
Review URL: https://codereview.chromium.org//15356003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23309 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 22:15:07 +00:00
srdjan@google.com
22624fd4e0
Intrinsify random nextState, improve perfromance significantly.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//15502004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22912 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-20 23:59:36 +00:00
srdjan@google.com
d0c639e474
Fix for issue 10534. Implement int.pow correctly using exponentiation by squaring.
...
Note that int.pow is now considerably slower than double.pow.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//14619027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22635 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-13 17:41:58 +00:00
ager@google.com
431954b584
Rename dart:typeddata to dart:typed_data.
...
R=asiva@google.com , floitsch@google.com , srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14426006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21871 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:54:54 +00:00
fschneider@google.com
86da5111ad
Replace scalarlist optimizations and split external array loads into two IL instructions.
...
This CL removes optimized access for scalarlist, and only the new TypedData classes
are optimized. I changed the runtime libraries core and math to use typedData
instead of scalarlist (Uint16List is used in StringBuffer, Uint32List by Math.random).
Instead of using LoadIndexed for internal and external arrays,
split external loads into a load of the backing store and a load
of the element.
v3 <- LoadIndexed(v1, index)
becomes
v2 <- LoadUntagged(v1, ExternalTypedData::data_offset)
v3 <- LoadIndexed(v2, index);
For this I introduce two new representations in the IL:
kUntagged (for values that hold a untagged pointer) and
kNoRepresentation (for instructions accept any input
representation)
Deoptimization does not need to know about kUntagged
since these values can never occur in the environment.
Also with this change:
* fix COMPILE_ASSERT and use it in one place.
* Cleanup IL printer output of deopt ids.
Review URL: https://codereview.chromium.org//12871010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20198 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 12:06:23 +00:00
iposva@google.com
b25d694633
- Avoid wrapping into Mints when generating random numbers.
...
- Update Random number tests.
- Fix String.fromCharCodes signature.
Review URL: https://codereview.chromium.org//12622002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19642 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 17:19:47 +00:00
lrn@google.com
6b4f4b1bab
Change new List(n) to return fixed length list.
...
Deprecate List.fixedLength, add List.filled.
Make Iterable.toList and List.from take "growable" argument,
defaulting to false.
Review URL: https://codereview.chromium.org//12328104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
floitsch@google.com
fb7b9e3c5c
Rename Date to DateTime.
...
BUG=http://dartbug.com/1424
Review URL: https://codereview.chromium.org//11770004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17549 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 12:16:37 +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
srdjan@google.com
44f4011196
Improve performance of String.split for 1 and 0 character results.
...
Other cleanups/improvements in Random.
Review URL: https://codereview.chromium.org//11419194
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15429 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:17:25 +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
iposva@google.com
624273f372
- Avoid going into BigInteger domain for most of the Random state calculation.
...
- Makes it much easier to intrinsify the operation.
Review URL: https://codereview.chromium.org//11339027
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14235 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 00:20:13 +00:00
lrn@google.com
a1faa6f135
Change IllegalArgumentException to ArgumentError.
...
Review URL: https://codereview.chromium.org//10989013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +00:00
iposva@google.com
820d2b33d5
- Fix the implementation of Random.nextBool() and add test.
...
Review URL: https://codereview.chromium.org//10919323
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12458 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-17 21:33:39 +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
iposva@google.com
327ff5d70e
- Change "static final" to "static const" in the runtime/ directory.
...
- Fixed parsing of top-level static const.
Review URL: https://chromiumcodereview.appspot.com//10883071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11425 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 23:51:37 +00:00
ager@google.com
722c1a3ce6
Deprecate Math object in corelib in favor of dart:math library.
...
Review URL: https://chromiumcodereview.appspot.com//10829459
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:33:01 +00:00
iposva@google.com
a7959423cd
- Use the unified dart:math library in the VM.
...
Review URL: https://chromiumcodereview.appspot.com//10831301
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10698 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-15 04:50:14 +00:00