Commit Graph

76 Commits

Author SHA1 Message Date
Alexander Markov 6195ea86bc [vm] Remove irregular type arguments parameter from factories
In the VM, factory constructors always had an extra "type arguments"
parameter, even if class is not generic. Factory constructor bodies
were using class type parameters instead of function type parameters.

This results in extra code when calling non-generic factories
which is slightly inefficient in terms of code size and performance.
Also, it creates an additional complexity throughout the system as
factories should be special cased in many places.

This change removes artificial "type arguments" parameter, treating
factory constructors basically as static methods. This matches
kernel AST representation.

TEST=ci

Change-Id: I957583cb2ce9a3c408699880a04036e06b01dd31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/501762
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2026-05-12 06:11:15 -07:00
Ryan Macnak 18aa7d3678 [vm] Refactor runtime entries.
- Reduce header surface area.
- Remove runtime_entry_<arch>.cc, which no longer include code generation.
- Fix signature of DLRT_Enter/ExitSafepoint.
- Give non-leaf runtime functions C linkage, as C++ does not have a defined ABI.

TEST=ci
Change-Id: I21e21a50ad9e4f9b32b1204d755bfa69a2ae9b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430981
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2025-05-27 10:46:24 -07:00
Alexander Markov 84fd647969 [vm] Refactor access to Integer value
Add methods to provide uniform access to values of Dart integers:

  Integer::Value()
  Integer::Value(IntegerPtr)

  Smi::Value()
  Smi::Value(SmiPtr)

  Mint::Value()
  Mint::Value(MintPtr)

Remove

  AsInt64Value()
  AsTruncatedInt64Value()
  AsTruncatedUint32Value()
  GetInt64Value(IntegerPtr)

Also, rename AsDoubleValue() to ToDouble() and
remove unused (FitsIntoSmi, AsValidInteger) and
value-based methods (IsZero, IsNegative).

TEST=ci

Change-Id: I28786ec3a14703574b7a192ead42eeefdbd09106
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380586
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2024-08-19 21:46:26 +00:00
Alexander Markov b48008ebd0 [vm] Remove unused dart:math and Double native methods
Flow graph builder implementation of certain dart:math and Double
methods is now used unconditionally, so corresponding native
methods are never used and can be removed.

This is a follow-up to
https://dart-review.googlesource.com/c/sdk/+/371980.

TEST=ci

Change-Id: Ibca2729f70f39af26a899d99724ce62efc3c8dae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/372180
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-06-18 21:51:16 +00:00
Ryan Macnak 8e6191c7f9 [build] Include FPESAN in UBSAN.
TEST=ubsan
Bug: b/301044910
Change-Id: I608dd742a243bc1ab620c92da46e48270d6b060f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327041
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-09-21 15:16:39 +00:00
Ryan Macnak 8b0f4a8c61 [vm] Update to constexpr in runtime/platform and lib.
TEST=build
Change-Id: I61ebb04f414d36813a99b424fb1bcdb440f68ad5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293801
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2023-04-11 17:43:58 +00:00
Alexander Aprelev a83cfa0990 [vm] Replace Double_hashCode native method with graph intrinsic implementation.
Bug: https://github.com/dart-lang/sdk/issues/50265
TEST=ci
Change-Id: Icae87ce3871bb44599e0f1fa19d8becb3a6fcdec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264240
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-11-17 02:28:37 +00:00
Alexander Aprelev 8c0df46887 [vm] Better implementation of hashCode function.
With this cl hashCode function for integers which used to be identity function becomes `uint128_t hash = value * constant; hash ^= hash >> 64; hash ^= hash >> 32; hash &= 0x3fffffff`. Note that the hashCode has to stay the same across platforms(64-bit/32-bit).

This dramatically improves performance of integer HashSet/HashMap lookups when integers differ in higher bits only(see the issue referenced below).

AOT ARM64 benchmarks:
===
WordSolverIdentity -3.630% (-0.9 noise)
BigInt.parse.0064.bits 15.43% (0.9 noise)
BigInt.parse.4096.bits 40.80% (1.6 noise)
BigInt.parse.0256.bits 42.01% (2.3 noise)
BigInt.parse.1024.bits 50.91% (2.6 noise)
IntegerSetLookup.DefaultHashSet 549916% (14727.6 noise)
IntegerSetLookup.DefaultHashSet 597150% (55520.2 noise)
IntegerSetLookup.HashSet 846924% (78126.7 noise)
IntegerSetLookup.HashSet 791864% (107221.1 noise)
===

AOT x64:
===
Havlak -14.25% (-1.7 noise)
DartMicroBench.Int64Div -7.091% (-1.2 noise)
ObjectHash.manual.5 -9.541% (-0.8 noise)
AsyncLiveVars.LiveInt1 4.726% (0.8 noise)
IsolateJson.SendAndExit_Decode1MBx1 9.067% (0.8 noise)
SplayHarderLatency 4.629% (0.9 noise)
TypedDataDuplicate.Float64List.32.loop 35.01% (1.8 noise)
IntegerSetLookup.DefaultHashSet 627996% (124823.6 noise)
IntegerSetLookup.HashSet 1245362% (244705.3 noise)
===

JIT ARM64:
===
IntegerSetLookup.DefaultHashSet_Random 73.80% (1.2 noise)
IntegerSetLookup.DefaultHashSet 344999% (6202.9 noise)
IntegerSetLookup.HashSet 483731% (7845.7 noise)
===

JIT x64:
===
CollectionSieves-Set-removeLoop -6.294% (-0.9 noise)
Utf8Encode.ru.10M 59.11% (0.8 noise)
Utf8Encode.ru.10k 71.62% (0.9 noise)
Utf8Encode.zh.10M 53.93% (0.9 noise)
Utf8Encode.ne.10k 71.34% (0.9 noise)
Utf8Encode.zh.10k 72.52% (0.9 noise)
Utf8Encode.ne.10M 53.17% (0.9 noise)
IntegerSetLookup.HashSet_Random 27.80% (1.1 noise)
String.replaceAll.String.Zero 8.659% (1.2 noise)
IntegerSetLookup.DefaultHashSet_Random 96.20% (1.3 noise)
IntegerSetLookup.HashSet 481037% (18028.8 noise)
IntegerSetLookup.DefaultHashSet 454450% (31501.3 noise)
==

Fixes https://github.com/dart-lang/sdk/issues/48641
TEST=ci

Change-Id: Id982e4aa30cd1d6a63f93c73917a8b921ad464a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-10-20 20:31:20 +00:00
Alexander Markov 307bc3ef2c [vm] Faster double.toInt() in AOT mode
double.toInt() micro-benchmark on AOT/x64:
Before: BenchToInt(RunTime): 438.67258771929824 us.
After:  BenchToInt(RunTime): 118.8603434955726 us.

double.floor() micro-benchmark on AOT/x64:
Before: BenchFloor(RunTime): 537.2132688691916 us.
After:  BenchFloor(RunTime): 321.2052352657781 us.

TEST=ci
Issue https://github.com/dart-lang/sdk/issues/46876
Issue https://github.com/dart-lang/sdk/issues/46650

Change-Id: Id37c827bceb7f374ae5b91b36871ccf0d9e92441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211620
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-09-01 16:57:59 +00:00
Vyacheslav Egorov 493fe772d0 [vm] Rewrite Double.~/ in pure Dart
Avoid going into runtime for every operation.

https://github.com/dart-lang/sdk/issues/46855

TEST=ci

Change-Id: I5ab1d224f895342c8dd7fb9b8a7a98cfb0359db0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209705
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-08-10 17:54:40 +00:00
Zach Anderson f407419d0a [vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_
This relands https://dart-review.googlesource.com/c/sdk/+/205633
but without renaming TARGET_OS_IPHONE to DART_TARGET_OS_IPHONE.
It also changes uses of TARGET_OS_IOS to
DART_TARGET_OS_MACOS_IOS to be consistent with the rest of the
VM.

TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.

See: https://github.com/dart-lang/sdk/issues/46499

TEST=It builds.

Change-Id: Ie775c19dd23cfdf5f65e5ebc6ee4ec3a561676fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205860
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-07-02 19:06:45 +00:00
Slava Egorov 42164cc140 Revert "[vm] Prefix HOST_OS_* and TARGET_OS_* with DART_"
This reverts commit aa9201b76b.

Reason for revert: blocks G3 roll (b/192627187)

Original change's description:
> [vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
>
> TargetConditionals.h for XCode 13 defines several
> TARGET_OS_* preprocessor symbols that confuse the
> Dart build. There is probably a more targeted fix
> for this, but renaming the symbols that Dart uses
> will also prevent this problem if more symbols
> are added to the platform headers in the future.
>
> See: https://github.com/dart-lang/sdk/issues/46499
>
> TEST=It builds.
> Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
> Commit-Queue: Zach Anderson <zra@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,zra@google.com,asiva@google.com

Change-Id: Ib06ca418c7e9d3b4df62c72c033cd39f462f7667
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205790
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-07-02 14:02:02 +00:00
Zach Anderson aa9201b76b [vm] Prefix HOST_OS_* and TARGET_OS_* with DART_
TargetConditionals.h for XCode 13 defines several
TARGET_OS_* preprocessor symbols that confuse the
Dart build. There is probably a more targeted fix
for this, but renaming the symbols that Dart uses
will also prevent this problem if more symbols
are added to the platform headers in the future.

See: https://github.com/dart-lang/sdk/issues/46499

TEST=It builds.
Change-Id: I3b33a03b4a9a14b76d55fe12f8cdefec4b3c3664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205633
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-07-02 06:02:48 +00:00
Ryan Macnak b1c09ecd8f [vm] Make naming more consistent when converting between handles, tagged and untagged pointers.
Currently we have things called XPtr which are not what you get from ptr().

Old world:
handle->raw() returns RawObject* (tagged)
raw_obj->ptr() returns RawObject* (untagged)

After 6fe15f6df9:
handle->raw() returns ObjectPtr
obj_ptr->ptr() returns ObjectLayout*

New world:
handle->ptr() returns ObjectPtr
obj_ptr->untag() returns UntaggedObject*

TEST=ci
Change-Id: I6c7f34014cf20737607caaf84979838300d12df2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149367
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-01-15 23:32:02 +00:00
Ryan Macnak 2707880f1b [vm] Fix various UBSan failures.
Bug: https://github.com/dart-lang/sdk/issues/39427
Change-Id: I74e0eee623d88005fb2893d03e284a87daa09260
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146696
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-05-07 19:40:18 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
Ryan Macnak d08c203e30 Add various missing argument checks to dart:io natives.
Avoid reflective access to mirrors creating invalid reflectees.

Change type checks in embedding API functions to return UnhandledExceptionErrors instead of APIErrors so they are catchable by Dart.

Fixes invocation_fuzz_test.

Bug: https://github.com/dart-lang/sdk/issues/15274
Bug: https://github.com/dart-lang/sdk/issues/23869
Bug: https://github.com/dart-lang/sdk/issues/37680
Change-Id: Ife3e3cb894c59620b0318e4e08947a3d1d45bab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-08-01 23:32:40 +00:00
Matthew Dempsky c3c43689d5 [vm] Remove platform/math.h
It seems safe to assume that <math.h> works on all supported platforms
now.

Change-Id: Iffb6618f6035c8cc10657c55ccc3ca7cd5d9525c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107825
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Matthew Dempsky <mdempsky@google.com>
2019-07-02 18:22:58 +00:00
Daco Harkes 14ff2110ce [vm] refactor native entry and native entry type arguments
Change-Id: I03efbbf4340de1c8f23c60854ed991671ca2b647
Reviewed-on: https://dart-review.googlesource.com/c/87077
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
2018-12-13 19:29:26 +00:00
Ryan Macnak 30b0b9b723 [vm] Code size reductions:
- Remove dead Isolate::IsTopLevelParsing.
 - Remove dead TraceFunctionEntry/Exit.
 - Migrate more tracing flags to flag_list.h to allow code elimination in non-debug modes.
 - Require an explicit Zone parameter for CheckedHandles.
 - Remove side-effects from RuntimeEntry constructor.

out/ProductX64/exe.stripped/dart_precompiled_runtime 4063464 -> 4046952 (-16k)

Change-Id: Iffd3de25a03d2354cdecf2d79aa761c33ab08bd3
Reviewed-on: https://dart-review.googlesource.com/c/83120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2018-11-08 02:02:39 +00:00
Ryan Macnak 9b5a931b06 [vm] Replace most runtime/vm uses of OS::Print with OS::PrintErr.
Leave --print-snapshot-sizes on stdout because it is parsed by Flutter benchmarks.

Replace all runtime/bin uses of OS::Print with Log::Print.

Bug: https://github.com/dart-lang/sdk/issues/32134
Change-Id: I74aacfb410cdfa9270d06e7f6ab0534520c7c7ba
Reviewed-on: https://dart-review.googlesource.com/60021
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2018-06-13 19:51:40 +00:00
Alexander Markov c3b5939965 [vm] Remove --limit-ints-to-64-bits option and old _Bigint class
Closes https://github.com/dart-lang/sdk/issues/33306

Change-Id: I7088d8b7143edbe24f5cefe4be037ad2006e0625
Reviewed-on: https://dart-review.googlesource.com/58101
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-06-04 20:10:40 +00:00
Alexander Markov 59cdc65dc7 [VM] Relax constraints for integer literals according to int64 spec
Handling of integer literals is corrected according to the informal spec
for the fixed-size integers:

https://github.com/dart-lang/sdk/blob/master/docs/language/informal/int64.md

This change allows unsigned 64-bit hexadecimal literals and MIN_INT64
to be used when running on the VM with --limit-ints-to-64-bits option.

Change-Id: Ied7a7688768bcf4ff40ab5b499dd71622d2c3948
Reviewed-on: https://dart-review.googlesource.com/19400
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2017-11-09 16:58:38 +00:00
Kasper Lund 1db8615e29 Avoid just truncating to the nearby int in double.hashCode.
Preserves the property that doubles and ints that are equal
share the same hash code, but gives different doubles a much
higher chance of having different hash codes.

BUG=https://github.com/dart-lang/sdk/issues/2884

Change-Id: Ia97164087db568f26ffbbd6854ed9c19f81e9611
Reviewed-on: https://dart-review.googlesource.com/15140
Commit-Queue: Kasper Lund <kasperl@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2017-10-23 06:47:20 +00:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Alexander Markov 7a20b6b8d8 Option to truncate integers to 64 bits, part 1 (core VM changes)
This changeset revises --limit-ints-to-64-bits option to
change range of integers from unlimited to int64.
On overflow, integer arithmetic operations silently wrap around and
discard extra bits. No Bigints are allocated in case of overflow.

This changeset is the 1st part in the series of changes, it revises the implementation of integer arithmetic operations. More changes will follow.

R=regis@google.com, zra@google.com

Issue: https://github.com/dart-lang/sdk/issues/30103
Review-Url: https://codereview.chromium.org/2974633003 .
2017-07-10 15:16:40 -07:00
Ryan Macnak 8b96a31c7f Move runtime functions to the more logical runtime_entry.cc.
Make --trace-runtime-calls respect the isolate filter.

R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2827873002 .
2017-04-19 10:22:04 -07:00
Ryan Macnak 877284947b Rename TARGET_OS_* to HOST_OS_*.
Like HOST_ARCH_*, HOST_OS_* describes the OS the VM is running on, which may be different from the OS the VM is generating code for during AOT compilation.

Currently we conflate the two when emitting AOT as assembly, and we get away with it because Flutter only uses assembly for targeting iOS and one can only target iOS from a Mac, but we expect to use assembly for Android as well so native tools can unwind Dart frames.

R=zra@google.com

Review-Url: https://codereview.chromium.org/2750843003 .
2017-03-15 13:11:05 -07:00
Zachary Anderson 2e4dfd3a2d clang-format runtime/lib
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2468093007 .
2016-11-04 12:14:41 -07:00
Siva Annamalai de5a1c8dac Remove support for pretenuring as it is not fully implemented and is currently turned on for a very specific case (double to string for one byte strings).
R=fschneider@google.com

Review URL: https://codereview.chromium.org/2119633002 .
2016-07-01 12:59:19 -07:00
Florian Schneider be298b60e9 VM: Remove unnecessary _Num class from runtime/lib.
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1874853002 .
2016-04-08 16:25:52 -07:00
Srdjan Mitrovic 7b04897743 Fix fix
BUG=

Review URL: https://codereview.chromium.org//1166523005
2015-06-03 12:39:59 -07:00
Srdjan Mitrovic 12da412110 Fix build
BUG=

Review URL: https://codereview.chromium.org//1160623004
2015-06-03 11:22:46 -07:00
Srdjan Mitrovic c0824e7725 Fix 23563: double unary- operator unstable for NANs
BUG=
R=koda@google.com

Review URL: https://codereview.chromium.org//1160453003
2015-06-03 11:00:28 -07:00
regis@google.com a1c9e2b6b0 Simplify double to bigint conversion.
Remove 3 bigint mutators.
Remove unused support to create vm internal error.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42842 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-13 21:29:44 +00:00
regis@google.com 0220e41d72 New bigint implementation in the vm.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40061 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-09 21:47:44 +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
zra@google.com 9e6655f810 Fixes Android build by using C++ math header instead of C one.
This change also requires prefacing the math calls with
std::, i.e. isinf -> std::isinf.

R=asiva@google.com, koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37839 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 22:15:26 +00:00
asiva@google.com f97858fb06 Move the double isNegative test back to double.cc as it seems to cause some compile issues when it is in object.h
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35695 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 16:49:59 +00:00
asiva@google.com 6cd6e8b52a - implement IsNegative for class Double
- move IsZero under class Integer as it is not used in class Double

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35648 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 18:26:34 +00:00
regis@google.com 7830430adf Implement eager instantiation and canonicalization of type arguments at run
time using a cache in uninstantiated type arguments.
Remove InstantiatedTypeArguments class.
Fix a bug in optimized code: do not update unused type test cache for Smi.
Fix a bug in optimized code on ARM and MIPS in type test cache lookup.

R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32447 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 19:54:33 +00:00
srdjan@google.com b6b3e1f400 Factor out throwing of argument error.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28109 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 18:48:37 +00:00
kmillikin@google.com 4f80ef09df Change Bool::Get to return a handle instead of a pointer to a raw object.
Replace occurrences of 'expr ? Bool::True() : Bool::False()' with simply
'Bool::Get(expr)' and analogously for its negation.  The pointer to the raw
object can still be extracted with 'Bool::Get(expr).raw()'.

R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26770 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 08:38:56 +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
zra@google.com 78ed504ed0 Adds a flag to the standalone vm to throw an exception on 53-bit integer overflow.
R=asiva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23640 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-05 17:18:07 +00:00
zra@google.com 40f0800c10 Ensures that Bigints returned to Dart are all checked by Integer::AsValidInteger.
Rather than by ad-hoc checks at the point of return.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23151 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 15:45:17 +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