Commit Graph

2375 Commits

Author SHA1 Message Date
fschneider@google.com 71767f5218 Add code for CPU feature detection and use it to detect SSE3 and SSE 4.1.
The Dart VM now requires at least SSE3 to build and run.

There is a new flag --use-sse41 (default:true) to disable the use of 
SSE 4.1 features manually. 
Review URL: https://codereview.chromium.org//10990028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12897 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 09:08:21 +00:00
zerny@google.com 630defd4cb Relax assertions on equality of load fields.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12896 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 08:28:45 +00:00
ager@google.com 7977b42215 Update all occurrences of raw strings.
R=hausner@google.com,kasperl@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12893 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 06:01:23 +00:00
srdjan@google.com 51011ad470 Fix incorrect strict not-equal comparison when both arguments are constants.
Review URL: https://codereview.chromium.org//10977021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12881 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 20:59:37 +00:00
srdjan@google.com 8415b6e37c In strict comarison use constants instead of registers if possible.
Review URL: https://codereview.chromium.org//10977020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12879 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 20:34:15 +00:00
regis@google.com 656cdf40d4 Fix snapshot reading of canonicalized types.
Change some redirecting factory compile-time errors into dynamic errors after
discussion with Gilad (negative tests still missing).
Review URL: https://codereview.chromium.org//10996002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12872 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 19:26:53 +00:00
srdjan@google.com 4c81a6bfc7 Call compiled static targets directly instead of resolving them at first call.
Review URL: https://codereview.chromium.org//10987031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12870 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 19:04:06 +00:00
hausner@google.com ffedcb612d Make assert a reserved word
Issue 5051.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12861 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 17:59:35 +00:00
srdjan@google.com 11abda4702 Move HasOneTarget to ICData.
Review URL: https://codereview.chromium.org//10981010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12854 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 17:19:11 +00:00
hausner@google.com c13e591405 Implement part header
This is the final piece in the new import syntax.
Review URL: https://codereview.chromium.org//10989010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12850 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 16:45:14 +00:00
zerny@google.com 7c03f02086 Fix error in r12771 disabling licm.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12849 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 16:41:51 +00:00
vegorov@google.com 7e949446ca Disregard constants with no SSA temp index in register allocator.
R=fschneider@google.com
BUG=dart:5416

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12848 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 16:36:56 +00:00
zerny@google.com cd514c84b4 Add is_inlinable field to functions.
Repeated attempts at inlining functions that cannot be inlined leads to
noticeable performance regression when compiling with dart2js.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12842 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:58:51 +00:00
lrn@google.com a1faa6f135 Change IllegalArgumentException to ArgumentError.
Review URL: https://codereview.chromium.org//10989013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12841 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-25 12:27:52 +00:00
asiva@google.com 690b823195 Fix the types used in bit fields and a few other places.
Review URL: https://codereview.chromium.org//10967044

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12820 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 23:25:44 +00:00
hausner@google.com aaf9159b8a Implement part directive
This replaces the existing #source directive.
Review URL: https://codereview.chromium.org//10985005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12818 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 23:18:04 +00:00
srdjan@google.com 7e0a30ee00 Remove unnecessary throws in growablearray.
Review URL: https://codereview.chromium.org//10987004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12815 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 22:37:03 +00:00
iposva@google.com d3f5b60cd5 - Add support for --help and --verbose to print usage message of the standalone binary.
Review URL: https://codereview.chromium.org//10979006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12814 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 22:26:37 +00:00
srdjan@google.com f02b385f3c Emit kDeoptBefore only in unoptimzied code (target when switching from optimized to unoptimized code).
Review URL: https://codereview.chromium.org//10979004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12812 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 21:54:51 +00:00
hausner@google.com 928148cfc3 Address Siva's comments
TBR=asiva
Review URL: https://codereview.chromium.org//10982012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12811 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 21:53:45 +00:00
hausner@google.com 201bce4219 Support for show/hide combinators
- Add a new VM object called a Namespace.
- A Namespace is a library, and two list of names to hide/show.
- Convert Library and LibraryPrefix to contain Namespace
  objects instead of Libraries in their import list.
Review URL: https://codereview.chromium.org//10967052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12804 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 20:46:56 +00:00
regis@google.com 61297238fb Support redirecting factory constructors in the VM (issue 3969).
Add test (negative tests still missing).
Some more work is needed regarding when to throw a dynamic error and when to
report a compile-time error. Some questions are not answered by the spec.
Review URL: https://codereview.chromium.org//10964058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12791 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 17:28:37 +00:00
kmillikin@google.com c70bcfcfa3 Support constant folding of instructions with constant smi values.
In sparse conditional constant propagation, replace instructions with
constant smi values with their constant value.  Extend the analysis to
understant shift and bitwise binary operations.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12778 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 13:14:54 +00:00
zerny@google.com 89bf06ab7f Remove caller arguments from nested deoptimization environments.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12777 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 13:01:55 +00:00
kmillikin@google.com c6ef238b86 Check for a NULL value before passing it to a function that assumes non-NULL.
R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12776 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 12:56:25 +00:00
vegorov@google.com 6560f5c84b Fix convergence issues in range analysis.
Split it into three phases: initialization, widening and narrowing.

During widening and narrowing phi-ranges change according to classical widening and narrowing operators defined as:

Widening:
  [_|_, _|_] v [a, b] = [a, b]
  [a, b] v [c, d] = [c < a ? -inf : a, d > b ? +inf : b]

Narrowing:
  [a, b] ^ [c, d] = [(a == -inf) ? c : min(a, c), (b == +inf) ? d : max(b, d)]

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12772 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 12:00:19 +00:00
zerny@google.com b4ccb26cb6 Disable loop invariant code motion on deoptimized functions.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12771 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 11:28:51 +00:00
ager@google.com 02b566ee62 Add documentation to the Object class in the core library.
R=lrn@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12770 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 11:07:34 +00:00
kmillikin@google.com 63fa392807 Reapply "A simpler scheme for garbage collection of ureachable phi inputs."
Fix two issues:

* Unreachable code elimination did not correctly identify all unreachable
  blocks.

* Loop detection in the register allocator relied on the block IDs.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12756 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 07:27:36 +00:00
jackpal@google.com 3e510176c2 Fix Android build breaks
Prevent Android's STLPort from undefining global functions from
math.h when cmath is included after math.h.

The Android STLPort does not provide std::assert or std::atexit. Use
the C versions of these functions on Android.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12741 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 22:04:37 +00:00
vegorov@google.com e5d132e2f8 Disable range analysis. Causes timeouts on dart2js buildbots.
TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12740 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 21:51:40 +00:00
vegorov@google.com 5cc5ab0e04 Do not collect smi values with no ssa index for range analysis.
TBR=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12738 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 21:08:32 +00:00
vegorov@google.com 5355309db1 Fix Mac build broken by r12733.
TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12734 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 20:17:15 +00:00
vegorov@google.com 17907d32de Implement range analysis for smi values.
And use it to eliminate overflow checks on + and - operations.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12733 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 20:06:31 +00:00
zerny@google.com eecf2ae922 Fix for off-by-one error in assertion for r12715.
TBR=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12718 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 15:25:21 +00:00
zerny@google.com 2f549da394 Use the inner deoptimization frame when setting incoming arguments.
This fixes issue 5318 where deoptimization of an inlined call resulted in an
incorrect value being set in the deoptimized frames.

R=vegorov@google.com
BUG=5318

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12715 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 14:58:30 +00:00
fschneider@google.com d2e7dba0b5 Fix bug in assigning the positions of safepoints.
Safepoints are associated with the end of instructions so that
splitting a live range at a safe point position makes the safepoint
at that position belong to the correct live range.
Review URL: https://codereview.chromium.org//10963029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12708 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 14:07:46 +00:00
vegorov@google.com 149c119a01 Improve ShouldSpecializeForDouble to handle ICs with multiple checks.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12703 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 13:30:23 +00:00
ager@google.com 5c9f9ef74f Avoid needless int64_t to intptr_t conversion in eventhandler.
R=sgjesse@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12693 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 11:40:40 +00:00
ager@google.com 6236cd51a5 Use native fields for process pid and fix bug that allowed killing
a process before it was started.

We should make the change to make Process.start return a future that
does not complete unless the process is actually started. That would
have avoided this issue as well.

R=sgjesse@google.com
BUG=dartbug.com/5301

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12691 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 11:07:36 +00:00
sgjesse@google.com 4ecf9c3a19 Update documentation for HTTP response status code
R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12685 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 09:06:50 +00:00
ager@google.com c6aea6b1eb Use native wrapper fields to store socket ids.
This relies on landing the change to fix implicit super constructors
for subclasses of something that has native fields.

R=sgjesse@google.com
BUG=dartbug.com/5301

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12684 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 08:19:01 +00:00
ager@google.com b065e9cb29 Fix implicit super constructor calls for sub-classes of native field wrappers.
The current code does not add implicit super calls for any sub-classes
of native field wrappers. It should only omit them from the actual
native field wrappers.

I encountered this issue when looking into dartbug.com/5301.

The test in the parser is not pretty. However, since the native field
wrappers can be generated through the API a better solution was not
immediate. I wanted to check if the class was from the
dart:nativewrappers library, but through the API you can create
native wrappers in any other library as well.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12679 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 05:40:33 +00:00
asiva@google.com 4140ed9d5b Fix for issue 5223 : Import 'dart:core' implicitly only if it has not been
already explicitly imported in the script.
Review URL: https://codereview.chromium.org//10949028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12673 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 00:43:08 +00:00
iposva@google.com eee4bbc1ef - Add definition of "int hashCode()" to Object.
- Implement hashCode in the VM.
- Mark hashCode as unimplemented in dart2js.
- Update test using the identity hashcode.
Review URL: https://codereview.chromium.org//10956026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12669 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-21 00:32:58 +00:00
asiva@google.com 72f3a9c2ba Issue a more meaningful error message when we see duplicate definitions (ambiguous reference)
Review URL: https://codereview.chromium.org//10969002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12657 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 21:04:14 +00:00
iposva@google.com b9327e0236 - Make the VM understand the --checked flag to be aligned with dart2js.
- Adjust some of the checked mode tests to pass --checked and --enable-checked-mode.
Review URL: https://codereview.chromium.org//10962013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12651 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 18:19:06 +00:00
iposva@google.com e95e5160ce - Fix flag names.
Review URL: https://codereview.chromium.org//10958002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12649 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 17:38:01 +00:00
zerny@google.com 5d2c29fef7 Disable inlining by default.
Inlining deoptimizable code currently causes errors.

See Issue 5318.

R=fschneider@google.com
BUG=5318

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12645 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 15:36:26 +00:00
lrn@google.com c0f42d2748 Made removeAt errors consistent between dart2js and VM.
Reneabled test for VM.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12632 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-20 12:52:54 +00:00