Commit Graph

1948 Commits

Author SHA1 Message Date
regis@google.com 02a8df0c83 Remove private class helping the parser to construct literal lists and maps.
Patch List and Map (implementation) classes with literal factories.
Review URL: https://codereview.chromium.org//11369234

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14873 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-14 04:28:02 +00:00
fschneider@google.com 59a1f747f4 Enable inlining of functions containing instance-of.
The corresponding issues have been fixed and all tests pass now.

BUG=dart:5216,dart:5217
Review URL: https://codereview.chromium.org//11369230

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14872 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 23:45:23 +00:00
srdjan@google.com 439110bf48 Move lazy deoptimization of all optimized code from top level parsing to end of class finalization (after installing new classes, and --use_cha, we need to invalidate some optimzied code)
Review URL: https://codereview.chromium.org//11370008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14871 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 23:31:07 +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
regis@google.com ebc3402925 Create symbols for string constants.
Review URL: https://codereview.chromium.org//11360231

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14866 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 21:05:55 +00:00
fschneider@google.com 569322cec5 Improve SHR by using range information for the shift count.
Avoid emitting unnecessary range checks for the shift count
if the value is known to be positive and/or less than the
max shift count.
Review URL: https://codereview.chromium.org//11364222

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14864 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 20:00:47 +00:00
regis@google.com 7614e956dc Check result type of redirecting factory in checked mode.
Review URL: https://codereview.chromium.org//11369219

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14862 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 19:02:08 +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
hausner@google.com 4ca0c72fd5 Enforce proper library/import syntax
Review URL: https://codereview.chromium.org//11312197

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14828 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 01:06:48 +00:00
vegorov@google.com f46860b868 Eradicate CallSiteInliner::next_ssa_temp_index_.
It should always be equal to the max SSA temp index stored on the caller graph itself. Thus it is redundant and dangerous to store it in two places.

R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14827 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 00:50:57 +00:00
srdjan@google.com 1fad6314b7 Do not add InstantiatedTypeArgument entries into cache as they cannot be canonicalized. Limit the maximum subtype cache size, so that it does not become brobdingnagian and thus slows the GC.
Review URL: https://codereview.chromium.org//11369204

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14825 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-13 00:43:17 +00:00
hausner@google.com 4a0f4b0911 Fix debugger test
Review URL: https://codereview.chromium.org//11369203

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14823 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:51:51 +00:00
iposva@google.com c9c79e6bcc - Fix x64 build.
Review URL: https://codereview.chromium.org//11362214

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14822 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 23:26:38 +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
hausner@google.com 959f9ab4c4 More function literal changes in tests.
Review URL: https://codereview.chromium.org//11363206

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14816 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:57:39 +00:00
fschneider@google.com 8aa175b9e6 Restrict immediate operands to smi where only smis are supported.
Re-enable redundant phi elimination.

Add x64 codegen templates and assembler instructions for immediate operands.

Fix x64 assembler for imull when using r8-r15.

Add x64 instruction for imulq(reg, imm).

Fix x64 disassembler printing of immediates.
Review URL: https://codereview.chromium.org//11362210

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14814 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:44:34 +00:00
hausner@google.com b2cbdba375 Remove named function literals from library and tests
Start eliminating old-style function literals, i.e. remove
return type and function names.

Enforcing new style function literal syntax can be turned
on with the vm flag --strict_function_literals.
Review URL: https://codereview.chromium.org//11377102

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14805 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 19:55:11 +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
floitsch@google.com 8e6f238f86 a === b -> identical(a, b)
Replace === null with == null.

BUG=http://dartbug.com/6380

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14794 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 17:19:58 +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
regis@google.com 40276f8c30 Fix result type checking of factory constructors of generic classes in VM.
Add a language test.
Fix some language tests.
Fix runtime library.
Note: This does not yet fix result checking of redirecting factories.
Review URL: https://codereview.chromium.org//11369168

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14769 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 23:51:06 +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
srdjan@google.com 2fdbeb2153 Make sure that ParsedFunction holds onto zone handles.
Review URL: https://codereview.chromium.org//11364166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14718 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-09 00:58:21 +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 c93feb7c76 Fix broken VM build.
TBR=srdjan@google.com
Review URL: https://codereview.chromium.org//11364161

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14711 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 22:18:46 +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
vegorov@google.com 78c5832342 Use structural loop info computed by register allocator to mark loop phis.
Currently it disagrees with loop information computed in other parts of optimization pipeline that do not require loops to be properly nested.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14705 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 19:13:57 +00:00
gram@google.com 96016f9034 Fix library syntax
Review URL: https://codereview.chromium.org//11368124

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14701 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:41:58 +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
iposva@google.com 48aed26029 Fix bug 6586:
- Attempt to run the Monitor thread_test multiple times before failing
  due to its potential to failure due to timing.
- Use named constants when converting millis to seconds and nanos.
Review URL: https://codereview.chromium.org//11361157

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14695 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 18:07:54 +00:00
vegorov@google.com 7c8923b829 Try allocating loop phi into a register even if phi has only unconstrained uses but there are cheap eviction candidates: values that come into the loop and have only unconstrained uses in it.
When spilling a value inside the loop that has only unconstrained uses in this loop move spilling point outside of the loop.

This tweaks allow to minimize amount of memory moves on loop back edges.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14673 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 02:23:41 +00:00
srdjan@google.com 160c56e56b Add flag --remove-redundant-phis, default to false until incorrect code generation is fixed. This CL makes all test pass with --optimization-counter-threshold=5 .
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14668 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-08 00:19:53 +00:00
srdjan@google.com 80a4b76c81 Fixed disabling inlining of static calls that were not executed.
Review URL: https://codereview.chromium.org//11275180

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14611 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-07 01:34:50 +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
hausner@google.com 323c735040 Make sure setter does not conflict with method
Review URL: https://codereview.chromium.org//11312109

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14600 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 22:51:01 +00:00
asiva@google.com 657358ecc2 Avoid duplicate null checks when calling SetRaw from InitializeHandle
Review URL: https://codereview.chromium.org//11369028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14589 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 19:11:07 +00:00
asiva@google.com ab2cf23a19 Fix length computation in Dart_StringToUTF8.
Review URL: https://codereview.chromium.org//11275107

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14588 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 19:07:43 +00:00
hausner@google.com 99c505e9b3 Fix various inheritance bugs
Fields can be overridden by subclasses
A setter does not conflict with a method
Eliminate outdated tests

Fixes issue 6482
Review URL: https://codereview.chromium.org//11312095

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14583 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 17:54:27 +00:00
asiva@google.com f4fc4f8318 Fix some warnings generated when -Wconversion-null is used.
Review URL: https://codereview.chromium.org//11312096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14553 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 02:58:00 +00:00
asiva@google.com c1d07c40b0 Added a unit test case for issue 6448
Review URL: https://codereview.chromium.org//11359064

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14549 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 00:56:53 +00:00
asiva@google.com 48a8be1d7c Fix compiler warning.
Review URL: https://codereview.chromium.org//11364084

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14548 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 00:56:41 +00:00
tball@google.com b509fa659b Made string sub-classes friends of Object, to give them access to Object::Allocate when compiling with clang.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14547 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 23:51:40 +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 32c54b3d60 Remove special meaning when usage counter reaches the threshold.
Review URL: https://codereview.chromium.org//11366076

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14540 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-05 17:07:06 +00:00
hausner@google.com 95c79712da Make library, import, export, part pseudo-keywords
Resubmit cl 14446 after Ivan's keyword table fix.
Review URL: https://codereview.chromium.org//11367069

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14500 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 20:30:08 +00:00