Commit Graph

69 Commits

Author SHA1 Message Date
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 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
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
zra@google.com 677a4709ce Uses stp/ldp for frame entry/exit on arm64.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41041 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 15:29:27 +00:00
zra@google.com 240afa6afa Expands the use of Immediate and Operand wrappers.
Since Register is an enum type, it is automatically
coerced to integer types when passed as a parameter to
functions expecting an integer argument. This change
expands the use of Immediate and Operand wrappers
for Assembler instructions and macros to avoid this
automatic coercion.

I've also added dummy constructors to Address and
FieldAddress classes to address the same problem,
but in a way that does not increase verbosity,
since Address and FieldAddress are much more
prevalent in the code.

A cleaner solution would involve making Register
no longer coercable to integer types, but this
would likely require many changes to the Assemblers.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40905 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-03 19:46:24 +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
zra@google.com 816bf5af2e Fixes for the profiler on arm64.
On arm64, in Dart code, R18(SP) is the stack pointer.
In C++ code, R31(CSP) is the stack pointer.
The profiler must choose the right one when performing
its bounds checks.

This change also fixes a bug in the InvokeDartCode stub
on arm64 so that CSP is set to the Isolate's stack
limit immediately, rather than a bit later. When it was
set a bit later, if a profiler interrupt came in in the
interim, the stack would be smashed.

R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40502 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-19 16:25:16 +00:00
zra@google.com 8127569109 Fixes a bug in CheckClassInstr on arm64.
The bug comes from a copy/paste from arm, so I've
also renamed the function to be more clear.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40476 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-18 22:54:37 +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
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
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
zra@google.com e3f564fb6c Changes for running tests on arm64 hardware.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37046 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 18:43:55 +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
zra@google.com a89ae2f947 Uses assembler macro for dart SP setup on arm64.
Clean up for last CL.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36950 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 21:41:55 +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
zra@google.com 436a06a381 Fixes to run "Hello, world!" on arm64 hardware.
Primarily, in Dart code, instead of using R31 as our
stack pointer, on entry we copy it into a second
register (R18) and use that as our stack pointer after
moving R31 to the Dart stack limit. On calling back
into C++ from Dart code, R31 is restored, and R18 is
cached in the callee-saved register R26.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36930 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-03 18:38:28 +00:00
regis@google.com b7c5f90bf0 Address TODOs and remove obsolete ones.
R=hausner@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36813 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-29 23:06:02 +00:00
zra@google.com 9c73009ff9 Prepares for arm64 cross-build.
With this change, the cross-build succeeds with the Linaro arm64 toolchain.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36698 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 18:05:20 +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
zra@google.com 35d53f5a45 Beings adding SIMD support to arm64.
It's still disabled for now, while I continue working.

Also, I tried to use const a bit more consistently in
the arm and arm64 IL.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36465 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-22 00:17:33 +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
zra@google.com eb11b8a7a0 Adds far-branches to arm64.
Also fixes bugs and enables tests.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36051 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 18:43:08 +00:00
zra@google.com ea99b1e6f8 Adds debugger patching to arm64.
Also other small fixes.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36003 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 23:20:14 +00:00
zra@google.com 5d94e8900f Adds single-precision and SIMD load/store to arm64.
Also adds conversion between double an single-precision floats.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35933 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-08 19:06:04 +00:00
zra@google.com 842a42a5a9 Adds unary double operations to ARM64, enables many tests.
Also removes disabling of optimization.

R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35863 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-07 20:04:05 +00:00