Commit Graph

2925 Commits

Author SHA1 Message Date
regis@google.com 7e9531a1d2 Remove support for default factory classes.
For now, disable tests using obsolete syntax. More will get disabled as support
for interfaces is completely removed. We may then permanently remove some tests,
while updating and reenabling others whose purpose is not related to interfaces.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15480 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 23:39:27 +00:00
srdjan@google.com bfd459b09c Add flag 'implements' to class, it is set anytime someone implements this class. This is a way to recognize implicit interfaces in order to improve class checks.
Review URL: https://codereview.chromium.org//11348283

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15477 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 22:57:26 +00:00
asiva@google.com 3b5f530a44 Rename the field type_arguments_instance_field_offset_ to
type_arguments_field_offset_ in preparation for calling it
type_arguments_field_offset_in_words_
Review URL: https://codereview.chromium.org//11316203

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15431 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:36:04 +00:00
asiva@google.com 3535347845 Canonicalize all integer constants that we create by parsing a string.
Review URL: https://codereview.chromium.org//11348259

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15427 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 00:23:28 +00:00
srdjan@google.com 21f624d006 Cleanups and added more checks for valid Integer allocation (must be Smi, Mint or Bigint for their corresponding range).
Integer boxing in compielr seems to check correctly fro smi/mint. Can you think of any other places where we could create incorrect Mints or Bigints?
Review URL: https://codereview.chromium.org//11421064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15310 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 16:09:50 +00:00
ajohnsen@google.com 0f367f8894 Make List an abstract class.
This was the last interface in dart:core.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15240 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:40:52 +00:00
srdjan@google.com adec747917 Reenable function source fingerprint checks. Added checks to MethodRecognizer.
Review URL: https://codereview.chromium.org//11412137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15230 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 22:46:38 +00:00
srdjan@google.com a64c6f8429 Fix build on Linux. Disable fingerprint checking as the finger prints changed.
Review URL: https://codereview.chromium.org//11308146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15218 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 19:27:44 +00:00
srdjan@google.com 09d1bbde1a Use fingerprint to detect changes in methods that are intrinsified.
Make sure that the fingerprints are portable across 32 and 64 bit platforms.
Review URL: https://codereview.chromium.org//11421024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15217 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 19:15:54 +00:00
cshapiro@google.com 979571d3ee Use a signed 32-bit integer for representing code points.
Review URL: https://codereview.chromium.org//11419086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15188 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-21 00:30:27 +00:00
cshapiro@google.com 1548e5b934 Use the code point iterator in equality comparisons to C strings.
Review URL: https://codereview.chromium.org//11418095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15185 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 23:46:05 +00:00
srdjan@google.com 0cc2b949d8 Add source fingerprint computation to function. Will be used to detect unexpected changes of functions in internal library (e.g, the ones used for intrinsification)
Review URL: https://codereview.chromium.org//11416120

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15182 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 23:00:32 +00:00
regis@google.com d529fe1eea Address review comments of https://codereview.chromium.org/11299020/
Review URL: https://codereview.chromium.org//11418098

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15178 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 19:55:05 +00:00
erikcorry@google.com 84da84c22d Revert "Add some support for the code-point code-unit distinction."
This reverts commit r15150

R=karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15152 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 15:23:41 +00:00
erikcorry@google.com 547cbf9da6 Add some support for the code-point code-unit distinction.
Adds String.fromCodeUnits and String.codeUnitAt, and modifies
String.fromCodePoints and String.codePointAt to actually use code points.
Fixes String.charCodes to use code points and adds String.codeUnits.
Reenables some tests, and adds new ones for non-BMP characters.
Fixes issues 6418, 6501 and 1357.

R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15150 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 14:51:25 +00:00
cshapiro@google.com bad7873c6a Correct a misnomer regarding supplementary code points.
The supplementary multilingual plane (SMP) code points were assumed to
be equivalent supplementary code points.  In fact, smp code points are
a small subset of all supplementary code points.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15128 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 02:37:21 +00:00
hausner@google.com a6fe1b05cc Fix bug 6713
Ensure that we find the correct closure type class when re-parsing
a nested function or closure.
Review URL: https://codereview.chromium.org//11420066

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15113 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 21:34:53 +00:00
cshapiro@google.com 26a4c5ae66 Provide a code point iterator to the String class to simplify iteration.
Review URL: https://codereview.chromium.org//11416054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15109 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 20:57:14 +00:00
srdjan@google.com 7c6a68f2a4 Simplify CodePatcher::GetStaticCallAt.
Review URL: https://codereview.chromium.org//11411072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15101 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 19:17:02 +00:00
srdjan@google.com a6dae8cd4a First part of static call cleanup: store static call targets into code object, referenced by code-offset.
Review URL: https://codereview.chromium.org//11418046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15091 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 16:39:07 +00:00
fschneider@google.com ecda9dd804 Add one-char string table for faster String.charAt to the VM.
This is used for a fast lookup when executing String.charAt.
Currently it is only used in the C-runtime, but the plan is to
generate optimized code for the table lookup for speeding up
String.charAt.
Review URL: https://codereview.chromium.org//11369259

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15088 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-19 16:06:19 +00:00
regis@google.com 01a31275bd Make creation of list literal more resilient to changes in the underlying
dart implementation of List in the core library.
Do the same for map literal creation.
Review URL: https://codereview.chromium.org//11299020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14997 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 01:31:15 +00:00
asiva@google.com e1adedb421 Revert OneByteString back to ISO Latin-1 instead of ASCII
as webkit supports ISO Latin-1 and UTF-16 encodings for strings.
Review URL: https://codereview.chromium.org//11365243

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14989 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 00:13:18 +00:00
asiva@google.com 271a1f96ae - Add functionality to morph a string into an external string
- Add Dart API call Dart_MakeExternalString
Review URL: https://codereview.chromium.org//11360114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14978 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-15 21:37:26 +00:00
vegorov@google.com b38ad8f4fb Count per check hits in ICData.
R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14870 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 23:21:02 +00:00
srdjan@google.com 7375693321 In optimized code use IC calls for instance calls that have no IC data instead of deoptimizing. The optimized IC call increments usage counter and reoptimizes optimized function if the threshold is met.
Recognize closure calls and mark them in ICData. Closure calls do not populate ICData, i.e., number of checks is always 0 (unless mixed closure calls with regular instance calls). Therefore closure IC calls do not count for reoptimization.
Review URL: https://codereview.chromium.org//11361225

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14860 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 18:34:05 +00:00
ajohnsen@google.com 970cc5ba68 Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl.
After this cleanup, RegExp no longer have a const constructor. Use 'new
RegExp(...)' from now on.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14838 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 10:41:37 +00:00
iposva@google.com 0c6ff657ed - Do not mix scalar values and object fields in RawInstance to
simplify the traversal for GC. Classes with native fields
  have a hidden reference to a typed array containing the
  native fields.
Review URL: https://codereview.chromium.org//11312183

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14821 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:21:04 +00:00
asiva@google.com 2e21fbd3ee Fix for issue 6623 - Canonicalize implicit static closure objects.
Review URL: https://codereview.chromium.org//11359151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14802 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 19:02:44 +00:00
lrn@google.com 1555c1db26 Convert String to a class.
Remove the StringImplementation class.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14779 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 08:16:59 +00:00
srdjan@google.com dc8115e19a Remove unused/not working function tracing flag and functionality.
Other small fixes, use stub to call optimization of a function (in preparation for reoptimization).
Review URL: https://codereview.chromium.org//11364184

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14756 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 20:55:31 +00:00
fschneider@google.com a42474ba37 Reland: Improve smi shift operations and avoid repeated deoptimizations.
This CL includes a bug fix where a NULL check of the pc was missing.

Also change the dart2js test status of arithmetic_test from Skip to Fail.
Review URL: https://codereview.chromium.org//11369158

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14755 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 19:54:55 +00:00
kmillikin@google.com 53a75650b0 Fix Code::ToCString.
It was printing the entry address in decimal and only the low 32 bits on x64.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14752 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 19:42:01 +00:00
hausner@google.com be175c758e Implement const expressions for local variables
Review URL: https://codereview.chromium.org//11265047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14716 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:19:43 +00:00
fschneider@google.com a830c7c091 Revert r14711 and r14709 because of test failures.
TBR=srdjan@google.com
Review URL: https://codereview.chromium.org//11363151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14712 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:37:26 +00:00
fschneider@google.com 0f251088ec Improve smi shift operations and avoid repeated deoptimizations.
Smi left shifts do not contain a call now. Only after deoptimizing
at a smi operation we we generate mint code or a generic call to
avoid repeated deoptimization.

Added a test case for the code that was not covered by existing tests.
Review URL: https://codereview.chromium.org//11363141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14709 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:03:47 +00:00
regis@google.com d372a816bb Pass closure object as first implicit argument to closure functions.
Remove code passing captured receiver to native instance closures; instead,
access captured receiver in context, as non-native functions do.
Review URL: https://codereview.chromium.org//11360116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14698 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:28:07 +00:00
srdjan@google.com 9a4e7b073b Do not inline static calls that have not been executed in unoptimized code: the inlined function does not have type feedback that takes that call's arguments into account. As a side effect, it fixes a crash in smi-equality.
Review URL: https://codereview.chromium.org//11312105

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14605 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 23:47:19 +00:00
tball@google.com 209499c17f Merged String subclasses into String.
Merged String subclasses (OneByteString, etc.) into String, keeping
their raw types.  This allows String handles to continue to point
to a String after its raw type is changed, such as to make its data
external.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14545 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 22:22:19 +00:00
regis@google.com 2148b51189 Do not copy type parameter bound from declaration to reference, since we are
not able to properly finalize it. Revisit later.
This fixes issue 6488. Siva will add a test.
Review URL: https://codereview.chromium.org//11366093

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14544 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 21:00:12 +00:00
srdjan@google.com 078bc44a1d Various little cleanups to avoid excessive allocation of handles.
Review URL: https://codereview.chromium.org//11358052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14486 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 16:35:05 +00:00
srdjan@google.com 0db049051c Add is_intrinsic and is_not_intrinsic bits to prevent repeated tests on the same function (inlining, recompilations). The bist are set lazily, initially both are false.
Review URL: https://codereview.chromium.org//11358047

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14444 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 23:25:26 +00:00
asiva@google.com df1b318ae4 Remove some unnecessary class handle creations.
Review URL: https://codereview.chromium.org//11293031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14420 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-01 17:58:58 +00:00
asiva@google.com ebbb7c4134 - Represent strings internally in UTF-16 format, this makes it
compatible with webkit and will allow for easy externalization of
  strings. One byte strings are retained for pure ASCII strings.
  (The language specification was changed recently to reflect this as
   follows "A string is a sequence of UTF-16 code units").
- Remove four byte string class and all references to it.
- Rename some of the string functions in Dart API to make them
  consistent and better describe the underlying functionality
  Dart_NewString => Dart_NewStringFromCString
  Dart_NewString8 => Dart_NewStringFromUTF8
  Dart_NewString16 => Dart_NewStringFromUTF16
  Dart_NewString32 => Dart_NewStringFromUTF32
  Dart_NewExternalString8 => Dart_NewExternalUTF8String
  Dart_NewExternalString16 => Dart_NewExternalUTF16String
  Dart_NewExternalString32 => Dart_NewExternalUTF32String
  Dart_StringGet8 => Dart_StringToUTF8
  Dart_StringGet16 => Dart_StringToUTF16
  Dart_StringToCString => Dart_StringToCString
  Dart_IsString8 => Removed
  Dart_IsString16 -> Removed
  Dart_StringToBytes -> Removed
  Dart_StringGet32 -> Removed
Review URL: https://codereview.chromium.org//11318018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14357 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-31 17:56:46 +00:00
ajohnsen@google.com 806fa6fab1 Move StringImplementation from coreimpl to core as _StringImpl.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14281 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 14:19:57 +00:00
ajohnsen@google.com dbbf15abd8 Move ListImplementation from coreimpl to core, as a private member.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14274 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 13:25:04 +00:00
kmillikin@google.com 3d684dcc70 Compress deoptimization information by sharing common suffixes.
For all the deoptimization entries in a function, build a suffix trie.  Add
a new deoptimization instruction that indicates the rest of the translation
is a fixed-length suffix of another entry.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14252 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 09:50:35 +00:00
regis@google.com 57a60316f0 Fix wrong canonicalization of signature class due to name collision (issue 6353).
Add test.
Review URL: https://codereview.chromium.org//11342028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14234 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-30 00:06:24 +00:00
regis@google.com 989791ac05 Remove --reject_named_argument_as_positional flag from the VM.
Review URL: https://codereview.chromium.org//11341014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14215 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 18:31:24 +00:00
ajohnsen@google.com e925b5591e Move Arrays, Collections and Maps into a new library, dart:collections.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14173 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-29 08:38:15 +00:00