Commit Graph

1234 Commits

Author SHA1 Message Date
lrn@google.com 4d4c8a6332 Make Iterable.toSet say that it returns a Set with the same equality as the Iterable's contains method.
Let's consider whether this is really desirable once more.
It seems messy, but so does not doing it.

R=ajohnsen@google.com, floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40893 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 07:43:10 +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
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
lrn@google.com 2ef0e0b993 Fix bad call of RangeError.value in String.fromCharCodes.
Review URL: https://codereview.chromium.org//608213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40760 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 09:33:08 +00:00
lrn@google.com de514055bf Change restrictions on start/end on String.fromCharCodes.
Must now be 0 <= start <= end <= iterable.length.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40755 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-29 08:15:49 +00:00
lrn@google.com b89409c112 Change type of multiplier to int, not _Smi.
Review URL: https://codereview.chromium.org//603353003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40704 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 12:30:35 +00:00
lrn@google.com d57732d359 Optimize int.parse with a radix.
Handles bignums by parsing chunks of of digits into smis, then
combining the smi into a (potential) bignum, using smi arithmetic as
much as possible.
Use the optimized version for radix 10 and 16 too, instead of going to runtime.

R=fschneider@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40703 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 12:13:47 +00:00
lrn@google.com 15ad26af35 Optimize int.parse with a radix.
Handles bignums by parsing chunks of of digits into smis, then
combining the smi into a (potential) bignum, using smi arithmetic as
much as possible.
Use the optimized version for radix 10 and 16 too, instead of going to runtime.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40702 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 12:04:43 +00:00
lrn@google.com 8bba32d131 Make String.fromCharCodes take start/end.
This avoids having to make a sublist of a list of character codes before passing it to String.fromCharCodes.

    new String.fromCharCodes(codes.sublist(start, end))

becomes just

    new String.fromCharCodes(codes, start, end)

R=floitsch@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40672 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 10:45:24 +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
ajohnsen@google.com 0491f4e887 Per isolate package root.
BUG=
R=iposva@google.com, ricow@google.com, sgjesse@google.com, turnidge@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40581 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 05:46:14 +00:00
ajohnsen@google.com 38619425c2 Revert "Per isolate package root."
Revert "Fix test in checked mode."

The Dartium branch is locked atm, making it impossible to land this and have green Dartium bots.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40540 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 11:13:28 +00:00
ajohnsen@google.com a058d07806 Per isolate package root.
BUG=
R=iposva@google.com, sgjesse@google.com, turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40534 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-22 08:07:06 +00:00
koda@google.com 667454a233 Support old-space allocation in generated code (bump block only for now).
First steps towards general pretenuring support.
* Generalize Heap::Top/EndAddress.
* Add testing flag to exercise new code paths.
* Also update the slow-case runtime calls, to ensure a fresh block will be allocated in old.

Next steps are general invalidation of the generated code and adding a policy that doesn't blow up the store buffers), and freelist allocation.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40530 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 23:46:22 +00:00
asiva@google.com 302c93b050 1. Add user tag to the pointers traversed in the object store
2. Added support for UserTag objects in a full snapshot.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40508 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 18:00:13 +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
lrn@google.com 38bb5d2a36 Don't use identical for null.
This was just a test to see if it generated the same code (it did),
but I forgot to revert it again.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40432 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 11:56:01 +00:00
regis@google.com 2be1822329 Cache value of '_digits' and '_used' fields in a local variable as appropriate.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40409 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 22:22:42 +00:00
regis@google.com d3420517e2 Remove unnecessary check in bigint division.
Review URL: https://codereview.chromium.org//576253002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40385 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 18:37:39 +00:00
lrn@google.com 104119e15d Add argument error for int.parse(null).
Slightly tweak _tryParseSmi to generate slightly less code.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40373 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 12:51:20 +00:00
regis@google.com 4f77a36faa Estimate quotient digit in Bigint division using an integer division instead of
a floating point division.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40365 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-17 01:44:34 +00:00
regis@google.com 21369fc864 Temporarily add a public modPow method to int interface.
Make Bigint modPow support non-bigint arguments.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40335 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 18:19:12 +00:00
regis@google.com 055fd61999 Temporarily add a public modPow method to _Bigint class.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40271 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 19:29:15 +00:00
lrn@google.com 54ffc4f000 Call special VM interpolate for single element interpolation.
Fixed at the intermediate language level.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40232 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-15 07:19:23 +00:00
rmacnak@google.com cefb21b6a3 Narrow String::CharAt from int32_t to uint16_t.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40178 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 20:55:36 +00:00
regis@google.com 9ff3cd3342 Fix wrong conversion from double to bigint in overriden operators of new bigint.
Fix ambiguous call to pow on Windows.
Fix big_integer_vm_test to use numbers large enough to actually be bigint.
Re-enable dart2js tests.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40122 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-10 22:26:59 +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
iposva@google.com 92f2698abe - Refactor the way X.fromEnvironment is implemented.
- Predefine 'dart.isVM' to be 'true'.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39986 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 18:23:05 +00:00
mlippautz@google.com 800508d980 Bubble up exceptions throw async/await.
This CL addresses bubbling up exceptions through async and await. It adds another parameter to the continuation that can be used to rethrow an error.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39926 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 19:50:34 +00:00
vegorov@google.com c431dbcb3f Cleanup throwing of the RangeError in the runtime to remove duplicated code.
Improve List._copyFromObjectArray native performance for large arrays by using PassiveObject instead of Object.

R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39911 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 13:15:56 +00:00
lrn@google.com 0acdec95ff Specify packageRoot parameter to Isolate.spawnUri.
R=ajohnsen@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39903 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-05 09:11:54 +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 f75e71d95c Remove unused string interpolations.
BUG=
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39802 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 12:35:50 +00:00
koda@google.com a4f45a89a0 Optimize number-to-string conversions.
Add lookup table for ints in [-99, 99] and a cache for doubles.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39710 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-29 21:13:33 +00:00
koda@google.com 0844cbcfbe Proof-of-concept pretenuring of some strings:
- Add bump-pointer allocated block in page space.
- Pretenure num.toString whenever >98% of strings are being promoted.
- Fix deadlock in freelist printing.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39688 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-29 03:54:12 +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
ricow@google.com 69bed3d030 Revert revision 39617 "Create isolates in a separate thread."
This is breaking dartium with:
BrowserOutput.stderr:
  ../../dart/runtime/vm/dart_api_impl.cc:1614: error: Dart_EnterScope expects there to be a current isolate. Did you forget to call Dart_CreateIsolate or Dart_EnterIsolate?

R=vsm@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39638 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 09:52:59 +00:00
turnidge@google.com 3cd24f8ebf Create isolates in a separate thread.
Previously the parent isolate waited for the child isolate to fully
load, which was not ideal.  This change fixes that.

If you run on mac, you may need to raise your open file limit to make mandel_isolate_test pass:

ulimit -n 1024

Default open file limit on the mac is low.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39617 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 19:47:06 +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 7947f84054 Optimize List.toList/.sublist and List.from on lists.
R=fschneider@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39579 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-27 08:00:48 +00:00
turnidge@google.com 2d4250d852 Defer execution of the main isolate's entry point until the message loop.
This allows us to know more accurately the stack limit while running main.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39558 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 17:21:20 +00:00