Commit Graph

28 Commits

Author SHA1 Message Date
fschneider@google.com dfda7854a8 Fix source position for stack traces with optimized top function.
Fix decoding of the deoptimization info when constructing a stack trace.

Fix stack trace for checked mode exceptions from optimized code.

BUG=dart:8058
TEST=runtime/tests/vm/dart/optimized_stacktrace_test.dart,
     tests/language/stack_overflow_stacktrace_test.dart
Review URL: https://codereview.chromium.org//12049039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17755 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 12:38:27 +00:00
asiva@google.com f4fe42c280 Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION
which have different implementations of 'operator=' and 'operator^='.
In the case of FINAL_OBJECT_IMPLEMENTATION we do not do the vtable setting
in these methods (Note the |= operator functionality is now subsumed into
the new implementation of "operator^=")
Review URL: https://codereview.chromium.org//12052033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17491 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-23 20:01:31 +00:00
srdjan@google.com d56766f251 More ^= to |=
Review URL: https://codereview.chromium.org//11941021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17308 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 19:43:19 +00:00
regis@google.com 912194a756 Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
Review URL: https://codereview.chromium.org//11956004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
fschneider@google.com 8c5b198d95 Optimized loads/stores for scalar list: Uint8Clamped, Int8, Int16, Uint16.
This CL adds optimized stores for Uint8ClampedList, and
loads+stores for Int8List, Int16List and Uint16List.


TEST=tests/standalone/byte_array_test.dart, tests/standalone/int_array_test.dart
Review URL: https://codereview.chromium.org//11967012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17190 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-17 10:43:46 +00:00
srdjan@google.com faeb58ba40 Fix printing of deoptimized function.
Review URL: https://codereview.chromium.org//11886008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17002 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-12 00:44:16 +00:00
asiva@google.com 62115b51fe Fix for issue 7757
- Iterate and collect all the inlined functions in an optimized dart frame
  into the stack frame when throwing an exception.
- Added a OptimizedDartFrameIterator class which iterates over all the inlined
  functions of a single optimized dart frame.
Review URL: https://codereview.chromium.org//11833025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17000 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-12 00:24:28 +00:00
kmillikin@google.com 8c4e214722 Pass IC data and arguments descriptor to IC miss runtime functions.
Before, we obtained them by pattern matching backwards on the machine
instructions at the call site.  This previous approach becomes unwieldy when
we need to use to use multiple instance call patterns.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15737 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-05 15:35:18 +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
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
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
srdjan@google.com 64a5b5f609 In optimized code always deoptimize if we encounter an instance call without type feedback (ICData has no checks).
Fix a bug in inliner: do not inline methods that have no compiled code as we can not deoptimize into them. This is the simplest fix, more complex fixes can be implemented if we see a need for them.

This improves the speed of Meteor by 15% and NavierStokes by 40% (Mac OS X). 
Review URL: https://codereview.chromium.org//11186007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13712 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 23:46:27 +00:00
zerny@google.com c0418b9d52 Don't inline functions above the deoptimization threshold.
Moved deoptimization counter increment code into the PcMarker instruction where it executes on each occurring function in the optimized frame.

R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13223 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 12:24:25 +00:00
kmillikin@google.com 932b29c74e Pack deopt ID into the return before and return after deopt instructions.
Pack it into a machine word-sized bit field along with the object table
index.  The commands do not implicitly use the object table index any more,
which allows removing deopt IDs from the object table and pooling function
entries.

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13214 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 09:03:28 +00:00
fschneider@google.com 6632f191c4 Support for unboxed 64-bit integer bitwise operations and equality on ia32.
This CL adds AND, OR, XOR and == operations on unboxed 64-bit integers
(aka. mints).

Unboxed mints are stored in xmm registers. Each xmm register location
has an additional bit to keep track of its value representation.

Unboxed mints are materialized on the heap on deoptmization in the same way as
unboxed doubles.

The SSE instructions used are available on all CPUs that support SSE 4.1.
Review URL: https://codereview.chromium.org//10968059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13112 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 11:25:53 +00:00
kmillikin@google.com d7115e5eda Remove deoptimization index PC descriptors.
Put the PC (offset) of the deoptimization point and the deoptimization
reason in the DeoptInfo table.  The table entries are now triples of
(PC offset, info, reason).

R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13056 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 10:16:22 +00:00
zerny@google.com aa5281c88a Reapply "Deoptimization support in inlined code."
This reapplies r12488 with a fix.

R=kmillikin@google.com,fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12499 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 13:41:20 +00:00
zerny@google.com e174be3f27 Revert "Deoptimization support in inlined code."
This reverts commit a78e33f178aae74a97f4231ca98183adf97fda71.

TBR=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12492 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 12:18:04 +00:00
zerny@google.com 64a9ca2b81 Deoptimization support in inlined code.
Review URL: https://codereview.chromium.org//10928232

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12488 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-18 11:53:59 +00:00
cshapiro@google.com da14bf70a7 Add attributions so printf like functions can have their arguments checked.
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.

Review URL: https://chromiumcodereview.appspot.com//10869063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
srdjan@google.com a1cab6c167 Split deopt-after and deopt-before handling:
- deopt-before describes a deoptimization that occurs before the instructionhas completed and requires a stub
- deopt-after describes deoptimziation after the instruction, used by lazy deooptimization, requires no stub.
Review URL: https://chromiumcodereview.appspot.com//10913031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11720 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-31 20:18:40 +00:00
vegorov@google.com a573d2dec8 Unbox phis that were proven to be of type Double.
Eliminate Boxing/Unboxing pairs.

Allow boxing, unboxing and double binary operations to participate in CSE.

Allow double comparisons to operate on unboxed inputs.

Support XMM registers and double spill slots in deoptimization.

Save XMM registers when calling to runtime from WriteBarrier stub.

R=srdjan@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10919008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11652 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 20:39:48 +00:00
srdjan@google.com caf04303f7 Deoptimization can occur at Dart calls (includes native calls to C) but not at runtime calls. This assumption (verified with Todd and Gilad) simplifies the implementation of lazy deoptimization considerably.
Add flag --deoptimize-alot, which will lazily deoptimize all live optimized frames. Currently only the presence of deoptimization information is checked.

Add kDeoptAfter deoptimization point, which is the continuation for lazy deoptimization, after a call. Rename kDeopt to kDeoptBefore.

Removed a tests case that called into a native without properly setting up a Dart frame (Ok-d by Siva).

Native functions are not optimizable.

TODO: Split deoptimization information from DeoptimizationStubs. Check for redundant PcDescriptor information (what can be merged, especially at calls).
Review URL: https://chromiumcodereview.appspot.com//10885039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11642 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:53:46 +00:00
kmillikin@google.com 58d842d6d7 Make constants computations instead of values.
This change requires a pool of global constants that don't have an easy
place to go in the instruction stream.  Currently, that is only the constant
null used to mark eliminated phis in deoptimization environments.

R=fschneider@google.com
BUG=

Review URL: https://chromiumcodereview.appspot.com//10894034

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11518 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 12:56:57 +00:00
srdjan@google.com b7f043bc6b Replace deopt stubs location/register shuffling with using deopt-info. Added deopt instruction commands. Also fixes a crash in IA32 with use_ssa where the stack is incorrect after deoptimization. Tested IA32 with and without use-ssa.
Review URL: https://chromiumcodereview.appspot.com//10825236

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10469 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-09 23:46:38 +00:00
srdjan@google.com 10b1928a3d Add deopt info to code object and print it. Still missing is the code to 'execute' the deopt instructions and thus deoptimize.
Review URL: https://chromiumcodereview.appspot.com//10823131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10308 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 21:15:26 +00:00