fschneider@google.com
f7963998a8
Simplify BlockEntryInstr::DiscoverBlocks a bit.
...
We can remove the case of blocks containing a single instruction because
every basic block is now terminated with a Goto or Branch (except for the graph
entry, which is handled specially).
Review URL: https://chromiumcodereview.appspot.com//10825198
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10281 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 10:43:47 +00:00
zerny@google.com
c1262fbd49
Reapply "Added support for copied parameters to the SSA compiler."
...
This reapplies svn revision 10172 with a bug fix.
Original Review URL: https://chromiumcodereview.appspot.com//10837076
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824177
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10280 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 10:07:26 +00:00
fschneider@google.com
442b981575
Replace InstanceSetterComp instruction with a plain instance call.
...
After my last change to InstanceSetterComp we do not need a separate
IL instruction for it anymore.
Review URL: https://chromiumcodereview.appspot.com//10829164
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10278 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 08:55:13 +00:00
kmillikin@google.com
19596c8071
Change EXPECT(!Dart_IsError(...)) to EXPECT_VALID(...) in VM tests.
...
This change will give better error messages when the expectation fails
in the tests. EXPECT_VALID prints the error.
R=iposva@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10825178
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10276 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 07:55:53 +00:00
rmacnak@google.com
a3468803c5
Made it possible to distinguish between a method or top-level function and the
...
function for a closure defined in such. Addresses issue 4337.
Review URL: https://chromiumcodereview.appspot.com//10831165
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10266 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:56:21 +00:00
asiva@google.com
cd5b8f890c
Address review comments.
...
Review URL: https://chromiumcodereview.appspot.com//10829177
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10264 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:30:53 +00:00
turnidge@google.com
000ffd177c
Improve method names in the ThrowException test to make it less misleading.
...
Review URL: https://chromiumcodereview.appspot.com//10832146
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10262 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:15:51 +00:00
asiva@google.com
9d123e5366
Move hashmap.h and hashmap.cc from the 'bin' directory to 'platform' directory so that it can be used from VM code too.
...
Review URL: https://chromiumcodereview.appspot.com//10853009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10261 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 22:11:30 +00:00
turnidge@google.com
2803d78dfd
Change the zone allocation api.
...
Instead of passing a size in bytes to the allocation function, we now
have a templatized Alloc function:
zone->Alloc<Type>(len)
This is better for security, as we can check for integer overflow in
the size computation before performing the allocation. Before, we
often failed to check this.
Review URL: https://chromiumcodereview.appspot.com//10836061
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10254 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 21:51:44 +00:00
turnidge@google.com
51a1842014
Improve the error message for handle check failure to list the actual
...
and expected types:
error: Handle check failed: saw <whatever> expected <whatever>
Review URL: https://chromiumcodereview.appspot.com//10843053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10253 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 21:38:08 +00:00
asiva@google.com
540b01f66f
Eagerly get the function and code corresponding to the frame elements in a stack trace so that we won't be doing expensive code object lookups when setting up the stack trace.
...
Review URL: https://chromiumcodereview.appspot.com//10824128
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10248 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 20:30:08 +00:00
fschneider@google.com
04fa2e3547
Refactor our IL instruction for static setters.
...
We do not need a separate IL instruction anymore. Instead I generate
a normal static call and save the result in a temporary local if it
is needed.
Review URL: https://chromiumcodereview.appspot.com//10825176
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10222 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 11:14:07 +00:00
kmillikin@google.com
5a5c84fa06
Change TRACE_ALLOC to take a statement rather than an argument list.
...
This allows tracing things that are not arguments to OS::Print.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10825173
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10216 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 08:27:42 +00:00
ager@google.com
4531c0c770
Remove old isolate API and update all code in the repository to use
...
the new API.
R=kasperl@google.com ,sigmund@google.com ,turnidge@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10837070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10210 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 07:24:29 +00:00
vegorov@google.com
b601fa02c7
When selecting an optimal position for SplitBetween(from, to) ensure:
...
- that loop and block structure is taken into account;
- that split sibling has proper interference with values incoming into instruction corresponding to the to position.
R=srdjan@google.com
BUG=4308
Review URL: https://chromiumcodereview.appspot.com//10850023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10208 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 06:29:35 +00:00
cshapiro@google.com
cb1aef3bb9
Describe the reserved header bits with their own bit-field definition.
...
Review URL: https://chromiumcodereview.appspot.com//10825167
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10207 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 00:34:25 +00:00
srdjan@google.com
d9c35db17c
Allow NULL classes in inline caches (for example for ==). Fixes a 22x regression with r9762 on a benchmark provided by Ryan.
...
Review URL: https://chromiumcodereview.appspot.com//10830154
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10206 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 00:23:52 +00:00
turnidge@google.com
4288220bb2
The null tests that I added for Dart_NewString{8,16,32} were too restrictive.
...
It is okay to pass NULL codepoints if the length is zero.
This should fix the issue we were seeing in dartium.
Review URL: https://chromiumcodereview.appspot.com//10829153
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10204 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 23:56:16 +00:00
regis@google.com
12de02cbab
Associate the correct type to method receivers (instead of Dynamic type).
...
Properly name the first implicit parameter to factories as ':type_arguments'
(instead of 'this', which made it accessible to user code).
Various cleanup.
Review URL: https://chromiumcodereview.appspot.com//10831142
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10203 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 23:00:55 +00:00
srdjan@google.com
85f242dbb1
Adding deopt info to code object.
...
Review URL: https://chromiumcodereview.appspot.com//10830131
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10189 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 18:28:11 +00:00
fschneider@google.com
3c5c1dc4bd
Separate double binary operation into a separate instruction class.
...
Double operation are currently implemented as calls, so they need
arguments pushed on the stack. Smi and Mint operations are not calls,
so they are handled with the same instruction as before.
Review URL: https://chromiumcodereview.appspot.com//10850014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10178 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 16:26:46 +00:00
fschneider@google.com
e5bd4af606
Support Throw and ReThrow in SSA-based compiler.
...
This change makes them call-instructions using explicit push-arguments.
Review URL: https://chromiumcodereview.appspot.com//10829141
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10176 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:54:42 +00:00
kmillikin@google.com
effc29cd25
Revert "Use platform-independent format specifiers when disassembling code objects."
...
This is still broken on Windows.
TBR=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10826116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10175 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:52:05 +00:00
kmillikin@google.com
b73d4d2af2
Reapply "Use platform-independent format specifiers when disassembling code objects."
...
This reapplies svn revision 10163 with a fix for Windows.
R=ager@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824148
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10174 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:45:00 +00:00
kmillikin@google.com
0d699e6c15
Revert "Added support for copied parameters to the SSA compiler."
...
This reverts svn revision 10172.
TBR=zerny@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10837076
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10173 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 15:10:13 +00:00
zerny@google.com
41f9e67324
Added support for copied parameters to the SSA compiler.
...
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824147
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10172 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 14:53:18 +00:00
vegorov@google.com
71c2638506
Fix structure of WhileDo graph.
...
Normal entry to the loop should not go through a continue join.
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10850016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10171 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 14:39:49 +00:00
kmillikin@google.com
20083dfd85
Revert "Use platform-independent format specifiers when disassembling code objects."
...
Revert svn revision 10163 while working on a Windows fix.
R=ager@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10850017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10169 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:51:23 +00:00
ahe@google.com
1e0c2471a5
Changed default Uri constructor to Uri.fromComponents(), new default constructor is Uri.fromString(). This is to avoid new Uri(' http://www.google.com ') resulting in Uri with scheme=' http://www.google.com '.
...
Committing on behalf of: Alexander Aprelev <aprelev@gmail.com >
BUG=dart-3348
TEST=new Uri('http://www.google.com ') is the same as new Uri.fromString('http://www.google.com ') same as new Uri.fromComponents(scheme:'http', domain:'www.google.com')
Review URL: https://chromiumcodereview.appspot.com//10850015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10168 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:48:30 +00:00
kmillikin@google.com
acff96c5b8
Fix a register allocation crash on IA32, caused by an uninitialized finger.
...
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10827139
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10166 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:40:19 +00:00
kmillikin@google.com
9acfb0e622
Fix windows build.
...
TBR=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10837072
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10165 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:34:18 +00:00
kmillikin@google.com
515f92ea3f
Use platform-independent format specifiers when disassembling code objects.
...
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824144
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10163 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:19:28 +00:00
kasperl@google.com
9125b3451e
Refactor the way we emit no such method handlers so it's easier to optimize it later.
...
Avoid adding duplicate JavaScript functions (may occur if we have
multiple different typed selectors in play or if the same library
shows up multiple times in the library map).
R=floitsch@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10832109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10162 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 13:18:17 +00:00
fschneider@google.com
362c202998
Use explicit push-argument for InstanceSetter instruction.
...
This allows optimizing functions with InstanceSetter.
Review URL: https://chromiumcodereview.appspot.com//10826097
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10157 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 10:23:29 +00:00
vegorov@google.com
abfb2bf67a
Implement simple spill store elimination.
...
Values that are spilled somewhere during their life-time are spilled eagerly at their definiton.
Additionally improve liverange printing used for debugging purposes.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10828115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 08:45:49 +00:00
hausner@google.com
73366bab9e
Properly skip expressions that contain the operator as.
...
Fix 4277.
Review URL: https://chromiumcodereview.appspot.com//10830130
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10151 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 00:11:09 +00:00
cshapiro@google.com
bba1c3f794
Add a missing space after the class name and before a following colon.
...
Review URL: https://chromiumcodereview.appspot.com//10829116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10147 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 23:11:46 +00:00
hausner@google.com
db4653f0e0
Add check for duplicate field initialization
...
This change adds a check that reports duplicate initialization
of instance fields. Fixes issues 921 and 1034.
There were several tests in the language suite that had duplicate
initializers for final instance fields. Corrected the tests.
dart2js also contained duplicate initializations of a couple
of final fields.
Review URL: https://chromiumcodereview.appspot.com//10825140
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10146 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 22:25:36 +00:00
nweiz@google.com
637f6fe616
Fix the definition of kIllegalPort in dart_api.h.
...
Declaring a variable directly in a header will cause C to be unable to link
multiple object files that both include that header, even if that variable is
const.
Review URL: https://chromiumcodereview.appspot.com//10834017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10135 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:47:33 +00:00
turnidge@google.com
0be1610389
Fix a problem that wasn't found on my mac builds... :-(.
...
Review URL: https://chromiumcodereview.appspot.com//10836059
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10134 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:43:23 +00:00
turnidge@google.com
40b0d11c1f
Add missing files from last commit!
...
Review URL: https://chromiumcodereview.appspot.com//10829127
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10133 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:29:55 +00:00
turnidge@google.com
8b68d343c7
Enforce length/size limits for variable size heap object in order to
...
avoid overflow.
For each variable size heap object, compute the maximum number of
elements and use that in the ::New functions to avoid overflow. If a
bad length/size reaches a ::New function, that is a FATAL error -- the
problem should have been caught earlier by the dart api or by the
library code.
Add "border guards" in the dart api and in library calls which cause
new variable size heap objects to be allocated. We check for invalid
length/size and throw explanatory error messages.
Review URL: https://chromiumcodereview.appspot.com//10782016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10130 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 18:22:30 +00:00
regis@google.com
ba83d02f9e
Add type propagation phase in optimizing compiler (work in progress).
...
Remove unused cid field from Instruction node and add it to nodes subclassing
Instruction that need it: BranchInstr, ReturnInstr, ThrowInstr, ReThrowInstr.
Remove unused icdata field from Instruction node and add it to BranchInstr.
Review URL: https://chromiumcodereview.appspot.com//10830109
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10125 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 17:15:55 +00:00
fschneider@google.com
8eee3f1899
Eliminate unnecessary deoptimization environments.
...
This CL adds a CanOptimize predicate to every instruction. Before register
allocation there is a simple pass over the IR to remove environments from
instruction that never deoptmize. This reduces the number of uses and shortens
live ranges of values resulting in better code.
Review URL: https://chromiumcodereview.appspot.com//10829098
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10115 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 12:09:10 +00:00
vegorov@google.com
7eb80c3810
Mark phi-operands live-in for a predecessor if they are not defined by it.
...
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10827116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10114 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 11:52:40 +00:00
vegorov@google.com
8822d6e652
Ignore life ranges with no uses for a values defined as fixed output.
...
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10836048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10113 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 11:01:39 +00:00
vegorov@google.com
b3c12e31d2
Do not mark phi-operands as live-out from predecessor.
...
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831091
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10112 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 10:37:16 +00:00
rmacnak@google.com
2035aa43b9
Renamed some variables in the mirror implementation from raw* to wrapped* to
...
avoid confusion with the VM's special meaning for raw.
Review URL: https://chromiumcodereview.appspot.com//10831102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10099 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 23:51:06 +00:00
hausner@google.com
b3917271aa
Optimize away most implicit const getter functions
...
If a static field has a very simple initializer expression
(a literal number or string for example) we initialize the field
directly while compiling instead of generating an implicit
getter. We only do this if the type of the expression is
assignment compatible with the field. If the expression is not
compatible, we let the implicit getter do the error checking.
This eliminates about 330 implicit getters in the core libraries
and saves 35k in the snapshot (830k, down from 865k).
Review URL: https://chromiumcodereview.appspot.com//10826090
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10098 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 23:33:48 +00:00
rmacnak@google.com
407f371e3b
Added Dart_FunctionEnclosingClassOrLibrary.
...
Review URL: https://chromiumcodereview.appspot.com//10834096
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10096 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 22:47:52 +00:00