Commit Graph

2353 Commits

Author SHA1 Message Date
srdjan@google.com 5d42e63bd1 Optimize left shift of a constant: compute max value of right that does not overflow into Mint/Bigint.
Review URL: https://codereview.chromium.org//12212175

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18525 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 18:10:21 +00:00
fschneider@google.com 0a1d6d15f9 Fix bug in optimizing string .length loads.
We're not allowed to hoist a .length load if the corresponding
class-check is not also hoisted out of a loop.

TEST=tests/language/optimized_string_charcodeat_test.dart
Review URL: https://codereview.chromium.org//12256037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18519 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 15:59:18 +00:00
fschneider@google.com e2a0c8f7ca Optimize stores to ExternalUint8Array and ExternalUint8ClampedArray in the optimizer.
This CL adds support for these two array types to the StoreIndexed instruction.
Review URL: https://codereview.chromium.org//12263010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18517 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 12:59:51 +00:00
fschneider@google.com 352cb5bd78 Use writable register policy to avoid explicit restoring input register after untagging.
This CL produces more compact code if the writable input
register is the last use by avoiding unnecessary re-tagging.
In that case no extra temp generated by the register allocator.
Review URL: https://codereview.chromium.org//12114008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18515 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 11:41:08 +00:00
hausner@google.com d3a1050ebc Minor improvement in mixin application
Build list of functions and attach it to mixing application
class on one call. Takes care of a review comment by Siva.

TBR=asiva
Review URL: https://codereview.chromium.org//12261029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18495 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:48:18 +00:00
johnmccutchan@google.com 9fb0984c9d SSE Assembler + Linux build fixes
Review URL: https://codereview.chromium.org//12223115

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18493 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:05:17 +00:00
srdjan@google.com 39713f0efc The code size does not scale with architecture word size, set code size cutoff limit to 200,000 bytes for all architectures
Review URL: https://codereview.chromium.org//12256028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18492 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:00:09 +00:00
srdjan@google.com 4f285ac0a8 Add flag to block optimizations of large implicit getters. Implicit getters have a 0 size in tokens, therefore also check the size of unoptimized code to decide if a function is optimizable. Print more data with --trace-compiler.
Review URL: https://codereview.chromium.org//12263017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18485 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:52:02 +00:00
hausner@google.com b4527a7465 First stab at mixins in VM compiler
Things not yet supported:
- Type parameters for super class and mixin class
- super call limitation check
Review URL: https://codereview.chromium.org//12210127

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18479 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 21:08:15 +00:00
srdjan@google.com 5694a140e3 Fix allocation of array tables (use store barrier if needed, store values directly instead of via stack).
Review URL: https://codereview.chromium.org//12212050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18464 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 18:44:27 +00:00
vegorov@google.com baa0347253 Reapply r18377 it was reverted due to the unrelated bug it surfaced.
Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields.

Replace multiple fields (result_cid_, propagated_cid_, propagated_type_, reaching_cid_) with a single field of type CompileType which represents an element of type analysis lattice and incorporates information about: value's nullability, concrete class id and abstract super type. This ensures that propagated cid and type are always in sync and complement each other

Implement a new FlowGraphPropagator that propagates types over the CompileType-lattice.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18456 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 17:16:35 +00:00
vegorov@google.com b1a343033e When canonicalizing branch on StrictCompare don't fuse comparisons that can deoptimize or serve as pending deoptimization target for representation changes.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18443 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 14:14:05 +00:00
iposva@google.com c64bb206ec - Make size of the stack red zone depend on word size.
Review URL: https://codereview.chromium.org//12207142

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18426 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 01:13:02 +00:00
srdjan@google.com f0b56ef792 Reduce allocation of ArrayNode-s where a GrowableArray could be used instead.
Review URL: https://codereview.chromium.org//12207137

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18412 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:34:12 +00:00
johnmccutchan@google.com dd140c2958 Revert SSE assembler changes
Review URL: https://codereview.chromium.org//12212151

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18410 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:14:12 +00:00
johnmccutchan@google.com 06eb49d537 SSE Assembler and Disassembler support
Review URL: https://codereview.chromium.org//12207117

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18406 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 22:43:48 +00:00
asiva@google.com 97c6554061 Minor cleanup
- added a field parsed_function to the parser
- remove fields expression_temp_ and saved_current_context_
Review URL: https://codereview.chromium.org//12225141

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18402 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 21:14:05 +00:00
vegorov@google.com 487c73e01f Revert "Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields."
This reverts commit r12365.

Reason: failure on vm-mac-debug (debug_ia32 standalone/io/file_fuzz_test).

TBR=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18378 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 12:36:21 +00:00
vegorov@google.com f8d9a90b2c Remove SminessPropagator and FlowGraphTypePropagator and all associated infrastructure and fields.
Replace multiple fields (result_cid_, propagated_cid_, propagated_type_, reaching_cid_) with a single field of type CompileType which represents an element of type analysis lattice and incorporates information about: value's nullability, concrete class id and abstract super type. This ensures that propagated cid and type are always in sync and complement each other

Implement a new FlowGraphPropagator that propagates types over the CompileType-lattice.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18377 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 12:06:47 +00:00
asiva@google.com 067b8ba92c Add snapshot size to the VM benchmarks suite.
Review URL: https://codereview.chromium.org//12226068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18367 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 02:39:00 +00:00
asiva@google.com a7b617c5d4 Provide implementations for
Dart_ScalarListAcquireData & Dart_ScalarListReleaseData
Review URL: https://codereview.chromium.org//12209075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18330 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 19:48:32 +00:00
floitsch@google.com bbbe0c382d Allow ambiguous Expect and ExpectException imports.
This patch temporarily allows Expect to come from core and from any other library without (I wanted to make the CL public reporting an error (or warning).
Once everyone (including co19) has migrated I will revert this CL.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18318 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-11 17:59:52 +00:00
iposva@google.com d421507d55 - Remove redundant type parameters for internal data.
Review URL: https://codereview.chromium.org//12218082

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18287 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 23:27:50 +00:00
fschneider@google.com f29d1c7aa2 Optimize branches in polymorphic equality operations.
Review URL: https://codereview.chromium.org//12209057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18256 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-08 15:47:09 +00:00
asiva@google.com 80e281a078 Fix for issues 6080 -
- Read the saved context from the entry frame when straddling across C++ frames while iterating over a stack trace in the debugger. This ensures that the correct context is setup in the ActivationFrame structure in these scenarios (instead of the empty context).

- Read the saved context from the caller's frame when iterating over a stack trace in the debugger. The compiler saves the context in the caller frame before invoking closures, we read this saved context when iterating the stack trace.
Review URL: https://codereview.chromium.org//12179020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18235 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 22:43:16 +00:00
asiva@google.com d6c8e4f892 Add unit tests which reliabily reproduces the error condition reported in Issue 6080 without the need for a specialized and inconsistent private environment.
Review URL: https://codereview.chromium.org//12218046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18232 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 20:55:21 +00:00
kmillikin@google.com ab3cbf5796 Change CSE, LICM, and range analysis to preserve use lists.
Change the common subexpression elimination, loop-invariant code
motion, and range analysis passes to maintain use lists.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18209 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 09:42:36 +00:00
regis@google.com 5675b85979 Generate first ARM assembler test and execute (simulate) it.
RFC: First draft showing how generated ARM code accesses GC'ed objects and
accesses patched call targets.
Review URL: https://codereview.chromium.org//12224024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18200 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:55:47 +00:00
fschneider@google.com f0caa40576 Add optimized loads from ExternalUint8ClampedArrays.
The generated code is exactly the same as for ExternalUint8Array.

TEST=tests/standalone/byte_array_test.dart
Review URL: https://codereview.chromium.org//12225049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18183 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 19:00:50 +00:00
fschneider@google.com 8200c55ed9 Flip test condition when testing for fixed-length array length load.
This addresses additional comments to my previous CL:
https://codereview.chromium.org/12088108/
Review URL: https://codereview.chromium.org//12208046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18175 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 16:21:51 +00:00
fschneider@google.com 7fc8f72c25 Inline getters of byte array view in the optimized flow graph.
This CL provides inline IL code for the getters _getInt8, _getInt16, etc.
to speed up [] and byte array views.

The code uses the existing LoadIndexed instructions by passing a index
scale factor explicitly: For normal arrays loads, the scale factor is equal
to the element size. For byte array access, the scale factor is always 1.

I'm adding inlined setters in a separate CL.
Review URL: https://codereview.chromium.org//12218008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18173 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 15:18:57 +00:00
floitsch@google.com e1efa71761 Hide collection-dev library.
Committed: https://code.google.com/p/dart/source/detail?r=18167
Reverted: https://code.google.com/p/dart/source/detail?r=18169

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18172 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 15:11:47 +00:00
floitsch@google.com 8762c41590 Revert "Hide collection-dev library."
This reverts commit 18167.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18169 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 13:08:29 +00:00
floitsch@google.com 2a56791380 Hide collection-dev library.
Review URL: https://codereview.chromium.org//11938036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18167 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 12:43:07 +00:00
asiva@google.com 109cbae3dd Minor cleanup of activation frame creation code. Get the code object while iterating the frames as that is way faster than doing a code lookup later.
Review URL: https://codereview.chromium.org//12225031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18162 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 01:45:56 +00:00
iposva@google.com fe95f789c8 - Add handling of private dart:_ libraries.
- Make dart:collection-dev a private library by renaming it to dart:_collection-dev.
- Predefine the URIs of dart: libraries as VM symbols.
Review URL: https://codereview.chromium.org//12220027

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18159 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-06 00:29:48 +00:00
hausner@google.com 9d42f829f2 Save 0.00001% memory
Release the functions and fields array after patching classes.
Review URL: https://codereview.chromium.org//12207028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18158 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 22:43:57 +00:00
asiva@google.com cd7b9395b6 Rename the accessor functions saved_context_var and set_saved_context_var to saved_entry_context_var and set_saved_entry_context_var so that it matches the local variable name used. This avoids confusing this with the saved_context_var variable which is used by try statements.
Review URL: https://codereview.chromium.org//12207023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18157 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 20:42:33 +00:00
hausner@google.com e56a1fc324 Remember owner class of patch code
This is a step towards using PatchClass for mixins
Review URL: https://codereview.chromium.org//12213020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18155 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-05 20:19:32 +00:00
srdjan@google.com eaa1c974a3 Use SAR for divident by a power-of two constant divisor.
Review URL: https://codereview.chromium.org//12091100

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18075 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 20:29:58 +00:00
kmillikin@google.com a518a0a36f Add a use list iterator that allows mutation of current.
Add Value::Iterator that supports removing the current use from the
underlying use list, including deleting it or moving it to another use
list.  Use it in range analysis and representation selection.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18055 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 17:04:02 +00:00
kmillikin@google.com 361300cb71 Move recording of definition uses from the value to the definition.
It was weird that this method mutated an object that wasn't even
mentioned in the call.  Also, change Definition::ReplaceUsesWith so that
it appends all at once instead of consing each individual use.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18048 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 14:01:35 +00:00
regis@google.com ca927278dc Resubmit reverted r17962, but, for now, only report error about unfinalized
types if flag --error_on_malformed_type is specified.
Fix one more case of unfinalized signature type.
Review URL: https://codereview.chromium.org//12183014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18033 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-04 05:51:02 +00:00
regis@google.com feb7329e2f Resubmitting r18013.
Review URL: https://codereview.chromium.org//12084120

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18018 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-02 00:18:37 +00:00
regis@google.com 450bf7c06c Revert r18013 failing on Windows.
Review URL: https://codereview.chromium.org//12169002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18015 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:58:53 +00:00
regis@google.com c651283897 Cleanup api for isolate state checking.
This should avoid the breakage on Windows observed by reverted r17962.
Review URL: https://codereview.chromium.org//12082126

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18013 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 23:43:33 +00:00
asiva@google.com cff409db81 Restore factory names in the intrinsifier list to the way they were (is used in a special way during lookup of private corelib classes).
Review URL: https://codereview.chromium.org//12095110

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17998 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 20:02:30 +00:00
asiva@google.com 20f821b4cb Instead of setting up the can intrinsify state lazily setup eagerly
in Object::Init() so that the snapshot will carry it and when
running from a snapshot Intrinsifier::CanIntrinsify can be just a bit check.
Review URL: https://codereview.chromium.org//12096105

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17995 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 19:16:34 +00:00
srdjan@google.com ac523eceeb Fixed simarm, simmips builds.
Review URL: https://codereview.chromium.org//12161004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17992 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 18:44:40 +00:00
srdjan@google.com 3f126d4c12 Intrinsify external uint8 clamped array setter and getter.
Review URL: https://codereview.chromium.org//12114041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17991 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-01 18:29:38 +00:00