Commit Graph

13143 Commits

Author SHA1 Message Date
fschneider@google.com b95ab69b0f Add explicit smi checks for unary smi operations.
Review URL: https://chromiumcodereview.appspot.com//10883063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11394 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 16:10:04 +00:00
zerny@google.com 7568f3b043 Environment sets the environment position when copying to maintain the use lists.
R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11386 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 14:16:02 +00:00
fschneider@google.com 862d4f0530 Split class and smi check from array operations.
Array loads and stores have explicit receiver class
check and index smi check instead of emitting the checks
as part of the original instruction.

This allows redundant checks before array operations
to be eliminated.
Review URL: https://chromiumcodereview.appspot.com//10883054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11385 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 14:07:41 +00:00
fschneider@google.com 8b206bf1a6 Clean up LoadInstanceField and StoreInstanceField.
Since we have explicit class-id checks, I removed the now
unused code that emitted the checks as part of the instruction.
Review URL: https://chromiumcodereview.appspot.com//10876079

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11383 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 14:01:27 +00:00
zerny@google.com 8e78defe50 Validate well-formedness of the use lists in debug mode.
R=fschneider@google.com,kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11379 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 12:17:47 +00:00
fschneider@google.com bc54c438a0 Separate branch on strict compare into a new IL instruction.
This avoid unnecessary environment uses since the strict compare
can not deoptimize.

This is a first step in refactoring branch instructions so that we
can easily do explicit checks for specialized comparisons (smi, double).
Review URL: https://chromiumcodereview.appspot.com//10867050

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11373 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 09:30:20 +00:00
ager@google.com 570d769b30 Use patching for Expando so the implementation-specific files are not needed in the SDK.
Make extra methods private in VM version.

R=ajohnsen@google.com,cshapiro@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11369 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-27 07:15:18 +00:00
srdjan@google.com 3d8e3c169a Use type propagation to eliminate store barriers.
Review URL: https://chromiumcodereview.appspot.com//10876072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11357 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-25 00:27:07 +00:00
srdjan@google.com 7af8772f97 Skip store buffer update for compile time constants.
Review URL: https://chromiumcodereview.appspot.com//10873070

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11354 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 23:06:12 +00:00
srdjan@google.com f0f7a4ca1a Require ResultCid specification in every computation, that way we can differentiate between computation that do not produce results (kIllegalCid as result-cid).
Review URL: https://chromiumcodereview.appspot.com//10875058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11346 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 21:48:57 +00:00
srdjan@google.com 68d2989a34 Do not intrinisify closurized functions (they may have different arguments). Fix capacity check.
Tested with apidoc.dart.
Review URL: https://chromiumcodereview.appspot.com//10870053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11336 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 19:11:06 +00:00
regis@google.com d0539c0335 Propagate type of list literal from parser to ast, graph, and optimizer.
Review URL: https://chromiumcodereview.appspot.com//10878042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11329 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 18:17:11 +00:00
hausner@google.com 028f8c78d1 Suppress "Waiting for debugger..." message on cosole
Less noise in the debugger console window.

Also put the verbose debugger output under command line flag
instead of compile time flag.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11328 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 17:57:57 +00:00
srdjan@google.com f273259bb2 Fix intrinsified allocation of arrays which cuased crash on ia32: do not allow allocation of arrays with a length that is too large.
Review URL: https://chromiumcodereview.appspot.com//10874061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11325 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 16:51:03 +00:00
vegorov@google.com 264c4f6d1a Add support for XMM registers in SSA code generation pipeline.
Split BinaryDoubleOp into several instructions that manipulate unboxed doubles.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11313 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 14:45:42 +00:00
fschneider@google.com 323e06222e Reland "Add a simple dominator based redundancy elimination" and fix a register allocation bug.
Original CL: http://codereview.chromium.org/10872035/

It enables elimination of redundant expressions across
basic blocks.

Currently used for smi checks and class checks, but will
be extended to other expressions in a separate CL.


Additionally, this fixes a bug in the register allocator where
a blocked register was illegally assigned to an unallocated live range.

It also fixes a Mac compiler issue with the constructor of
DirectChainedHashMap.
Review URL: https://chromiumcodereview.appspot.com//10871060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11302 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 11:10:36 +00:00
srdjan@google.com 693d3974f9 Disable intrinisification of GrowableArray add until apidoc crash is fixed.
Review URL: https://chromiumcodereview.appspot.com//10871052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11280 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 00:25:41 +00:00
iposva@google.com 093c16d6ea - GET_NATIVE_ARGUMENT uses the isolate which is passed in to allocate the handle.
- Avoid frequent calls to Isolate::Current().
- Avoid handle allocation in a loop for StringBase.createFromCodepoints.
- Avoid copying in StringBase._interpolate.
Review URL: https://chromiumcodereview.appspot.com//10878037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11279 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 00:22:07 +00:00
srdjan@google.com 68124e35ca Intrinsify GrowableObjectArray.add.
Review URL: https://chromiumcodereview.appspot.com//10869038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11277 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 00:07:07 +00:00
srdjan@google.com b77b6f913d Type of PhasePramater is Smi.
Review URL: https://chromiumcodereview.appspot.com//10868057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11276 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 23:50:23 +00:00
asiva@google.com d9e71facc7 Add smi_type, mint_type and double_type to the predefined types list for script snapshots.
Review URL: https://chromiumcodereview.appspot.com//10869035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11275 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 23:36:37 +00:00
turnidge@google.com bfc3132e94 Missing file from last commit.
Review URL: https://chromiumcodereview.appspot.com//10874043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11263 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:59:28 +00:00
turnidge@google.com be1824962e Make StringBase._substringUnchecked a native function.
This avoids making a throw-away list on every substring operation.
Fixed the underscore on the function name while I was at it.
Review URL: https://chromiumcodereview.appspot.com//10874038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11262 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:48:40 +00:00
tball@google.com 7e2aafa16a Reordered handle validity tests in order of handle type likelihood.
This slightly speeds up verification in Api::UnwrapHandle, which 
only runs with DEBUG enabled.


git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11260 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:26:15 +00:00
srdjan@google.com 49a23354e7 If a PolymorphicInstanceCall has a single target, move its check into a separate class check so that it can get eliminated.
Review URL: https://chromiumcodereview.appspot.com//10876052

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11259 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:25:27 +00:00
regis@google.com a0c527b5d8 Add convenience static members of Type: Smi and Mint.
Use them during type propagation.
Various cleanups.
Review URL: https://chromiumcodereview.appspot.com//10873036

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11258 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 21:04:13 +00:00
iposva@google.com d8f4530942 - Remove redundant assertion.
- Add flag --verify-handles to enable checking when assigning to handles.
Review URL: https://chromiumcodereview.appspot.com//10872043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11250 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 18:55:42 +00:00
hausner@google.com 0300d88b1b Gentle start with removing explicit interfaces
Review URL: https://chromiumcodereview.appspot.com//10832401

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11248 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 18:32:10 +00:00
srdjan@google.com a1774ecfb1 Specify kSmiCid as result of get string or array length operation.
Review URL: https://chromiumcodereview.appspot.com//10875033

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11247 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 18:24:55 +00:00
zerny@google.com 50b114c606 Compute the def-use list on-demand by walking the dominator tree.
This replaces the previous implementation that maintained the def-use lists.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11241 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 16:23:05 +00:00
fschneider@google.com 212c5a4994 Revert my last change r11227.
TBR=kmillikin@google.com
Review URL: https://chromiumcodereview.appspot.com//10871040

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11229 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 13:39:24 +00:00
fschneider@google.com cd606f44f0 Add a simple dominator based redundancy elimination.
It enables elimination of redundant expressions across
basic blocks.

Currently used for smi checks and class checks, but will
be extended to other expressions in a separate CL.
Review URL: https://chromiumcodereview.appspot.com//10872035

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11227 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 13:17:16 +00:00
kmillikin@google.com a953c03b36 Use the location summary to represent safepoint information.
Pass a LocationSummary everywhere instead of a BitmapBuilder.  The
LocationSummary contains information about live registers.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11219 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 10:08:37 +00:00
ager@google.com 7d86630418 Use patching for regexp implementation.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11218 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 09:24:40 +00:00
fschneider@google.com e450dfb95a Add a smi-check instruction for arithmetic smi operations.
The flowgraph optimizer inserts smi checks for the inputs of
arithmetic smi operations:

      PushArgument v0
      PushArgument v1
v2 <- InstanceCall(+, v0, v1) IC[1: Smi, Smi]

becomes

      CheckSmi(v0)
      CheckSmi(v1)
v2 <- BinarySmiOp(+, v0, v1)


Each input operand is checked separately. This avoids using a temp
register for a combined smi check. It also allows us to easily eliminate
the checks for left and right input separately.

There are two ways to eliminate smi checks:
1. By common subexpression elimination: if the value checked is already
   checked for smi-ness before.
2. By class-id propagation: If the input value is guaranteed to be a smi.
Review URL: https://chromiumcodereview.appspot.com//10867012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11216 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 08:24:29 +00:00
kmillikin@google.com 5b27429411 Do not clear the spill slots in optimized code.
Also, change all calls in the prologue to have a stackmap.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11215 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 08:16:12 +00:00
cshapiro@google.com 5134359169 Disable an expensive GC assert unless heap verification also enabled.
This assert verifies every pointer being pushed on the mark stack as
belonging to old-space.  Unfortunately, it turns out that checking for
containment in old-space domainates the running time of programs that
frequently invoke an old-space garbage collection.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11209 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 04:24:01 +00:00
regis@google.com 9efad2644b Re-enable checking of native resolvers.
Review URL: https://chromiumcodereview.appspot.com//10882007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11206 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 03:26:20 +00:00
srdjan@google.com 74a9161438 Fix inlining and intrinsification for moved Math methods.
Review URL: https://chromiumcodereview.appspot.com//10877030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11201 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 01:10:47 +00:00
regis@google.com 3e6596ba22 Temporarily disable checking of native resolvers to make Dartium build green.
A more permanent fix will follow.
Review URL: https://chromiumcodereview.appspot.com//10869024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11200 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 01:01:14 +00:00
regis@google.com fbd17a4d20 Fix Mac build.
Review URL: https://chromiumcodereview.appspot.com//10869022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11199 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:42:43 +00:00
regis@google.com 55c106f812 Make ClassFinalizer indifferent on whether we are generating a snapshot or not.
Add flag --error_on_malformed_type.
Remove obsolete flag --verify_implements.
Support snapshotting of LanguageError (for malformed types) and ApiError.
Review URL: https://chromiumcodereview.appspot.com//10871005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11198 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:27:49 +00:00
cshapiro@google.com 2e00a80dd5 Provide an Expando implementation for the VM.
Review URL: https://chromiumcodereview.appspot.com//10861041

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11196 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-23 00:03:40 +00:00
srdjan@google.com b6042c9419 Fix printing of symbols for profiling on x64.
Review URL: https://chromiumcodereview.appspot.com//10870018

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11192 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 22:48:10 +00:00
asiva@google.com 596a5f1af9 Use kInstanceCid instead of object_store()->object_class() when checking to see if the class is object class.
Review URL: https://chromiumcodereview.appspot.com//10873004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11190 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 22:21:44 +00:00
ager@google.com 722c1a3ce6 Deprecate Math object in corelib in favor of dart:math library.
Review URL: https://chromiumcodereview.appspot.com//10829459

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 14:33:01 +00:00
whesse@google.com b6cda7c0d2 Check for an error handle passed in, in all dart_api functions that return a handle. Pass the error handle through unchanged.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11148 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 13:42:06 +00:00
kmillikin@google.com 57f5dbafd6 Give a length field to stack bitmaps.
The bitmaps describing the stack have an explicit length field.  It is now
an assertion failure to read bits outside the length --- they are no longer
assumed to be false.

Also remove an unused method and simplify the implementation of
BitmapBuilder by removing an embedded member that was always referred to via
a pointer.

R=vegorov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11138 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 12:42:54 +00:00
fschneider@google.com f5ec253dec Split BinaryOp into BinarySmiOp and BinaryMintOp.
This refactoring is a preparation for inserting explicit
class checks for arithmetic operations.
Review URL: https://chromiumcodereview.appspot.com//10879005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11132 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 11:17:57 +00:00
srdjan@google.com 4b19055cfa Factor out code for insertin class checks.
Review URL: https://chromiumcodereview.appspot.com//10868013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11121 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-22 00:42:00 +00:00