asiva@google.com
eaebf15f43
Fix for issue 14790 - Crash when using dartium devtools
...
The stack frame iteration during GC was missing one slot in stub frames that
did not save the pool pointer.
- This change makes all stub frames uniform, i.e they always save/restore the pool pointer. This ensures that we will traverse all slots on the stack.
- A new constant called kFirstObjectSlotFromFp has been added which is used as the slot to start stack traversal.
(The ARM and MIPs changes will be in a different CL)
R=iposva@google.com , regis@google.com , zra@google.com
Review URL: https://codereview.chromium.org//63093003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30088 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 00:25:40 +00:00
fschneider@google.com
aa789a7b27
Merge (x & y) == 0 pattern to emit a single test instruction.
...
This is based on a previous uncommitted CL by vegorov@
(https://codereview.chromium.org/14251023/ ).
It is rebased and fixes a bug in the MIPS implementation: BranchOnCondition
requires the comparison result in fixed registers CMPRES1/CMPRES2.
Remove register alias TMP1 (=TMP) and CMPRES (=CMPRES1). It is confusing to
have them around and easy to forget that they are actually the same.
R=srdjan@google.com , zra@google.com
Review URL: https://codereview.chromium.org//59613005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29966 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 12:13:29 +00:00
zra@google.com
039a4c4078
Disconnects code objects from infrequently used unoptimized functions.
...
Every 30 seconds (configurable by --code-collection-interval),
before a MarkSweep collection, this change halves a function's
usage count if it is unoptimized. If the function's usage count
reaches 0 as a result of this halving, it sets the function's
code pointers to null. Then, if the code object isn't marked
during the MarkSweep, it will be collected.
This change also checks for null code pointers in various
places, and recompiles/reconnects code if needed.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//27802002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29209 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 21:26:15 +00:00
srdjan@google.com
3a8252f90d
Cleanups: int -> intptr_t for "array" lengths, memory sizes.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//26294002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28324 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-07 20:19:37 +00:00
kmillikin@google.com
b9715d23d0
x64: Use a short encoding of addq and subq for 32-bit immediates.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13681
R=fschneider@google.com
Review URL: https://codereview.chromium.org//25491002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28087 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 11:17:44 +00:00
zra@google.com
e75bbe26a1
Eliminates more large immediates from x64 code.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//25118002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28067 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 20:19:23 +00:00
zra@google.com
2f1de2f332
Loads some large Smis from the object pool on x64.
...
R=fschneider@google.com
Review URL: https://codereview.chromium.org//23594011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27885 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:30:08 +00:00
fschneider@google.com
9a87eb0944
Fix x64 assembler in roundsd and pxor.
...
BUG=https://code.google.com/p/dart/issues/detail?id=13543
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//24568002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27882 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 15:00:53 +00:00
zra@google.com
6282267aae
Fixes slow object pool search on x64.
...
Issue 13144.
R=iposva@google.com
Review URL: https://codereview.chromium.org//23723008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27494 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 18:10:04 +00:00
iposva@google.com
f1583dec18
- More use of pre-allocated read-only handles.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//23510006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27490 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-13 16:55:57 +00:00
iposva@google.com
2c0acad1e5
- Tighten assertions in the X64 assembler related to object pool usage.
...
- Adjust code passing objects into the assembler.
- Fix stack smashing bug in test.
R=zra@google.com
Review URL: https://codereview.chromium.org//23454032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27445 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 20:44:26 +00:00
zra@google.com
df2054dae7
Sets a register aside on x64 for use as a pool-pointer. It is loaded and restored from the code object on Frame entry and exit. All LoadObject calls that can, and many calls and jumps through ExternalLabels now use the pool-pointer. The --compiler-stats flag when running dart2js indicates that code size is reduced ~13%, and more is probably possible.
...
R=fschneider@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22825023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27295 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-09 15:39:26 +00:00
fschneider@google.com
cfab482b84
Follow-up fix to my change to IsPowerOfTwo: Alignment of one means no alignment, not zero.
...
We assert that the alignment is a power of two. Therefore, platforms that do not need
alignment should return alignment of one instead of zero.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//23745008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27037 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 10:56:43 +00:00
regis@google.com
8171570100
Fix the previously ineffective assert checking the number of arguments passed to
...
a runtime entry in the VM.
R=asiva@google.com
Review URL: https://codereview.chromium.org//23672011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26826 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 23:07:14 +00:00
johnmccutchan@google.com
4ba3c7b2c9
Add packed add and subtract to IA32 and X64 assemblers
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23129014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26325 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 19:57:22 +00:00
srdjan@google.com
66fb716dce
Implement some conditional moves instructions for ia32/x64. Use them in MinMax instruction implementation.
...
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//21307004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25685 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-31 22:57:33 +00:00
johnmccutchan@google.com
1b09112ce0
Add two argument SSE shuffle instructions
...
R=srdjan@google.com
Review URL: https://codereview.chromium.org//19940005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25301 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 20:20:50 +00:00
kmillikin@google.com
3e78b2ad4a
Reapply "Initial implementation of on-stack replacement (OSR)."
...
This reapplies SVN r24024 with a bugfix.
After OSR compilation, restore the pre-OSR code (which might be already
optimized) rather than the unoptimized code (which might have its entry
patched). When the optimized code entry is patched it is only safe to call
it as a static call, not as an instance call.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//17233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24088 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 11:05:15 +00:00
kmillikin@google.com
d6f3eccdf2
Revert "Initial implementation of on-stack replacement (OSR)."
...
This reverts commit 24024.
TBR=fschneider@google.com
Review URL: https://codereview.chromium.org//16888013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24025 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 10:30:53 +00:00
kmillikin@google.com
0b39927d30
Initial implementation of on-stack replacement (OSR).
...
Add profiling support to select OSR candidates and launch the compiler
for OSR, followed by entry to the function at the OSR entry point.
Implemented only on IA32 and X64. The initial implementation can be
improved in various ways --- specifically: tuning of profiling
parameters and incorporation of feedback about the actual values seen
at OSR entry.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//16693006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24024 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 10:10:55 +00:00
srdjan@google.com
1ccf49ce9f
Use rep_movsb for copying one-byte strings in substring intrinsic.
...
Review URL: https://codereview.chromium.org//14122002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21293 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 16:39:34 +00:00
vegorov@google.com
11edd87390
Convert diamond shaped control flow into a single conditional instruction.
...
Adds a IfConverter pass that right now recognizes two simple patterns cond ? 0 : 2^n and cond ? x : x+-1 that can be generated without branches on ia32 and x64 using setcc instruction.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//14057004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21207 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-10 15:09:46 +00:00
iposva@google.com
4dff6b8e2b
- Remember objects (not addresses) in the old generation containing new pointers.
...
Review URL: https://codereview.chromium.org//13406004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20828 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 22:45:18 +00:00
vegorov@google.com
0e17b438eb
On x64 use 32bit idiv when possible instead of 64bit one.
...
64bit idiv requires twice as much cycles and has 2-3 times higher latency.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//12545067
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20565 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-27 17:13:58 +00:00
vegorov@google.com
0e9a59eb59
Use shorter write-barrier filtering sequence when value is known to be non-smi.
...
R=iposva@google.com
Review URL: https://codereview.chromium.org//12438032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20373 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 11:28:13 +00:00
regis@google.com
1b274ff2cf
Remove the barely used macro assemblers after merging their contents to the base
...
assemblers.
Review URL: https://codereview.chromium.org//12398029
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19434 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 00:04:32 +00:00
srdjan@google.com
1bc8991142
For Doubl erounding call C-function instead of attempting to inline it. Fixes issue 8760.
...
Review URL: https://codereview.chromium.org//12334080
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19013 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 23:05:43 +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
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
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
regis@google.com
4ac3d21c08
Initial revision of ARM assembler.
...
Object references and calls, as well as their fixups, are still unimplemented.
Review URL: https://codereview.chromium.org//12090034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17775 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 16:46:10 +00:00
podivilov@google.com
1c451fc100
Replace "enter" instruction with "push(ebp); mov(ebp, esp);" sequence.
...
"enter" instruction is rare and is not supported by valgrind.
R=srdjan@google.com ,vegorov@google.com
Review URL: https://codereview.chromium.org//12028002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17378 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 09:30:41 +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
3cd9fa513f
Fix bug in the x64 assembler's movw instruction.
...
The order of prefixes was wrong. The operand size prefix (0x66)
must occur before the REX prefix. From the instruction set reference:
[...]the REX prefix byte must immediately precede the opcode byte or
the escape opcode byte (0FH). [...]
Also, make movw(reg, addr) unavailable, consistent with ia32.
TEST=runtime/vm/assembler_x64_test.cc
Review URL: https://codereview.chromium.org//11961013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17135 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 12:12:21 +00:00
srdjan@google.com
40a7130741
Inline Doubles truncate and round.
...
Review URL: https://codereview.chromium.org//11573044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16983 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 20:42:47 +00:00
fschneider@google.com
87a3a4b479
Support immediate and memory operands for PushArgumentInstr in optimized code.
...
If a value is a constant or stored on the stack this change avoids loading it into a
new register before pushing it.
Review URL: https://codereview.chromium.org//11791051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16806 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 16:51:57 +00:00
asiva@google.com
92dee42dcc
Do not emit pointer information for embedded singleton VM Isolate objects while generating code. These embedded objects do not need to be visited during GC.
...
Review URL: https://codereview.chromium.org//11722026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16645 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 18:38:00 +00:00
asiva@google.com
6749a3be79
Add read only handles for the following predefined symbols
...
"=="
"[]"
"[]="
"this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +00:00
vegorov@google.com
132bdc6bfb
Support VTune's JIT interface.
...
R=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//11412106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15517 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 13:54:06 +00:00
fschneider@google.com
5399496ac4
Only require SSE2 at minimum hardware requirement.
...
BUG=dart:6010
Review URL: https://codereview.chromium.org//11416136
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15253 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:46:57 +00:00
johnmccutchan@google.com
92d6c1e317
Add support for XMM8..XMM15
...
Review URL: https://codereview.chromium.org//11358262
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15162 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 17:37:07 +00:00
fschneider@google.com
8aa175b9e6
Restrict immediate operands to smi where only smis are supported.
...
Re-enable redundant phi elimination.
Add x64 codegen templates and assembler instructions for immediate operands.
Fix x64 assembler for imull when using r8-r15.
Add x64 instruction for imulq(reg, imm).
Fix x64 disassembler printing of immediates.
Review URL: https://codereview.chromium.org//11362210
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14814 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:44:34 +00:00
fschneider@google.com
c2ec22a652
Fix bug with mint unboxing on non-SSE 4.1 machines.
...
I forgot to check for SSE 4.1 support in one place. For machines
that do not support SSE 4.1 we should never generated unboxed
mint operations.
Review URL: https://codereview.chromium.org//11038016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13164 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-03 09:11:21 +00:00
johnmccutchan@google.com
4f193292df
Enable Float32Array_getIndexed on X64 now that cvtss2sd is implemented
...
Merge remote-tracking branch 'git-svn'
Implement cvtss2sd and cvtsd2ss on X64
Review URL: https://codereview.chromium.org//11009006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13077 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 17:59:51 +00:00
fschneider@google.com
71767f5218
Add code for CPU feature detection and use it to detect SSE3 and SSE 4.1.
...
The Dart VM now requires at least SSE3 to build and run.
There is a new flag --use-sse41 (default:true) to disable the use of
SSE 4.1 features manually.
Review URL: https://codereview.chromium.org//10990028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12897 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 09:08:21 +00:00
srdjan@google.com
b2f09ea5df
FIx crash in disassembler: check that an addrs is tagged before testing it to be part of the heap.
...
Review URL: https://codereview.chromium.org//10915256
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12308 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 09:46:04 +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
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
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