Commit Graph

2395 Commits

Author SHA1 Message Date
iposva@google.com 1836035266 - Modify dart_api.h to be a proper C API.
- Verify that dart_api.h can be used from C
  by changing the test_extension to be a pure C file.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23476 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 16:36:27 +00:00
floitsch@google.com d9af7d902c Fix usage of many iterable functions on floating point typed lists.
BUG= http://dartbug.com/10823
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23469 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 15:06:34 +00:00
iposva@google.com b60d09b1fb - Add different types for persistent and weak persistent handles
in the Dart C API.
- Adapt code in the runtime.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23421 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 15:55:59 +00:00
srdjan@google.com f49b5942ab Check how many Smi digits are acceptable when parsing integers.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23331 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-29 09:14:21 +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
floitsch@google.com 5d058bb0eb Adding isNotEmpty property to collection and string.
BUG= http://dartbug.com/3074
R=floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23294 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 17:30:37 +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
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 c5bd888acb Fix string.trim (adding more runes).
R=lrn@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23006 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-22 11:10:11 +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
iposva@google.com e24d83c10d - Add a GetClassId() to Object, so that we do not have to
create a temporary class handle only to get at an object's
  class id, which is stored in the object header.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22904 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-20 21:01:31 +00:00
asiva@google.com 551cde79fa Reuse _isOneByteWhitespace in all the classes for implementing _isWhitespace.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22882 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 23:49:50 +00:00
srdjan@google.com dd6ca671d7 Cleanups: addressed your comments from https://codereview.chromium.org/14962008/
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22881 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 23:45:08 +00:00
asiva@google.com 4ba1fdafba Remove obsolete code (FourByteString).
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22871 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 20:59:39 +00:00
srdjan@google.com 142b49316a Fix issue 5275: The VM must always generate the most compact form of an integer (Smi, Mint or Bigint). Hide methods that can be used to bypass that assumption and require the use of Integer::NewXXX which is guaranteed to return the most compact integer form.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22816 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 20:49:06 +00:00
srdjan@google.com 7797d39362 Added Object._cid getter, optimized it. Added to (some) classes a static final _clCid. Use those to test for exact type in VM's libraries.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22695 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-14 18:16:44 +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
srdjan@google.com 70d8860c17 Optimize concatenation of lists of onebyte strings by implementing it in Dart.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22532 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 21:33:03 +00:00
srdjan@google.com ddc9d23610 Inline _OneByteString._setAt. The key knowledge is that _setAt is an internal method that has to be called with correct arguments, therefore no checks are needed.
R=fschneider@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22528 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-08 20:03:33 +00:00
asiva@google.com 4577abd566 Third step towards loading core library scripts directly from the sources
- Read the patch source files using the source mapping array generated for
  patch files instead of relying on a generated buffer containing the sources.

- Modify the gyp files to ensure that all patch libraries are read directly
  from the sources. Remove the source buffer generation step in the gypi
  files for all patch files.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22436 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 18:16:25 +00:00
floitsch@google.com 968ebcff5a Make Completers asynchronous.
BUG= http://dartbug.com/9990
R=ajohnsen@google.com, lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22417 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 15:15:15 +00:00
srdjan@google.com ab188d327c Improve performance of String.fromCharCodes by implementing it in Dart. Add tow internal natives to Dart in order to be able to allocate and fill a String. Next step is to implement String.concatAll in Dart as well and to inline String._setAt operation (currently intrinsified).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22399 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 23:48:10 +00:00
asiva@google.com ea5a3919c5 Resubmit 22380 after fixing the windows build.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22396 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 22:50:26 +00:00
asiva@google.com dab8758e7a Revert 22380 to investigate windows build break.
Review URL: https://codereview.chromium.org//14927003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:26:34 +00:00
asiva@google.com 27e78fb6f8 Second step towards loading core library scripts directly from the sources
- Modify the library source generator to generate a source mapping array
  The generated array is of the following format:
  const char* dart::Bootstrap::corelib_source_paths_[] = {
    "dart:core", "/workspace1/dart-all/dart/sdk/lib/core/core.dart", 

    "bool.dart", "/workspace1/dart-all/dart/sdk/lib/core/bool.dart", 
    ...
    ...
  };

- Read the source file using the source mapping array instead of relying on
  a generated buffer containing the sources

- Modify the gyp files to ensure that all libraries are read directly
  from the sources. This CL does not change the patch part yet.
  Remove the source concatentation step in the gypi files for all the core
  libraries.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22380 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-03 18:12:24 +00:00
srdjan@google.com 6843db8020 Implement Smi.toString in Dart instead of calling to C++ natives. Large performance improvement.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22341 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-02 21:40:43 +00:00
srdjan@google.com 596f203f2a Do not copy immutable arrays in String.createFromCharCodes. Tighten the types a little in string_patch.dart.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22338 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-02 20:45:06 +00:00
srdjan@google.com 706e79d074 Fix error reporting when calling static methods and closures withh mismatched arguments.
Closures BEFORE:
----
Unhandled exception:
Class '(dynamic, dynamic, dynamic) => dynamic' has no instance method 'call'.

NoSuchMethodError : method not found: 'call'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Arguments: [2]

Closures NOW:
----
Closure call with mismatched arguments: function 'A.foo'

NoSuchMethodError: incorrect number of arguments passed to method named 'A.foo'
Receiver: Closure: (dynamic, dynamic, dynamic, dynamic) => dynamic from Function 'foo':.
Tried calling: A.foo(2)
Found: A.foo(a, b, c)


Statics BEFORE:
----
Unhandled exception:
No top-level method 'foo' declared.

NoSuchMethodError : method not found: 'foo'
Receiver: Type: class '::'
Arguments: []

Statics NOW:
----
Unhandled exception:
No top-level method 'foo' with matching arguments declared.

NoSuchMethodError: incorrect number of arguments passed to method named 'foo'
Receiver: top-level
Tried calling: foo(...)
Found: foo(a, b, c)

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22209 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-30 22:05:14 +00:00
asiva@google.com ae2ab93835 Avoid yet another import of dart:_collection_dev in the core patch library. Use the prefix _collection_dev (already set up in dart:core imports) when accessing Symbol in the core patch library.
R=ahe@google.com, floitsch@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22128 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-29 16:23:58 +00:00
srdjan@google.com e06acc85a1 Move negative length checks from Dart into the native.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22096 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-27 00:04:21 +00:00
srdjan@google.com dd9806e023 Fix crashes in debug mode with optimizations turned off.
Remove wrong assert. The correct assertion is done within SetTypeArguments.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22079 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-26 18:19:45 +00:00
johnmccutchan@google.com df712e164e Inline Float32x4 constructors
Review URL: https://codereview.chromium.org//13936009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22055 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 22:03:05 +00:00
srdjan@google.com 81eb689947 Implement a tryParseSmi function in Dart for quick and frequent parsing of Smis.
Review URL: https://codereview.chromium.org//14484003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22041 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 17:30:21 +00:00
iposva@google.com 2fb7cf7220 - Print "top-level" instead of "class '::'" in
NoSuchMethodErrors.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22005 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-25 07:29:06 +00:00
iposva@google.com 7ce7e98194 - Do not include unneeded platform/json.h.
Review URL: https://codereview.chromium.org//14476002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21949 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 14:04:13 +00:00
lrn@google.com e0e13fe852 Fix missing concurrency check in [].forEach.
Also fix a bad range check for List.setRange.

Added more tests.

BUG=http://dartbug.com/10045

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21935 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 09:34:17 +00:00
johnniwinther@google.com f721629103 Change libraries map to use Uri.
Review URL: https://codereview.chromium.org//14178010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21929 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 08:19:24 +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
lrn@google.com 554a845e4f Make List.remove return boolean.
Remove Queue implementations' remove methods, which are not in the
interface.
Added more tests for list operations.
Fixed bugs and omissions found by tests.

http://dartbug.com/10042
http://dartbug.com/10112

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21867 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:13:17 +00:00
floitsch@google.com f74e8a023b Revert "- Do not keep growing when creating Lists from Iterables."
This reverts commit r21531.

BUG= http://dartbug.com/10070

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21817 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 16:52:03 +00:00
johnniwinther@google.com b6b309de52 Change url to uri on LibraryMirror.
Review URL: https://codereview.chromium.org//14251005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21803 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 10:27:41 +00:00
kustermann@google.com e2216f61bf Fast copy between TypedData and ExternalTypedData
Until now, copying data from TypedData to TypedData and from ExternalTypedData
to ExternalTypedData was fast. But copying between TypedData and
ExternalTypedData was not handled in a fast way.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21791 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 08:27:15 +00:00
srdjan@google.com fc40a8c721 Allow leading + when parsing integers in fast case (it is allowed per library implementation, only Dart syntax disallows it).
Review URL: https://codereview.chromium.org//14064019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21779 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 23:19:15 +00:00
srdjan@google.com cc94080d4d Fix performance of parsing Mints.
Review URL: https://codereview.chromium.org//13852044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21767 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 20:22:26 +00:00
asiva@google.com 92d18bc9ef Use identical instead of === and !identical instead of !==
Review URL: https://codereview.chromium.org//14352013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21710 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 23:13:59 +00:00
ahe@google.com 2abb5be5ec Implement Symbol correctly in dart2js.
Review URL: https://codereview.chromium.org//14079003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21694 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 19:25:22 +00:00