Commit Graph

497 Commits

Author SHA1 Message Date
bmeurer
96e331e2f2 Revert of [runtime] Remove useless IN builtin. (patchset #2 id:20001 of https://codereview.chromium.org/1295433002/ )
Reason for revert:
Breaks win32 nosnap

Original issue's description:
> [runtime] Remove useless IN builtin.
>
> Similar to DELETE, the IN builtin is just a thin wrapper for %HasElement
> and %HasProperty anyway, and cannot be optimized, plus it had a weird
> special fast case (which also involved at least one LOAD_IC plus some
> intrinsic magic).
>
> R=yangguo@chromium.org,jarin@chromium.org
>
> Committed: https://crrev.com/72d60a1e80e81e2e68ca402665e2acbc46c5e471
> Cr-Commit-Position: refs/heads/master@{#30154}

TBR=yangguo@chromium.org,jarin@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30155}
2015-08-13 13:06:58 +00:00
bmeurer
72d60a1e80 [runtime] Remove useless IN builtin.
Similar to DELETE, the IN builtin is just a thin wrapper for %HasElement
and %HasProperty anyway, and cannot be optimized, plus it had a weird
special fast case (which also involved at least one LOAD_IC plus some
intrinsic magic).

R=yangguo@chromium.org,jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30154}
2015-08-13 12:39:21 +00:00
rmcilroy
9b56924df2 [interpreter]: Update BytecodeArrayBuilder register handling.
Modifies the BytecodeArrayBuilder to create register operands which are
negative. This reduces the number of instructions to access registers
by the interpreter and allows us to use positive register operands to
access parameter values.

Adds a Register class to keep register usage typesafe and simplify the
convertion to bytecode operand values.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30151}
2015-08-13 11:28:00 +00:00
bmeurer
6db78c8065 [turbofan] Drop V8_TURBOFAN_BACKEND and V8_TURBOFAN_TARGET defines.
TurboFan is now a requirement and supported by all backends, so we don't
need those macros (plus all the machinery on top) anymore.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30082}
2015-08-10 07:17:34 +00:00
titzer
8b56ec9ccc [turbofan] Remove kInterpreterDispatch CallDescriptor kind in favor of flag.
Rationale: The {kind} of a call descriptor describes what the {target} being
called is--i.e. a JSFunction, code object, or address. That kind materially
dictates the instruction(s) generated for an outgoing call.

The other flags on a call descriptor should describe specific properties
(like whether a roots register is valid or not) so that backend logic doesn't
have to switch over the kind, but is informed directly of what it wants to
know.

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30065}
2015-08-07 11:46:19 +00:00
mtrofin
5202facf9e Stand-alone deferred block splitting. This continues 1256313003.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30050}
2015-08-06 16:21:38 +00:00
hpayer
9df592c1c5 When allocation rate is low and we are close to the new space limit, we should perform a scavenge during idle time.
BUG=chromium:517395
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30044}
2015-08-06 12:10:42 +00:00
ulan
d8ad147944 Grow heap slowly after running memory reducer.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29987}
2015-08-03 18:45:53 +00:00
martyn.capewell
9bf532350f [turbofan] Merge dependent Word32Equal on ARM64
Improve code generated for flag materialization.

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

Cr-Commit-Position: refs/heads/master@{#29954}
2015-07-31 12:46:09 +00:00
yangguo
1667c15e37 Debugger: move implementation to a separate folder.
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29951}
2015-07-31 11:08:15 +00:00
ulan
b4cfd60e07 Ensure the memory reduces makes progress.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29950}
2015-07-31 10:28:16 +00:00
danno
3c9f69d399 [turbofan]: Add better encapsulation to LinkageLocation
Add factory methods for different types of LinkageLocations, and ensure that
accesses to the underlying data in the location are classified by type and
funneled through explicit accessors.

Also change the representation of LinkageLocation to use a BitField rather
than using a reserved section of the integer range.

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

Cr-Commit-Position: refs/heads/master@{#29938}
2015-07-30 14:52:30 +00:00
oth
4da6cbd9ee [Interpreter] Add more bytecode definitions and add operand types.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29934}
2015-07-30 13:57:03 +00:00
rmcilroy
c5dd553cf3 [interpreter] Add Interpreter{Entry,Exit}Trampoline builtins.
Adds interpreter entry and exit trampoline builtins. Also implements the
Return bytecode handler and fixes a few bugs in InterpreterAssembler
highlighted by running on other architectures.

MIPS and MIPS64 port contributed by Paul Lind (paul.lind@imgtec.com)

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29929}
2015-07-30 11:36:43 +00:00
rmcilroy
597da50322 [interpreter] Change interpreter to use an BytecodeArray pointer and and offset.
Changes the interpreter to use a BytecodeArray pointer and an offset to avoid
having an inner pointer to a BytecodeArray object in registers during dispatch.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29910}
2015-07-30 08:18:28 +00:00
mbrandy
270dd554b7 Update PPC OWNERS
R=michael_dawson@ca.ibm.com, danno@chromium.org, yangguo@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29884}
2015-07-27 21:37:55 +00:00
rmcilroy
7877c4e0c7 [interpreter] Add basic framework for bytecode handler code generation.
Adds basic support for generation of interpreter bytecode handler code
snippets. The InterpreterAssembler class exposes a set of low level,
interpreter specific operations which can be used to build a Turbofan
graph. The Interpreter class generates a bytecode handler snippet for
each bytecode by assembling operations using an InterpreterAssembler.

Currently only two simple bytecodes are supported: LoadLiteral0 and Return.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29814}
2015-07-23 14:21:39 +00:00
danno
d1a6dfaf4d [turbofan]: Fix tail calls edge cases and add tests
Review URL: https://codereview.chromium.org/1245523002

Cr-Commit-Position: refs/heads/master@{#29791}
2015-07-22 18:27:35 +00:00
mtrofin
3e3608cdd5 Unit tests for the live range conflict detection mechanism (CoalescedLiveRanges) in the Greedy Allocator.
Consolidated conflict detection and traversal logic in CoalescedLiveRanges to avoid duplication in both code and testing. In addition, this change achieves better separation between CoalescedLiveRanges and other register allocator components, improving testability and maintainability.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29783}
2015-07-22 04:50:22 +00:00
rmcilroy
fbe085fd75 [turbofan] Change RawMachineAssembler to take a CallDescriptor instead of a MachineSignature.
The InterpreterAssembler needs to specify a specific CallDescriptor type
instead of using the SimplifiedCDescriptor type. This CL makes it possible
to specify the CallDescriptor used by the RawMachineAssembler instead of
specifying a MachineSignature.

Also removes instruction-selector-tester.h which was erroneously resurrected
at some point.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29777}
2015-07-21 15:54:27 +00:00
danno
cca5e74a58 [turbofan]: Add a context relaxation Reducer
In many cases, the context that TurboFan's ASTGraphBuilder or subsequent
reduction operations attaches to nodes does not need to be that exact
context, but rather only needs to be one with the same native context,
because it is used internally only to fetch the native context, e.g. for
creating and throwing exceptions.

This reducer recognizes common cases where the context that is specified
for a node can be relaxed to a canonical, less specific one. This
relaxed context can either be the enclosing function's context or a specific
Module or Script context that is explicitly created within the function.

This optimization is especially important for TurboFan-generated code stubs
which use context specialization and inlining to generate optimal code.
Without context relaxation, many extraneous moves are generated to pass
exactly the right context to internal functions like ToNumber and
AllocateHeapNumber, which only need the native context. By turning context
relaxation on, these moves disappear because all these common internal
context uses are unified to the context passed into the stub function, which
is typically already in the correct context register and remains there for
short stubs. It also eliminates the explicit use of a specialized context
constant in the code stub in these cases, which could cause memory leaks.

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

Cr-Commit-Position: refs/heads/master@{#29763}
2015-07-20 17:16:14 +00:00
jochen
b8a4978110 Unittests don't use deprecated APIs. Yay!
Make sure it stays that way

BUG=v8:4134
R=yangguo@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29741}
2015-07-20 06:55:06 +00:00
epertoso
e6e53390cc Let the second pass phantom callbacks run in a separate task on the foreground thread.
R=jochen@chromium.org
LOG=y
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29680}
2015-07-15 12:26:11 +00:00
ishell
fec3c9cba6 TypeofMode replaces TypeofState and ContextualMode.
NON_CONTEXTUAL ~> INSIDE_TYPEOF
CONTEXTUAL ~> NOT_INSIDE_TYPEOF

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

Cr-Commit-Position: refs/heads/master@{#29611}
2015-07-13 13:39:43 +00:00
rmcilroy
d02f62484e Move SmartPointer to base.
Review URL: https://codereview.chromium.org/1221433021

Cr-Commit-Position: refs/heads/master@{#29604}
2015-07-13 12:38:17 +00:00
ishell
f87286e2db Loads and stores to global vars are now made via property cell shortcuts installed into parent script context.
This CL also adds hydrogen stubs for global loads and global stores, full-codegen and TurboFan now uses this machinery.

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

Cr-Commit-Position: refs/heads/master@{#29592}
2015-07-13 09:18:57 +00:00
bmeurer
b19f118c16 [turbofan] Optimize string "length" property access based on types.
Optimize string "length" property access based on static type
information if possible, but also optimistically optimize the access
based on type feedback from the LoadIC.

R=jarin@chromium.org

Committed: https://crrev.com/17add22ff4b9c5ca638502e7708f0d9d99baca40
Cr-Commit-Position: refs/heads/master@{#29543}

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

Cr-Commit-Position: refs/heads/master@{#29588}
2015-07-13 06:02:22 +00:00
martyn.capewell
ad7f35c49a [turbofan] Reduce Float64 comparison to Float32.
Reduce Float64 comparison to Float32 when both inputs are conversions from
Float32.

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

Cr-Commit-Position: refs/heads/master@{#29586}
2015-07-13 05:23:53 +00:00
adamk
54572281e9 Revert of [turbofan] Optimize string "length" property access based on types. (patchset #2 id:20001 of https://codereview.chromium.org/1216593003/)
Reason for revert:
Causes crash when running benchmarks/octane/regexp.js on ARM:
http://build.chromium.org/p/client.v8/builders/V8%20Arm/builds/2492/steps/Benchmarks/logs/regexp

Original issue's description:
> [turbofan] Optimize string "length" property access based on types.
>
> Optimize string "length" property access based on static type
> information if possible, but also optimistically optimize the access
> based on type feedback from the LoadIC.
>
> R=jarin@chromium.org
>
> Committed: https://crrev.com/17add22ff4b9c5ca638502e7708f0d9d99baca40
> Cr-Commit-Position: refs/heads/master@{#29543}

TBR=mstarzinger@chromium.org,jarin@chromium.org,bmeurer@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29544}
2015-07-08 21:30:14 +00:00
bmeurer
17add22ff4 [turbofan] Optimize string "length" property access based on types.
Optimize string "length" property access based on static type
information if possible, but also optimistically optimize the access
based on type feedback from the LoadIC.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29543}
2015-07-08 19:12:58 +00:00
bmeurer
4b38c15817 [turbofan] Add TruncationMode for TruncateFloat64ToInt32.
We actually need round to zero truncation to implement the counterpart
of LDoubleToI in TurboFan, which tries to convert a double to an integer
as required for keyed load/store optimizations.

Drive-by-cleanup: Reduce some code duplication in the InstructionSelector
implementations.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29527}
2015-07-08 06:49:00 +00:00
rmcilroy
ea560a9be9 [turbofan] Move RawMachineAssembler back to src/compiler.
The RawMachineAssembler will be used to build the interpreter, so it needs
to move back to src/compiler.

This reverts commit b5b00cc031.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29519}
2015-07-07 15:02:51 +00:00
ulan
fe8c8c3bc5 Start incremental marking in long idle notification for background tab
disregarding the allocation throughput.

BUG=chromium:506132
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#29515}
2015-07-07 12:30:58 +00:00
ulan
a7f62edb71 Reland "Replace reduce-memory mode in idle notification with delayed clean-up GC."
This reverts commit 269918927a.
This reverts commit 435b3c873a.

The failing test is fixing in chromium.

BUG=chromium:490559
LOG=NO
TBR=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29512}
2015-07-07 11:37:53 +00:00
machenbach
269918927a Revert of Replace reduce-memory mode in idle notification with delayed clean-up GC. (patchset #17 id:320001 of https://codereview.chromium.org/1218863002/)
Reason for revert:
[Sheriff] Looks like it blocks the roll (bisected). Speculative revert.
https://codereview.chromium.org/1210293003/

Original issue's description:
> Replace reduce-memory mode in idle notification with delayed clean-up GC.
>
> BUG=490559
> LOG=NO
>
> Committed: https://crrev.com/0ecd9e1bd2c6b519d4e7285f46cb7e844bc2235c
> Cr-Commit-Position: refs/heads/master@{#29451}

TBR=hpayer@chromium.org,ulan@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=490559

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

Cr-Commit-Position: refs/heads/master@{#29470}
2015-07-05 18:19:03 +00:00
bmeurer
5f288c201c [turbofan] Right hand side of shifts needs ToUint32.
Currently we lower shifts directly to machine operators, and add an
appropriate Word32And to implement the & 0x1F operation on the right
hand side required by the specification. However for Word32And we assume
Int32 in simplified lowering, which is basically changes the right hand
side bit interpretation for the shifts from Uint32 to Int32, which is
obviously wrong. So now we represent that explicitly by proper
simplified operators for the shifts, which are lowered to machine in
simplified lowering.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29465}
2015-07-03 11:42:00 +00:00
titzer
0a5b6ad755 [turbofan] Add Uint64LessThanOrEqual to 64-bit TurboFan backends.
Also add control inputs to 64-bit integer divide and modulus operations.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29460}
2015-07-03 05:14:13 +00:00
ulan
0ecd9e1bd2 Replace reduce-memory mode in idle notification with delayed clean-up GC.
BUG=490559
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#29451}
2015-07-02 15:41:36 +00:00
ulan
3f5d39a1d6 Fix memory-leak in default platform implementation of delayed tasks.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29446}
2015-07-02 14:37:32 +00:00
martyn.capewell
1297a51e30 [turbofan] Support cmp with shift/extend on ARM64.
Support 32-bit cmp with shift/extend by reusing the existing add/sub shift and
extend code.

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

Cr-Commit-Position: refs/heads/master@{#29435}
2015-07-02 04:32:15 +00:00
conradw
7281f80151 [strong] Implement strong property access semantics
Revert "Revert relanded strong property access CL"

Regression issues should be solved. Initial patchset is the original, subsequent patchsets are the fixing modifications.

This reverts commit 4ac7be5656.

BUG=v8:3956
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29384}
2015-06-30 15:24:43 +00:00
martyn.capewell
7374e6dc89 [turbofan] Move MulHigh asr onto add on ARM64
Move the arithmetic shift from Int32MulHigh to a following Int32Add on ARM64.
This graph is commonly generated on reduction of signed integer division.

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

Cr-Commit-Position: refs/heads/master@{#29380}
2015-06-30 13:40:06 +00:00
akos.palfi
b4275a70eb [turbofan] Add CalleeSavedFPRegisters to CallDescriptor.
This change makes possible to save and restore the FP registers
in the Prologue and Return parts for the CallAddress kind functions.

TEST=test-simplified-lowering/RunNumberDivide_2_TruncatingToUint32,
     test-simplified-lowering/RunNumberMultiply_TruncatingToUint32

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

Cr-Commit-Position: refs/heads/master@{#29378}
2015-06-30 13:22:50 +00:00
bmeurer
722e2e2b36 [turbofan] Remove unused constructor function matching from typer.
This optimization never triggers currently, and is inherently native
context dependent for no real reason (for example it will not properly
detect those constructors in the case of cross native context inlining),
plus it is slow and awkward.  In case we really need this functionality
at some point, we should find a way to make it work with the builtin
function id mechanism that is already in place to match other builtins.

R=jarin@chromium.org,rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29365}
2015-06-30 07:36:28 +00:00
bmeurer
ce0431d665 [turbofan] Also update the BranchHint when merging a BooleanNot.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29324}
2015-06-26 12:08:26 +00:00
bmeurer
7337021e54 [turbofan] Add support for pushing returns into merges.
This will enable tail call optimization even across inlining. Plus it
might enable some other interesting optimizations as well. In order to
avoid blowing up the generated code, we can still canonicalize the
epilogue in the CodeGenerator, similar to what fullcodegen does.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29311}
2015-06-26 08:21:01 +00:00
bmeurer
35eb3a0260 [turbofan] Optimize BooleanNot conditions to Branch nodes.
Also remove the weird work-around for this missing optimization in
CHECK_DATE in macros.py.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29288}
2015-06-25 11:07:09 +00:00
Benedikt Meurer
a58ba8d801 [turbofan] Add basic support for calling to (a subset of) C functions.
This introduces some initial building blocks for calling out to
C/C++ functions directly from TurboFan generated code objects.

R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29279}
2015-06-25 08:32:32 +00:00
bmeurer
5056c8219a [turbofan] Revive the useful parts of the SimplifiedOperatorReducer.
This partially reverts https://codereview.chromium.org/1162563002
because we might actually be able to optimize certain combinations
now due to dead code elimination.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29277}
2015-06-25 04:47:16 +00:00
danno
c019d7f498 Use big-boy Types to annotate interface descriptor parameters
- Thread Type::FunctionType through stubs and the TF pipeline.
- Augment Typer to decorate parameter nodes with types from
  a Type::FunctionType associated with interface descriptors.
- Factor interface descriptors into platform-specific and
  platform-independent components so that all descriptors share
  a common Type::FunctionType for all platforms.

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

Cr-Commit-Position: refs/heads/master@{#29248}
2015-06-24 06:22:04 +00:00