Commit Graph

13143 Commits

Author SHA1 Message Date
hausner@google.com 08893af550 Revert change 12289
Will resubmit tomorrow. Dartc and Editor need to cleanup static finals.
Review URL: https://codereview.chromium.org//10928169

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12291 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 00:22:12 +00:00
asiva@google.com 724b8600d4 Move all the closure related fields in RawFunction into a new class
called RawClosureData
Add a field called 'data_' in RawFunction which points to a RawClosureData
object for closure functions, a signature class for signature functions or
an implicit closure function if there is an implicit closure for a regular
function.

This ensures that we don't burn 5 fields in RawFunction for normal functions.
The heap savings from this change on standalone dart is about 67k.

After this change:
New space (0k of 32768k) Old space (886k of 1024k) Code space (0k of 0k)

Prior to this change:
New space (0k of 32768k) Old space (953k of 1024k) Code space (0k of 0k)
Review URL: https://chromiumcodereview.appspot.com//10917222

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12290 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 00:20:37 +00:00
hausner@google.com b740a3266f Stop treating finals as const
Toplevel final variables and static final fields are no longer
considered compile-time constants.
Review URL: https://codereview.chromium.org//10918203

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12289 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 00:03:16 +00:00
regis@google.com e860f819a0 Limit the maximum number of formal parameters (32K fixed and 32K optional)
in order to save space in function objects.
Naming cleanup.
Review URL: https://codereview.chromium.org//10928160

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12288 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 23:35:05 +00:00
vegorov@google.com e0b036008b Guard against allocation top overflow in ObjectArray_Allocate intrinsic.
R=iposva@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12285 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 22:12:23 +00:00
iposva@google.com 609f39c69e - Fixed patching of named factory constructors. Bug 4727.
- Added test to check for error free patching of native factories.

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12280 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 20:13:25 +00:00
devoncarew@google.com fdae229dcc Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger can recurse.
This CL turns off the break-on-exceptions behavior when evaluating Dart code in the debugger (in particular, the toString() method).
Review URL: https://chromiumcodereview.appspot.com//10928149

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12275 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 18:01:50 +00:00
fschneider@google.com 6a9b7b8a06 Cleanup: Replace LoadInstanceFieldInstr with LoadVMFieldInstr.
They already have the same code generation template and LoadVMField
contains all necessary information.
Review URL: https://chromiumcodereview.appspot.com//10933046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12274 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 17:43:37 +00:00
vegorov@google.com 12bc91b043 Mark phi as producing a smi value if it is dominated by SmiChecks over its operands.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12273 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 17:38:23 +00:00
srdjan@google.com 62a76d0783 Using type feedback, eliminate store barriers for indexed stores.
Review URL: https://chromiumcodereview.appspot.com//10910224

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12268 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 15:52:58 +00:00
fschneider@google.com a52116f4af Add immediate operand support for indexed operations.
The value and/or the index of indexed loads/stores can
be emitted as immediate operands to reduce the number
of registers needed when constants are used.
Review URL: https://chromiumcodereview.appspot.com//10933045

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12265 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 13:49:12 +00:00
vegorov@google.com 07ad71b7fe Revert "Whenever possible use length passed to the List constructor for bounds checks instead of loading it from the array object itself."
It completely eliminated bounds checks (Canonicalize method has to guarantee that replacement is inserted in the graph).

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12259 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 12:43:40 +00:00
srdjan@google.com 749d490e9f Use ICData to collect type feedback on instance setter value. If value is always Smi, insert a smi check and eliminate the store barrier.
TODO: Implement it for indexed store (collecting three arguments).
Review URL: https://chromiumcodereview.appspot.com//10933043

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12257 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 11:55:21 +00:00
vegorov@google.com c1209c85b5 Whenever possible use length passed to the List constructor for bounds checks instead of loading it from the array object itself.
R=srdjan@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12254 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 10:46:00 +00:00
srdjan@google.com 101e9eed1d Flush instruction cache when patching for lazy deopt.
Review URL: https://chromiumcodereview.appspot.com//10914223

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12249 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 09:31:19 +00:00
fschneider@google.com 6f81bcbaf8 Split array loads/stores for growable arrays into two IL instructions.
This simplifies the code generation function for indexed loads/stores
a lot and help eliminating the load of the backing store in the future.

Enable CSE for loads of immutable fields like string length or fixed array
length.

Rename HasSideEffect into AffectedBySideEffect. Currently, only instructions
that are not affected by side effects can participate in hoisting or redundancy
elimination.
Review URL: https://chromiumcodereview.appspot.com//10911214

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12245 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 08:45:02 +00:00
kmillikin@google.com b78bd3584e Inline monomorphic calls.
Also add inlining support for more instructions that can not deoptimize.

Original changelist: http://codereview.chromium.org/10913010/

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12244 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 08:25:24 +00:00
srdjan@google.com e6b1a7cfd8 Fixed a "typo" in setting result cid.
Review URL: https://chromiumcodereview.appspot.com//10915223

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12242 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 07:55:20 +00:00
srdjan@google.com 8eb92e0d2d PolymorphicInstanceCall: eliminate duplicate printing of ICData; eliminate Smi class id loading if Smi is not expected.
Review URL: https://chromiumcodereview.appspot.com//10933025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12234 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 06:37:48 +00:00
kasperl@google.com 55140fd125 Remove support for operator negate and replace occurrences with unary
operator -.

In the VM, I have disabled the operator negate support in the parser but I
have not removed the keyword because the token is used in quite a few other
places.

R=ahe@google.com,iposva@google.com,hausner@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12233 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 05:29:03 +00:00
hausner@google.com d12165f5ca Fix dart2js status for raw string test
Review URL: https://chromiumcodereview.appspot.com//10928131

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12227 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 23:21:16 +00:00
asiva@google.com 3a69681099 Shrink the size of deoptimization_counter_ and kind_tag_ fields. This
compensates for the new num_optional_named_parameters_ field.
Review URL: https://chromiumcodereview.appspot.com//10905220

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12226 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 23:06:01 +00:00
hausner@google.com 8f5eea3291 Support r"xxx" raw strings
Review URL: https://chromiumcodereview.appspot.com//10914213

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12225 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 22:53:45 +00:00
hausner@google.com a32a698c6f Support new library/import syntax
This change simply adds new syntax support for the functionality we
currently have in the VM.

- Support for library and import, import-as.
- Still to do: show/hide combinators, export, library parts.
Review URL: https://chromiumcodereview.appspot.com//10928121

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12216 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 20:10:56 +00:00
regis@google.com ab967e15c0 Fix issue with optional named parameters.
Update tests.
Review URL: https://chromiumcodereview.appspot.com//10911217

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12214 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 18:44:16 +00:00
srdjan@google.com 3051c69910 Improve moves of Smi and null objects. Add result cid to List constructor calls. Add tracing of inline cache misses in optimized code (a big no-no).
Review URL: https://chromiumcodereview.appspot.com//10933019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12208 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:41:34 +00:00
iposva@google.com a8a8f1e7de - Do not limit the compiler message buffer, by allocating the message
into a String object.
Review URL: https://chromiumcodereview.appspot.com//10933021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12202 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:03:40 +00:00
vegorov@google.com 5f37ef55a5 Optimistically inline Math.sqrt as unboxed sqrtsd instruction.
R=kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12200 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 14:52:32 +00:00
sgjesse@google.com b84841874d Support receiving GrowableObjectArray on native ports
Array literals are created as GrowableObjectArrays internally.

A GrowableObjectArray holds a length and a backing store. The backing
store is an array. When receiving a GrowableObjectArray an object is
created for holding the GrowableObjectArray. The the backing store has
been read the object holding the GrowableObjectArray is transformed
into an array with its content from the backing store.

R=asiva@google.com, ager@google.com

BUG=dart:4993
TEST=runtime/vm/snapshot_test.cc/DartGeneratedArrayLiteralMessagesWithBackref,
     runtime/vm/snapshot_test.cc/DartGeneratedArrayLiteralMessages

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12197 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 14:37:07 +00:00
vegorov@google.com 5f9ff89e0a Add support for WritableRegister policy in the register allocator.
Use it to eliminate push/pop on the fast path of the write barrier.

Tighten assertions in StoreIntoObject to ensure that value register is not equal to object register. Current code can't cope with that.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12193 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 12:50:52 +00:00
kmillikin@google.com 8201f0db6b Introduce nested deoptimization environments.
Add an optional outer deoptimization environment to support inlining.
Introduce a pair of environment iterators.

Original codereview: https://chromiumcodereview.appspot.com/10928048/

R=fschneider@google.com,zerny@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12190 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 12:30:21 +00:00
ager@google.com 2e49065159 Reapply changes to Expando patching.
R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12181 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 11:03:50 +00:00
lrn@google.com f52c24b62f Rename NoSuchMethodException to NoSuchMethodError.
Moved NoSuchMethodError to errors.dart.
No changes in co19 tests, but test status updated.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12172 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 09:52:25 +00:00
srdjan@google.com 3add440c5c Inline GrowableObjectArray capacity getter, use CHA to eliminate load/store fields class checks.
Review URL: https://chromiumcodereview.appspot.com//10918164

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12161 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 07:03:07 +00:00
asiva@google.com b053301ccf Fix for issue 1204.
Do not allocate a buffer of 64KB by default when writing a message out. Start
with a much smaller buffer. FOr script and full snapshots the buffer
allocated remains 64 KB.
Review URL: https://chromiumcodereview.appspot.com//10908185

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12153 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 02:06:59 +00:00
vegorov@google.com a528a1a3ea Refactor building of StoreStaticField and StoreLocal to manually preserve value.
This is first step towards eliminating manual value preservation in the write barrier's fast-path.

R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12124 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 16:02:40 +00:00
fschneider@google.com 504a3b972b Avoid allocating unnecessary result locations for some instructions.
If the result of an instruction is not needed, we don't need to
assign a result location. I fixed StoreStatic and StoreVMField.

For calls, it does not hurt since all registers are blocked anyway.
Other instructions that don't have side effects usually don't occur
in an effect context and should be removed by a separate pass before
entering the register allocator.
Review URL: https://chromiumcodereview.appspot.com//10918144

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12111 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 13:03:27 +00:00
srdjan@google.com 5a2b8258c1 Use CHA to eliminate checks for calls on receiver of caller: check that there can be only one target.
Review URL: https://chromiumcodereview.appspot.com//10918142

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12109 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-10 11:54:43 +00:00
srdjan@google.com 67871d3098 Finish implementing lazy deoptimization (ia32, x64). Ran tests with --deoptimize-alot.
Review URL: https://chromiumcodereview.appspot.com//10912146

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12093 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 15:00:51 +00:00
asiva@google.com 8bd6bc5480 - Add a test case to test Source code generation of all the corelibs
(core, coreimpl, isolate, math and mirrors).

- Fix bugs in source code generation which were causing the above tests to
  fail.

(This should take care of issue 4647 and related bugs).
Review URL: https://chromiumcodereview.appspot.com//10911159

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12092 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-09 05:26:37 +00:00
hausner@google.com 5aff33a57f Add missing dot in comment
Review URL: https://chromiumcodereview.appspot.com//10908152

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12079 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 23:10:43 +00:00
hausner@google.com 22fdbae05b VM can parse and ignore metadata
Support parsing of metadata in all legal locations except library
and import directives. The metadata is simply ignored. It is not
evaluated or validated for correctness.
 
Review URL: https://chromiumcodereview.appspot.com//10913138

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12078 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 23:06:48 +00:00
cshapiro@google.com 5daf534d94 New test case to ensure finalizers are not invoked on deleted handles.
This also removes a needless allocation from the complementary test.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12075 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 22:37:10 +00:00
cshapiro@google.com 5665da6258 Revert "Revert "Finalize reachable weak persistent handles at isolate shutdown.""
This reverts commit d701af3a2c8a7169898adcb38fe9da0a667ae7ff.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12072 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 22:17:56 +00:00
srdjan@google.com fd09b935dd Intrinsify Double.toInt.
Review URL: https://chromiumcodereview.appspot.com//10914142

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12064 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 20:41:53 +00:00
vegorov@google.com ec0412a8e3 Fix format used to write information into /tmp/perf-<pid>.map.
Address and size should be hex numbers without 0x prefix.

R=cshapiro@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12052 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 18:34:15 +00:00
kasperl@google.com 023546faf8 Remove more () from getters.
This makes it possible to run all standard tests except co19
without ever using a getter that's defined with ().

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12028 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:56:21 +00:00
lrn@google.com 978c3f6da6 Move dart:web to pkg:htmlescape.
Remove the dart:web library from the VM.
Remove reference to web library from libraries.dart.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12023 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:30:55 +00:00
vegorov@google.com 061ddf0051 Optimistically hoist SmiCheck through phi when the only value of unknown type coming into the phi is an operand corresponding to the loop's pre-header.
R=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12022 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 12:23:01 +00:00
kmillikin@google.com 1d4790280a Repair flow graph printing after graph refactoring.
Recent refactoring broke flow graph printing (including code comments).
Clean it up.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12014 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 11:05:02 +00:00