regis@google.com
fc919001c5
Improve generated MIPS code for conditional expressions and branches by delaying
...
emission of comparison code.
Improve instruction tracing in all simulators.
R=zra@google.com
Review URL: https://codereview.chromium.org//817593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42555 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 20:50:15 +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
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
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
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
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
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
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
fschneider@google.com
61b0757d05
Fix bug in closure call stub.
...
Since closure calls and method calls both use the same lazy-compile stub,
we need a GC-safe value in the IC data register also at closure calls.
TBR=srdjan@google.com
Review URL: https://codereview.chromium.org//224723017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34777 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 11:47:13 +00:00
fschneider@google.com
9ed4cf1cb6
Simplify and improve handling of IC and megamorphic cache miss handling.
...
Instead of going back and forth from stub code to C++, perform
only the lookup in C++ and call target functions only from
stub code.
noSuchMethod and implicit closure invocations are now also work with
the megamorphic cache. Before they would go slow-case in the megamorphic case.
This CL eliminates the InstanceFunctionLookup stub that was previously
used to handle noSuchMethod and implicit closure invocations.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//221173011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34774 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 09:27:43 +00:00
fschneider@google.com
cc9e3b8068
Introduce a lazy-compile stub for functions.
...
The function's code pointer is either a lazy-compile stub
or the compiled code. The function is compiled on invocation.
There is no need to check for null when invoking a function. This means
one check less when invoking functions via a stub. For this I added a LazyCompile
stub.
Additional cleanup in Stackmap and PcDescriptors (remove unused code pointer,
and changed smi-lengh into a raw integer).
R=zra@google.com
Review URL: https://codereview.chromium.org//203523011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34643 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 12:37:48 +00:00
johnmccutchan@google.com
762b9a400c
Set VMTag from stubs when transitioning between Dart and Native
...
R=asiva@google.com , zra@google.com
Review URL: https://codereview.chromium.org//200693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34065 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 21:26:07 +00:00
srdjan@google.com
c84f778832
x64 code improvements and cleanups.
...
R=zra@google.com
Review URL: https://codereview.chromium.org//201013002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33766 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-17 19:55:13 +00:00
regis@google.com
8d5dae7798
Allocate instance closures similarly to regular closures, i.e. without a
...
specific stub and runtime call.
R=fschneider@google.com
Review URL: https://codereview.chromium.org//178233003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33074 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-26 18:38:47 +00:00
regis@google.com
d599ea7d9b
Simplify type argument instantiation cache lookup by introducing an array
...
of 1 zero Smi.
Review URL: https://codereview.chromium.org//169223005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32756 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-18 19:30:03 +00:00