Commit Graph

206 Commits

Author SHA1 Message Date
koda@google.com c9a15058f7 Really really fix mac x64 debug build by using more fixed-length encoding and long jumps.
(We could consider always using fixed-length encoding in DEBUG mode to avoid this.)

R=iposva@google.com
TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42753 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 20:33:59 +00:00
koda@google.com 1844d3a3a2 Fix debug mac 64 bit build; use far jumps when needed.
This didn't trigger on my machine due to memory layout affecting the size of encoding of immediate constants.

TBR=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42724 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 02:29:51 +00:00
koda@google.com 13b1939676 x64 port of r42717.
Review URL: https://codereview.chromium.org//842953002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42723 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-09 02:04:30 +00:00
srdjan@google.com 71df57b247 Fix crash in observatory: stub code do not have inlined intervals information. Added more comments to inline cache stub code.
Review URL: https://codereview.chromium.org//818443003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42547 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 13:24:31 +00:00
srdjan@google.com 72ff873c0b Add code comments to inline cache stubs.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42520 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-19 18:39:58 +00:00
vegorov@google.com bacacbcebe Fix release x64 build:
- don't try using near jumps anymore;

- initialize variables in vm/cc/Bitwise with zeros.

TBR=fschneider@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42373 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 20:01:14 +00:00
vegorov@google.com aa48bd4759 Range feedback for arithmetic operations.
In addition to tracking input and output ranges in the IC-stubs with a Smi fastpath (SmiAdd and SmiSub, currently) this CL also introduces two IC stubs that have no fast-path by still track ranges and update the range feedback.

We are able to distinguish between the following ranges (encoding of the lattice is shown in the parens):

- u-smi  (0000)
- smi    (0001)
- uint31 (0010)
- int32  (0011)
- uint32 (0100)
- int64  (1xxx) and (x1x1)

BUG=
R=fschneider@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42370 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-15 18:48:15 +00:00
koda@google.com c6bf5f2381 Support verified heap pointer writes on x64.
Port of r41607, r41700, and upcoming change:
https://codereview.chromium.org/721233002/

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41787 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 18:09:42 +00:00
koda@google.com cf45ba7af3 Concurrent sweep on x64.
Analogous to the ia32 change: https://codereview.chromium.org/624473003/

Update header word atomically in generated code.
Also convert unused LockCmpxchgl to LockCmpxchgq.

R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41756 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-15 01:29:49 +00:00
fschneider@google.com 876193b31a Make CTX allocatable by the register allocator.
This change makes CTX available by not caching the current
context while in Dart code. Instead the current context
is held in a local variable (:saved_current_context_var) and
is passed as argument in CTX at calls.

This also simplifies a lot of code in the debugger: As a result,
Isolate::top_context is not needed anymore since the current context
can always be extracted from a Dart frame.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41422 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 15:42:38 +00:00
fschneider@google.com cedcd90984 Remove dead code from InvokeDartCode stub.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41316 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 13:43:17 +00:00
fschneider@google.com 1dc4e979d9 Remove isolate pointer from context objects.
By moving all stubs that do runtime calls into the isolate
we don't need to cache the current isolate in each context
object.

This saves space on each context at the cost of duplicating stubs
in each isolate. Most stubs are already isolate-specific and the total number
 of stubs is small enough for this to be a good trade-off.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41279 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-24 12:19:20 +00:00
fschneider@google.com 855541d88e Make subtype test stubs isolate-specific.
This avoids loading the current isolate from the context
register and makes those stubs not depend on having the context
stored in the CTX register.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40714 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-26 16:06:30 +00:00
iposva@google.com cc13627fc8 - Remove Isolate::CurrentAddress().
- Remove use of INFINITY and -INFINITY.

R=rmacnak@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40700 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 23:39:30 +00:00
koda@google.com a3b31e3364 Make AllocateArray stub patchable, like instance allocation stubs.
R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40699 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 23:31:08 +00:00
koda@google.com 667454a233 Support old-space allocation in generated code (bump block only for now).
First steps towards general pretenuring support.
* Generalize Heap::Top/EndAddress.
* Add testing flag to exercise new code paths.
* Also update the slow-case runtime calls, to ensure a fresh block will be allocated in old.

Next steps are general invalidation of the generated code and adding a policy that doesn't blow up the store buffers), and freelist allocation.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40530 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 23:46:22 +00:00
fschneider@google.com 95d33c36d4 VM: Use current isolate as immediate operand in per-isolate stub code.
There is no need to load it from the context, if the stub
is per-isolate. This makes those stubs not rely on having a context in CTX,
and avoids loading the isolate pointer from memory.

This CL is part of the effort to free up CTX for general
allocation. Stubs that don't depend on a context in CTX
won't require storing the current context before calling
them.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40428 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 10:13:56 +00:00
srdjan@google.com 30e77079e9 Fix x64 patching of asllocation stub: the pool pointer must be set-up before patching jump is executed.
R=koda@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40358 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-16 23:14:54 +00:00
srdjan@google.com dd9c0ef25e Allow invalidation and recompilation of instance allocation stubs. Requested in order to implement better pretenuring strategy.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40168 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-11 17:56:42 +00:00
fschneider@google.com 0469c12072 VM: Remove unused IsClosureCall bit from IC data.
Since closure calls are now implemented in terms of instance calls
 (via .call and a dispatcher method), there is no need for a bit in
  the IC data tracking if a IC call may be a closure call.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39979 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-08 17:10:59 +00:00
fschneider@google.com e2443c0ef2 VM: Clean up generated code for NoSuchMethod invocation of closures.
Remove unnecessary ic-data argument from the runtime function that
invokes noSuchMethod for closures.  This reduces the size of generated
code for closures.

R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39804 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 12:51:28 +00:00
srdjan@google.com 85af0719ef Faster IC stubs by specializing them for two-argument Smi operations (implemented only a few for now)
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39471 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 20:08:40 +00:00
fschneider@google.com 937726a0aa Improve polymorphic inlining of int/int double/double operations.
I added inlining of the native Double methods _add, _sub, _mul and _div and fromInteger
and unified the method recognition of the MethodRecognizer and the Intrinsifier classes.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39446 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-21 11:13:44 +00:00
zra@google.com 77157f09eb Moves SingleStepHandler runtime calls
to match the NArgsCheckInlineCache stub.

Gives a small improvement in unoptimized code.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39417 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-20 18:21:47 +00:00
srdjan@google.com 43832bf84f Remove flag enable_debugger as current debugging code has a very minor influence on unoptimzied code performance.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38737 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 16:32:04 +00:00
johnmccutchan@google.com 6f0b2bb2a9 Profiler tweaks
* Rename Script tag to Dart tag.
* Respect ignore bit on samples.
* Mark samples collected with an exit frame.
* Don't give exclusive CPU ticks to top frame on samples collected from an exit frame (because CPU usage is in the native code we've called out to not the function waiting to return).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38522 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 21:09:25 +00:00
zra@google.com fbbc91ff69 Cleanup of class id loading sequences.
These ended up looking performance neutral, but
the cleanup is probably good.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38333 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 16:20:11 +00:00
johnmccutchan@google.com e7ddd5d047 Move some isolate state setup from C++ code to JumpToExceptionHandler stub (take 3).
- CL is the same as take 2, but, I now prohibit the profiler from walking the call stack when the isolate is executing the jump to exception handler.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38300 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 18:03:17 +00:00
johnmccutchan@google.com 7366afd86e Revert r38240
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38257 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 20:48:20 +00:00
johnmccutchan@google.com efc684e4a8 Move some isolate state setup from C++ code to JumpToExceptionHandler stub
This change means that the isolate's top exit frame info and vm tag will only be updated after setting the frame pointer.

This is step one in a series of changes to allow the profiler to walk the stack when there is no frame pointer.

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38240 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 16:39:19 +00:00
johnmccutchan@google.com 4d25b35657 Revert r38216
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38218 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 22:31:48 +00:00
johnmccutchan@google.com 8b99428010 Move some isolate state setup from C++ code to JumpToExceptionHandler stub
This change means that the isolate's top exit frame info and vm tag will only be updated after setting the frame pointer.

This is step one in a series of changes to allow the profiler to walk the stack when there is no frame pointer.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38216 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 21:59:49 +00:00
rmacnak@google.com fbe77f8ab4 Specialize breakpoint stubs by set of live registers of the stubs they are intercepting.
Trades space in the constant pool for space at call sites.

R=fschneider@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38205 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 19:38:11 +00:00
zra@google.com b428943546 Moves infrequently used debugger code in CheckInlineCachestub.
Improves unoptimized performance.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38173 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-11 21:59:25 +00:00
zra@google.com aef49a6761 Uses a conditional move for usage counter increment instead of a branch
in the CheckInlineCacheStub.

This gives another small improvement in unoptimized code performance.

This change also reverts part of my last change that used
the conditional move on ia32 and x64 in the LoadClassIdInstr. This
made performance worse on those platforms for a couple of benchmarks.

R=srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38126 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 17:51:07 +00:00
asiva@google.com f85f986bda Make isolate specific stub code accessors instance methods instead
of static. This allows use of isolate without having to call
Isolate::Current() when using these accessors.

R=johnmccutchan@google.com, srdjan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38040 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 21:25:00 +00:00
rmacnak@google.com 5afea71262 Setup R10/EDX to be valid Oops before stub calls so when the debug stub saves them to the stack the GC doesn't try to deference out of the heap.
BUG=http://dartbug.com/19331
R=asiva@google.com, iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37297 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-12 23:50:48 +00:00
zra@google.com 47e2465545 Begins removing intptr_t from raw object fields.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37285 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-12 19:56:46 +00:00
vegorov@google.com d30ecd3fcd Fix Win64 build of Dart VM.
1. Build script tools/build.py now actually builds X64 target when x64
is passed as an architecture:

- GYP files set 'msvs_configuration_platform': 'x64' for Win_x64
configuration;

- NSS related files are fixed to have correct set of defines for ia32
and x64 builds and include right files. A os_windows.c file added to
work-around inability to have different sets of source files per
configuration. Originally this was controlled through target_arch GYP
define and required regeneration of the solution.

- build.py passes Win32 or x64 platform to devenv as part of build
configuration argument;

2. Dart VM now supports Win64 ABI. ABI description is moved into a
separate class CallingConventions in constants_x64.h.

BUG=http://dartbug.com/7792
R=iposva@google.com, ricow@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37078 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-06 12:14:15 +00:00
johnmccutchan@google.com fde7678710 Use CallBootstrapC stub for leaf native calls.
This removes a comparison and branch in the CallNativeC stub.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37047 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 18:53:56 +00:00
srdjan@google.com e35ecf13e3 Add LoadTaggedClassIdMayBeSmi to assembly and improve performance of inline cache stubs.
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37011 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-04 20:37:21 +00:00
srdjan@google.com 5720dce013 In class Function replace current code field with current instruction field, that way we save one load when jumping to a target in, e.g., inline cache stub (function->instruction vs function->code->instruction).
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36948 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 21:28:05 +00:00
srdjan@google.com df4718155a Added flags:
--enable-debugger (default true)
--emit-edge-counters (default true)
--use_field_guards (default true)

These flags can be turned off in order to measure their impact on code.

R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36537 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 23:47:20 +00:00
srdjan@google.com f81724a750 Improve performance of stubcode based array allocation by moving stub to isolate specific area (quicker access to isolate fields). Remove _List. intrinsic. Performance fix in MIPS
R=zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36229 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-15 16:57:56 +00:00
srdjan@google.com 14ce525d79 Recognize List. constructor and turn it inot CreateArray.
R=johnmccutchan@google.com, zra@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36138 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-13 23:09:22 +00:00
srdjan@google.com 2734ccafdd Remove deprecated Megamorphic stub.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35594 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 20:12:57 +00:00
regis@google.com 8868058d60 Enums cleanup.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35559 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 01:26:14 +00:00
regis@google.com e0ab99b0b2 Remember all deopt reasons in ic_data, not just the last one.
Remember if a JS warning was issued in ic_data.
Save a word in ic_data on 64-bit platforms.

R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35457 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 23:45:14 +00:00
johnmccutchan@google.com ef666553a1 Add runtime and native entry tags
- Split runtime and native entry tags.
- Set runtime / native entry address as vm tag in stubs.
- Add reverse native entry resolver (pc to name) to public API (breaking change).
- Hookup reverse resolver for standalone VM (io + bootstrap + builtin natives).
- Runtime entries are registered with tags.
- Profiler queries for tag names via the reverse native entry resolver.
- Profiler outputs named entry tags as children under parent tag (runtime or native).

R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34941 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 20:26:45 +00:00
fschneider@google.com 79a5307d5b VM: Implement closure calls as instance calls.
Conceptually f() becomes f.call() where the .call method performs the actual
closure call. The closure call itself is implemented without a stub.

The check if the object called is a closure becomes a class-id check
which can be hoisted out of loops.

R=iposva@google.com, srdjan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34917 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 10:56:00 +00:00