Commit Graph

38 Commits

Author SHA1 Message Date
regis@google.com a5ee233d1b Make Bigint instances immutable by removing all setters.
This required rewriting a large portion of bigint.dart.

R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43492 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-04 23:56:23 +00:00
fschneider@google.com f83837193f VM: Refactor more intrinsics of GrowableList to use IR builder.
Removing the platform-specific code.

Also contains an unrelated clean-up in snapshot code.

R=zerny@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43283 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 13:39:25 +00:00
vegorov@google.com e31313efea Refactor _ByteDataView.[set|get]<Type> methods to improve their performance.
- don't manually truncate values before passing them to TypedData._[set|get]<Type> - these methods already have truncating semantics;

- don't call into runtime for endianess conversion, implement it in pure Dart instead (with an intent to provide optimized version on platforms that support fast byte-swapping instructions);

- force inlining of these methods (change the order of checks in the ShouldWeInline to guarantee inlining of whitelisted methods).

Unrelated change:

- tweak output of Function::CheckSourceFingerprint to be immediately copy&paste useful.

R=fschneider@google.com
BUG=http://dartbug.com/22107

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43038 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 14:21:49 +00:00
fschneider@google.com c99e78af72 Reland and fix r42951: Tweaks in the VM's typed_data implementations.
Fixed checked mode failure and correct function fingerprints.

R=zerny@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42980 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-19 09:59:45 +00:00
vegorov@google.com 6c597dadbf Revert "Tweaks in the VM's typed_data implementations."
This reverts commit r42951.

Reason: checked mode breakage.

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42952 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 12:14:47 +00:00
fschneider@google.com 1f5208e648 Tweaks in the VM's typed_data implementations.
Moving the throw of RangeError out of the _throwRangeError helper
may benefit LICM, since that block is now considered a method exit (and
not part of a enclosing loop).

_throwRangeError was not inlined because the call site was considered
cold by invocation counters (most programs don't throw RangeError).

Also, I renamed some misleading names in the optimizer.

R=zerny@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42951 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-16 11:30:49 +00:00
regis@google.com 03fa3d1ff4 Mark mutator methods of canonical constants as invisible to reflective access.
R=rmacnak@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42747 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 18:03:31 +00:00
regis@google.com 4dc4caa34d Modify Bigint _mulAdd, _sqrAdd, _estQuotientDigit, and Montgomery _mulMod
methods to return the number of digits processed, so that their intrinsified
versions on 64-bit platforms can process digit pairs.

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42568 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-29 18:40:44 +00:00
fschneider@google.com a49870e721 VM: Remove use of IterableMixinWorkaround from _List, _ImmutableList and _GrowableList.
_List, _ImmutableList and _GrowableList now extend ListBase which uses ListMixin.

Note that typed data lists are still using IterableMixinWorkaround for now.
They will be changed in a separate CL since it involves a few more changes
to the VM.

BUG=dartbug.com/13647
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42061 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-02 10:38:51 +00:00
zerny@google.com 8e807c8550 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41983 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 09:32:43 +00:00
zerny@google.com 84a4135901 Revert "Integrate the Irregexp Regular Expression Engine."
This reverts commit https://code.google.com/p/dart/source/detail?r=41949

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41950 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:36:40 +00:00
zerny@google.com 43ac0c6f33 Integrate the Irregexp Regular Expression Engine.
BUG=http://dartbug.com/19090
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41949 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-25 13:10:21 +00:00
srdjan@google.com eddeb860eb Restructure inlining of Bigint accessors, use consistent approach, fixes a potential crash.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41840 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 22:28:49 +00:00
hausner@google.com 4bf624ebc0 Implement enum types in VM
Fully support enum types as per language spec version 1.6.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41815 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 23:10:07 +00:00
regis@google.com 6a2f5e6297 Implement bigint intrinsics on arm64.
Implement umaddl arm64 instruction (assembler, disassembler, simulator, tests).
Finish implementing cbz and cbnz arm64 instructions (assembler, tests).

R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41608 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-07 17:19:44 +00:00
vegorov@google.com 41bc926f6c Suppress inlining of complex Bigint intrinsics.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41558 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 13:56:19 +00:00
johnmccutchan@google.com fb7f8551b4 Add unboxed Mint for X64
BUG=
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41233 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-21 18:11:43 +00:00
regis@google.com 3cf27d550e Disable 2 intrinsics causing optimizer issues (under investigation).
Rename 2 intrinsics (was not the issue).
Added a static cast to eliminate a warning on Windows.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40825 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 23:01:40 +00:00
regis@google.com f7ac8841a9 Provide ia32 intrinsics for bigint add, sub, quotient digit estimation, and
Montgomery mulMod.
Refactored bigint dart code to allow for the above intrinsics.
Added support for unsigned  division on ia32 and added assembly tests.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40822 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 18:49:41 +00:00
regis@google.com cff788380b Eliminate global argument passing list.
Refactor _mulAdd to perform carry propagation and update intrinsic on ia32.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40816 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 16:47:48 +00:00
regis@google.com 50086cbc75 Resubmit reverted r40623 unchanged after GC issue fixed.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40815 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 16:21:23 +00:00
lrn@google.com 28937c86ae Optimize _GrowableArray._join and _StringBase._interpolate.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40800 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 08:28:00 +00:00
whesse@google.com 1f87b5feba Revert r40623, "Refactor bigint _sqrTo in preparation of intrinsification."
This reverts commit r40623, https://codereview.chromium.org//600533002, which
is failing snapshot generation on x64 and arm architectures.

BUG=dartbug.com/21061
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40628 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 09:40:19 +00:00
regis@google.com edd503f7d0 Refactor bigint _sqrTo in preparation of intrinsification.
Provide _sqrAdd intrinsic on ia32.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40623 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-24 01:51:04 +00:00
regis@google.com 879043ba6f Intrinsify Bigint 'multiply and accumulate" function on ia32.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40485 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 02:05:00 +00:00
srdjan@google.com 5ef243e688 Make sure Bigint._digits is always a Uint32List and bever null. Adapt type information for get:_digits.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40463 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 21:18:25 +00:00
srdjan@google.com a0b0554faa Recognize Bigint setters and getters. This code will be removed when/if we change the fields to be Dart instead fo native fields.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40206 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-12 15:45:40 +00:00
fschneider@google.com da0fb6bbe2 More intrinsics in IR.
R=srdjan@google.com, vegorov@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40088 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 13:34:58 +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
vegorov@google.com a1e2035eda Improve List.sublist and List.toList for large lists.
- Merge array allocation and List._copyFromObjectArray to provide memmove fast path;

- In optimizer given v2 = CreateArray(v0, v1) fold v2.length load to v1;

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39831 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 20:36:01 +00:00
lrn@google.com 6484ca2694 Don't always call _copyFromObjectArray.
The call is a runtime call, not internalized as I expected.
Only use it for large array slices.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39803 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 12:39:31 +00:00
ajohnsen@google.com 07714fb40f Manually inline fixed-size list's forEach, to make it possible for the VM to optimize.
BUG=https://code.google.com/p/dart/issues/detail?id=20715
R=iposva@google.com, lrn@google.com, vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39657 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 15:10:18 +00:00
fschneider@google.com 97dc2bd55a Implement native _List. constructor in the flow-graph builder.
Replace assembly intrinsic and the C++ native function with a CreateArray
instruction.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39554 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 13:57:15 +00:00
fschneider@google.com cdd87138d4 Small improvements in array code.
Avoid emitting x - 0 in byte array view code.

Always inline Lists.copy since it is freqently polymorphic.

Fix printing of CreateArrayInstr.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39522 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-25 15:45:07 +00:00
srdjan@google.com 8745b71d4a Fix performance degradation in Havlak: prevent conflicting method recognizer kinds to be stored in the function.
Review URL: https://codereview.chromium.org//497623003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39477 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 22:37:47 +00:00
zra@google.com c1bb207c1a Adds intrinsics for array allocation and string charAt.
Improves performance of unoptimized code.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39465 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 17:52:41 +00:00
fschneider@google.com 937726a0aa Improve polymorphic inlining of int/int double/double operations.
I added inlining of the native Double methods _add, _sub, _mul and _div and fromInteger
and unified the method recognition of the MethodRecognizer and the Intrinsifier classes.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39446 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 11:13:44 +00:00
fschneider@google.com 4983823977 VM: Improve performance of method recognizer and unify the it with the intrinsifier.
The method recognizer is now in a separate file and the intrinsifier uses the
same infrastructure. Each function is marked at initialization time, so that
recognizing a method is a fast operation (reading a field from the Function object)

I cleaned the symbol table from unused symbols since I had to regenerate the
binary snapshot in the repository anyway for this change.

I had to rename the methods that are duplicated between the recognized method list
and the intrinsics list to match the naming convention used by the method recognizer.
I left the other intrinsics unchanged for now. They will be renamed in a future CL.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39444 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 10:21:09 +00:00