Commit Graph

13143 Commits

Author SHA1 Message Date
srdjan@google.com 5f4ad90c85 Added native to split OneByteString with a char code as pattern.
Review URL: https://codereview.chromium.org//11414273

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15615 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-01 00:22:18 +00:00
srdjan@google.com aa3ee93c84 Add result cid to StringFromCharCode.
Review URL: https://codereview.chromium.org//11412284

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15614 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-01 00:03:04 +00:00
hausner@google.com 859889b9c5 Eliminate old style import from language tests
Also implement multi-part library names.
Review URL: https://codereview.chromium.org//11316283

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15612 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 23:20:01 +00:00
asiva@google.com 76def187f8 Fix bug in Utf8::CodePointCount which was causing some strings with latin1
characters to be stored as TwoByteStrings.
Review URL: https://codereview.chromium.org//11419259

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15604 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 21:53:58 +00:00
johnmccutchan@google.com d95f19ec88 Fix win32 build breakage
Change signature of OS::AlignedAllocate from using intptr_t to size_t

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15603 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 21:39:09 +00:00
johnmccutchan@google.com 5642ee09f1 Expose transferable constructor to Int8List
Review URL: https://codereview.chromium.org//11414211

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15598 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 20:35:22 +00:00
srdjan@google.com 0ddc6d93b1 Add more spcific ranges for String length and charCode methods.
Review URL: https://codereview.chromium.org//11280248

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15589 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 17:19:42 +00:00
kmillikin@google.com 6c4d17d65e Increment CompilerStats::code_allocated when allocating in executable pages.
R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15586 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 13:29:42 +00:00
sgjesse@google.com 7fc2230b02 Add support for surrogates when serializing and deserializing for native ports
As Dart allows creating string with UTF-16 surrogate code units which
are not always in lead/trail pairs, we need to support this in the
communication with native ports.

This change allows surrogate code units in messages to/from native
ports and supports them in the UTF-8 encoding used on the Dart_CObject
structure string representation.

R=ager@google.com, erikcorry@google.com, asiva@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15585 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 13:06:44 +00:00
kmillikin@google.com 8974984d4d Enable building with VTune support on Windows.
R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15576 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 11:53:44 +00:00
cshapiro@google.com 39ee2fdfeb Move various top-level Unicode definitions into classes and methods.
Review URL: https://codereview.chromium.org//11414249

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15568 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 03:33:37 +00:00
cshapiro@google.com 392ca92d2d Use the code point iterator when computing 16-bit string hash codes.
Review URL: https://codereview.chromium.org//11412258

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15565 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 02:36:19 +00:00
regis@google.com 91ad9a0180 Remove support for interfaces.
For now, disable tests using obsolete syntax.
Tests disabled in this cl and in previous ones removing default factory classes
will either be deleted or updated in a later cl.
Review URL: https://codereview.chromium.org//11411271

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15562 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-30 01:26:31 +00:00
asiva@google.com 9d41d29b1a Fix StringBase_createFromCodePoints to correctly accept Latin-1 characters
as one_byte_string.

Rename Dart_NewExternalUTF8String to Dart_NewExternalLatin1String, this reflects
the functionality correctly.
Review URL: https://codereview.chromium.org//11280241

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15554 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 23:43:47 +00:00
asiva@google.com a76bd61fcb When externalizing a string ensure that the basic tag bits are preserved.
Also make sure we do not try to externalize read only strings that are in
the VM isolate.
Review URL: https://codereview.chromium.org//11411204

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15553 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 23:19:17 +00:00
srdjan@google.com bf3bac3884 Implement faster splitting with empty string as pattern. Add special native for computing substring of OneByteString (preparation for instrinsic).
Review URL: https://codereview.chromium.org//11416270

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15548 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 22:55:09 +00:00
asiva@google.com b7673910ab Fix for issue 6359 - Make snapshots platform independent.
The issue previously was that an instance size was stored a
size in bytes, similarly field offsets were stored as an offset
in bytes. This caused issues when generating the snapshot on
one platform and reading it on another platform.
The VM has been changed to store the instance size as a size in
words and the field offset as an offset in words.
Review URL: https://codereview.chromium.org//11421117

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15538 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 19:28:22 +00:00
hausner@google.com fe1b63afbc Eliminate support for old getter syntax
Empty parameter list in a getter declaration is now a compile time error.
Review URL: https://codereview.chromium.org//11416254

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15532 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 18:33:45 +00:00
vegorov@google.com aa2e7c9f72 Implement better side effect tracking for load-to-load forwarding.
Any field store can interfere only with stores to the same offset.

Indexed store can only interfere with indexed load.

This tracking is not yet used by LICM.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15518 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 14:47:06 +00:00
vegorov@google.com 132bdc6bfb Support VTune's JIT interface.
R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15517 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 13:54:06 +00:00
fschneider@google.com 408e3abca9 Cleanup: Remove unused return value in OptimizeTypeArguments.
Instead use it to replace the bool*  output-parameter.
Review URL: https://codereview.chromium.org//11428079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15515 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 13:43:20 +00:00
srdjan@google.com 888e564924 Attempt to do direct class comparison for type checks using CHA.
Next step is to convert instanceof nodes to an integer comparison node, which would then be automatically merged with branch.
Review URL: https://codereview.chromium.org//11348289

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15486 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 00:49:42 +00:00
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
regis@google.com f19052e037 Remove ClosureArgumentMismatch runtime entry in vm and
replace with call to noSuchMethod.
Review URL: https://codereview.chromium.org//11421134

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15472 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 21:14:43 +00:00
fschneider@google.com 9508ecd5d3 Improve constant propagation to handle InstantiateTypeArguments.
If the input to an InstantiateTypeArguments instruction is a constant
it can be eliminated and replaced with the constant.
Review URL: https://codereview.chromium.org//11299204

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15447 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 11:22:23 +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
regis@google.com 1de3a5c0f7 Enforce rule in vm that factory name must match enclosing class name.
This is a step towards removing support for obsolete default factory classes.
For now, disable tests using obsolete syntax. More will get disabled as support
is completely removed. We may then permanently remove some tests, while updating
and reenabling others whose purpose is not related to default factory classes.
Review URL: https://codereview.chromium.org//11419191

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15428 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:11:29 +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
hausner@google.com 1da3a82fbf Eliminate support of legacy type Dyamic
With this change, Dynamic is no longer implicitly converted
to dynamic.

This change breaks code that still uses Dynamic.
Review URL: https://codereview.chromium.org//11419176

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15404 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 17:33:17 +00:00
iposva@google.com e90e9086e2 - Remove unneeded library tags when concatenating libraries.
Review URL: https://codereview.chromium.org//11411176

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15368 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 05:41:14 +00:00
tball@google.com a5769593c4 Commented out child isolate test until it's fixed with monitor.
Review URL: https://codereview.chromium.org//11419172

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15359 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 00:33:21 +00:00
tball@google.com f56bf1f260 Fixed race-condition in isolate test.
Review URL: https://codereview.chromium.org//11411186

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15356 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-27 00:11:07 +00:00
tball@google.com bf5f0db5d0 Added support for isolate unhandled exceptions.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15352 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 23:31:47 +00:00
srdjan@google.com 85cf9af6ab Fix for issue 6678: Result of identical(a, b) with a and b doubles not consistent.
Implement proposed new identity spec (flag --new_identity_spec). It will be enabled/committed once the new spec been confirmed.

The new spec says that identity of numbers is computed on their values instead of on the object reference. This provides deterministic behavior without having to disable optimizations in the VM. In some cases 'identical' is now slower than 'equality' as more checks need to be done. The VM compiler can optimize 'identical' in the future.

My benchmarks do not show any slow down.
Review URL: https://codereview.chromium.org//11414136

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15332 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 18:35:45 +00:00
iposva@google.com 704739eac5 - Do not visit length and hash of string objects. They are guaranteed to be Smi.
Review URL: https://codereview.chromium.org//11299170

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15330 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 18:08:08 +00:00
srdjan@google.com 5764582721 Throw OutOfMemory instead of crashing when bigint multiply overflows.
Review URL: https://codereview.chromium.org//11299173

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15316 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 17:00:51 +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
fschneider@google.com 26e054bbc4 Support loads from Uint8Array and ExternalUint8Array in the optimizing compiler.
This is done by extending LoadIndexed to handle Uint8Array and ExternalUint8Array.

Small cleanups:
 - Share code for computing the element addresses for indexed loads.

 - Remove kGrowableArrayCid where it cannot occur. We only ever emit
   LoadIndexedInstr for fixed-size arrays. Loads from growable arrays
   are split into loading the backing store first and then an indexed
   load from the backing store.
Review URL: https://codereview.chromium.org//11411142

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15305 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-26 11:50:07 +00:00
vegorov@google.com 5402bf689d Heuristically predict interference on the back edge and use it to minimize number of register reshuffling which is especially expensive when cycles of XMM registers arise.
When allocating free register check if hint can potentially interfere on the back edge try ignoring hint and search for a better candidate.

Additionally fix handling of constants in the liveness analysis to accommodate constants used as immediates.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15291 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-23 16:04:34 +00:00
ager@google.com b0e036d12e Port intrisification of setIndexed on Uint8 and Int8 arrays from ia32 to x64.
This is a direct port of the ia32 intrinsifier. We noticed this was
missing when looking at HTTP benchmark profiles.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15261 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 15:00:24 +00:00
erikcorry@google.com 359736e97a Fix Unicode issues in dart2js and dart2dart.
R=floitsch@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15254 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:51:14 +00:00
fschneider@google.com 5399496ac4 Only require SSE2 at minimum hardware requirement.
BUG=dart:6010
Review URL: https://codereview.chromium.org//11416136

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15253 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:46:57 +00:00
fschneider@google.com 2693c71850 Inline [] operator on one-byte strings.
str[i] is translated into

temp = str.charCodeAt(i)
result = StringFromCharCode(temp);

The existing code for charCodeAt is reused and contains
the necessary range class id and range check.
Review URL: https://codereview.chromium.org//11416129

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15246 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:06:52 +00:00
iposva@google.com 3d61f5d16a Fix bug 6467:
- Do not attempt to Dart_ExitScope if no scope exists.
- Print more informative message if Dart_Initialization fails.
Review URL: https://codereview.chromium.org//11308166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15242 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:54:21 +00:00
iposva@google.com 6245a1ac1b - Make RawObject::tags_ private.
Review URL: https://codereview.chromium.org//11411139

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15241 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 07:54:00 +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
regis@google.com c2b4cccaee Ambiguous type references require a compile time error in some special cases
(fix issue 6741).
Review URL: https://codereview.chromium.org//11348188

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15233 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 00:14:08 +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