Commit Graph

261 Commits

Author SHA1 Message Date
vogelheim
0a50af8625 Revert of Implement Fast Accessor Builder (patchset #14 id:260001 of https://codereview.chromium.org/1474543004/ )
Reason for revert:
Broke the build, apparently.

Original issue's description:
> Implement FastAccessorBuilder.
>
> ... using the RawMachineAssembler and the work in cl/1407313004
>
> BUG=chromium:508898
> LOG=Y
>
> Committed: https://crrev.com/515d9ccd8e6df7bf2ca01e2a55aaad30226399e1
> Cr-Commit-Position: refs/heads/master@{#32742}

TBR=epertoso@chromium.org,bmeurer@chromium.org,jochen@chromium.org,mstarzinger@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:508898

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

Cr-Commit-Position: refs/heads/master@{#32744}
2015-12-10 10:16:35 +00:00
vogelheim
515d9ccd8e Implement FastAccessorBuilder.
... using the RawMachineAssembler and the work in cl/1407313004

BUG=chromium:508898
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#32742}
2015-12-10 10:10:11 +00:00
mlippautz
8ad016d361 [cctest] Move most heap related tests to test/cctest/heap and clean wrt IWYU
* Move most heap related tests into heap/ subdir
* IWYU for heap utility functions

R=ulan@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#32706}
2015-12-09 11:26:15 +00:00
ishell
5d38d6819c Fix inobject slack tracking for both subclassing and non-subclassing cases.
It didn't support subclassing case at all and in non-subclassing case the runtime
allocation didn't do the slack tracking step.

BUG=chromium:563339
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#32547}
2015-12-03 10:03:00 +00:00
danno
3e7e3ed726 [stubs] A new approach to TF stubs
* Add a sibling interface to InterpreterAssembler called
  CodeStubAssembler which provides a wrapper around the
  RawMachineAssembler and is intented to make it easy to build
  efficient cross-platform code stubs. Much of the implementation
  of CodeStubAssembler is shamelessly stolen from the
  InterpreterAssembler, and the idea is to eventually merge the
  two interfaces somehow, probably moving the
  InterpreterAssembler interface over to use the
  CodeStubAssembler. Short-term, however, the two interfaces
  shall remain decoupled to increase our velocity developing the
  two systems in parallel.
* Implement the StringLength stub in TurboFan with the new
  CodeStubAssembler. Replace and remove the old Hydrogen-stub
  version.
* Remove a whole slew of machinery to support JavaScript-style
  code stub generation, since it ultimately proved unwieldy,
  brittle and baroque. This cleanup includes removing the shared
  code stub context, several example stubs and a tangle of build
  file changes.

BUG=v8:4587
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#32508}
2015-12-02 12:35:20 +00:00
epertoso
56c7a053e9 Revert changes introduced in http://crrev.com/1367953002.
This CL is in preparation for the API change introduced in http://crrev.com/1407313004.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31930}
2015-11-10 21:00:18 +00:00
mbrandy
40eeb69b94 PPC: Disable gcc generation of fmadd/fmsub in cctests.
Generated code performs distinct floating multiply and add/subtract
operations.  Tests fail when GCC uses fmadd/fmsub to calculate the
expected result since these instructions provide higher accuracy due
to the lack of an intermediate round.

R=machenbach@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31918}
2015-11-10 14:31:28 +00:00
bradnelson
2e3c36fb1c Adding support for multiple returns in compiled functions.
This will allow exploration of possibilities like passing around buffer base and length.

BUG=None
TEST=test-multiple-return
LOG=N
R=mtrofin@chromium.org,titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31184}
2015-10-08 18:27:46 +00:00
machenbach
e1743816d3 Reland [swarming] Isolate v8 testing.
This reverts commit 280a6f8ec8.

Reland of https://codereview.chromium.org/1380593002/

BUG=chromium:535160
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_nosnap_rel;

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

Cr-Commit-Position: refs/heads/master@{#31094}
2015-10-05 09:48:42 +00:00
danno
280a6f8ec8 Revert of [swarming] Isolate v8 testing. (patchset #8 id:140001 of https://codereview.chromium.org/1380593002/ )
Reason for revert:
Prime suspect in breakage of V8 Linux -- no snap

Original issue's description:
> [swarming] Isolate v8 testing.
>
> Add gyp support and isolates for default test suites.
> Add two default isolates, one (default) for using the
> test suite collection we call "default" on the bots. One
> (developer_default) for also supporting the way developers
> call the driver (i.e. without argument, which includes
> the unittests).
>
> BUG=chromium:535160
> LOG=n
>
> Committed: https://crrev.com/9bd83f58f29ab0c7c5b71b00bcb1df3a9e641f05
> Cr-Commit-Position: refs/heads/master@{#31081}

TBR=tandrii@chromium.org,jochen@chromium.org,maruel@chromium.org,machenbach@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:535160

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

Cr-Commit-Position: refs/heads/master@{#31084}
2015-10-02 15:45:13 +00:00
machenbach
9bd83f58f2 [swarming] Isolate v8 testing.
Add gyp support and isolates for default test suites.
Add two default isolates, one (default) for using the
test suite collection we call "default" on the bots. One
(developer_default) for also supporting the way developers
call the driver (i.e. without argument, which includes
the unittests).

BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31081}
2015-10-02 15:15:39 +00:00
cbruni
a9b84c1b2c [cctest] adding tests for elements kind map migrations
R=mvstanton@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31080}
2015-10-02 15:14:27 +00:00
vogelheim
ed110a1715 Allow JavaScript accessors on API objects.
(This is somewhat experimental; hence protected by #ifdef.)

R=epertoso@chromium.org, jochen@chromium.org
BUG=chromium:508898
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31002}
2015-09-29 11:16:14 +00:00
hpayer
064be4c296 [heap] Move slots buffer into a separate file.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30746}
2015-09-15 12:35:20 +00:00
mstarzinger
887f876058 [turbofan] Model arguments object materialization in graph.
This models the materialization of arguments objects in the prologue
within the IR graph. It will in turn allow us to optimize access to
these objects and also correctly handle them with inlining.

R=bmeurer@chromium.org,mvstanton@chromium.org
TEST=cctest/test-run-jsobjects/Arguments*

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

Cr-Commit-Position: refs/heads/master@{#30735}
2015-09-15 09:07:34 +00:00
oth
8df7b4f6b5 [Interpreter] Skeleton bytecode graph builder
Add skeleton version bytecode-graph-builder.{h,cc} for existing
bytecodes.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30687}
2015-09-10 16:21:40 +00:00
ulan
057514d3fa Use idle task to perform incremental marking steps.
This moves incremental marking steps from gc-idle-time-handler and heap to the new incremental marking task.

BUG=chromium:490559
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#30641}
2015-09-08 15:54:37 +00:00
bradnelson
546d9a70ac Add asm.js typer / validator.
Walk asm.js module ASTs, attach concrete type information
in preparation for generating a WASM module.

cctest test coverage (mjsunit coming in later CL).
Expressions, function tables, and foreign functions have coverage.
Statement coverage to be expanded in a later CL.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-asm-validator
R=rossberg@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30520}
2015-09-01 18:30:43 +00:00
bradnelson
10f2c5c33a Adding visitors to regurgitate expression types or reset them.
Adding an AstExpressionVisitor to touch each expression node in
an AST.

Adding TypingReseter to clear the slate after a failed asm.js
validation that has set partial typing information.

Adding a ExpressionTypeCollector to walk the expressions
in an AST and emit them as a string for testing.

Adding tests of the above.

LOG=N
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=test-typing-reset,test-ast-expression-visitor
R=rossberg@chromium.org,titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30336}
2015-08-24 17:16:49 +00:00
mlippautz
477f5a81f0 [heap,cctest] Get rid of protected-for-sake-of-testing scope.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30301}
2015-08-21 12:40:33 +00:00
bradnelson
a2462683b7 Allowing optional build of a WASM prototype behind a gyp define.
Place a copy of the v8-native-prototype in third_party/wasm.
GYP_DEFINES='v8_wasm=1' gclient runhooks

BUG=None
TEST=None
R=titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30225}
2015-08-18 15:04:11 +00:00
oth
238397c108 [Interpreter] Minimal bytecode generator.
Bytecode generator for local assignment and basic binary operations.

Command-line flag for printing bytecodes.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30221}
2015-08-18 13:46:57 +00:00
vogelheim
c69e2eae54 Rework startup-data-util.
- Make the API look like v8::V8::InitializeICU.
  (That is: A static method call, not an object to be created on the stack.)
- Fix path separator on Windows, by calling base::OS::isPathSeparator.
- Move into API, so that it can be called by hello-world & friends.
- Actually call it from hello-world and friends.

R=jochen@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30174}
2015-08-14 12:11:46 +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
titzer
17f4c5bbaf Reland: [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack.
OCL: https://codereview.chromium.org/1263033004/

R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30115}
2015-08-11 15:23:17 +00:00
yangguo
31a3f68da9 Revert of [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack. (patchset #7 id:120001 of https://codereview.chromium.org/1263033004/ )
Reason for revert:
This CL breaks MIPS (roll blocker).

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20mipsel%20-%20sim/builds/2061/steps/Check/logs/Run_Int32_Select_1

Original issue's description:
> [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack.
>
> R=jarin@chromium.org
> BUG=
>
> Committed: https://crrev.com/71409be5395f867bbca0f6998bf6caa175cd8192
> Cr-Commit-Position: refs/heads/master@{#30091}

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

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

Cr-Commit-Position: refs/heads/master@{#30101}
2015-08-11 06:48:46 +00:00
titzer
71409be539 [turbofan] Various fixes to allow unboxed doubles as arguments in registers and on the stack.
R=jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30091}
2015-08-10 14:14:36 +00:00
rmcilroy
6447b78f8e [interpreter] Adds interpreter cctests.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30087}
2015-08-10 11:20:31 +00:00
oth
6ab1f70e12 [Intepreter] BytecodeArrayBuilder and accumulator based bytecodes.
The BytecodeArrayBuilder has responsibility for emitting the BytecodeArray. It will be used by the AST walker.

Bytecode now uses an accumulator plus registers rather being pure register based.

Update BytecodeArray::Disassemble to print operand information.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29970}
2015-08-03 10:42:30 +00:00
mstarzinger
1c43c3ae73 [turbofan] Get rid of overly abstract SimplifiedGraphBuilder.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29792}
2015-07-22 18:28:37 +00:00
bbudge
6113058427 Expose SIMD.Float32x4 type to Javascript.
This CL exposes the constructor function, defines type related
information, and implements value type semantics.
It also refactors test/mjsunit/samevalue.js to test SameValue and SameValueZero.

TEST=test/mjsunit/harmony/simd.js, test/cctest/test-simd.cc

LOG=Y
BUG=v8:4124

Committed: https://crrev.com/e5ed3bee99807c502fa7d7a367ec401e16d3f773
Cr-Commit-Position: refs/heads/master@{#29689}

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

Cr-Commit-Position: refs/heads/master@{#29712}
2015-07-16 19:43:32 +00:00
hablich
40c38c5a5a Revert of Expose SIMD.Float32x4 type to Javascript. (patchset #14 id:450001 of https://codereview.chromium.org/1219943002/)
Reason for revert:
Seems to brake the latest roll into Chromium: http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/59796/steps/compile%20%28with%20patch%29/logs/stdio

Original issue's description:
> Expose SIMD.Float32x4 type to Javascript.
> This CL exposes the constructor function, defines type related
> information, and implements value type semantics.
> It also refactors test/mjsunit/samevalue.js to test SameValue and SameValueZero.
>
> TEST=test/mjsunit/harmony/simd.js, test/cctest/test-simd.cc
>
> LOG=Y
> BUG=v8:4124
>
> Committed: https://crrev.com/e5ed3bee99807c502fa7d7a367ec401e16d3f773
> Cr-Commit-Position: refs/heads/master@{#29689}

TBR=rossberg@chromium.org,littledan@chromium.org,martyn.capewell@arm.com,bbudge@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4124

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

Cr-Commit-Position: refs/heads/master@{#29701}
2015-07-16 12:36:11 +00:00
bbudge
e5ed3bee99 Expose SIMD.Float32x4 type to Javascript.
This CL exposes the constructor function, defines type related
information, and implements value type semantics.
It also refactors test/mjsunit/samevalue.js to test SameValue and SameValueZero.

TEST=test/mjsunit/harmony/simd.js, test/cctest/test-simd.cc

LOG=Y
BUG=v8:4124

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

Cr-Commit-Position: refs/heads/master@{#29689}
2015-07-15 19:17:06 +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
bmeurer
733a246386 [turbofan] Proper dead code elimination as regular reducer.
The three different concerns that the ControlReducer used to deal with
are now properly separated into

  a.) DeadCodeElimination, which is a regular AdvancedReducer, that
      propagates Dead via control edges,
  b.) CommonOperatorReducer, which does strength reduction on common
      operators (i.e. Branch, Phi, and friends), and
  c.) GraphTrimming, which removes dead->live edges from the graph.

This will make it possible to run the DeadCodeElimination together with
other passes that actually introduce Dead nodes, i.e. typed lowering;
and it opens the door for general inlining without two stage fix point
iteration.

To make the DeadCodeElimination easier and more uniform, we basically
reverted the introduction of DeadValue and DeadEffect, and changed the
Dead operator to produce control, value and effect. Note however that
this is not a requirement, but merely a way to make dead propagation
easier and more uniform. We could always go back and decide to have
different Dead operators if some other change requires that.

Note that there are several additional opportunities for cleanup now,
i.e. OSR deconstruction could be a regular reducer now, and we don't
need to use TheHole as dead value marker in the GraphReducer. And we can
actually run the dead code elimination together with the other passes
instead of using separate passes over the graph.  We will do this in
follow up CLs.

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

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

Cr-Commit-Position: refs/heads/master@{#29146}
2015-06-19 12:07:26 +00:00
bmeurer
b5b00cc031 [turbofan] Move RawMachineAssembler to unittests.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28993}
2015-06-12 10:33:19 +00:00
bmeurer
cf21da7e48 [deoptimizer] Basic support inlining based on SharedFunctionInfo.
Up until now we can only inline based on JSFunction, because of the way
the deoptimization works.  With this change we will be able to inline
based on the SharedFunctionInfo and materialize the JSFunction from a
literal or a stack slot when necessary.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28906}
2015-06-10 11:52:49 +00:00
titzer
6d26ec0b4c Implement IdentityMap<V>, a robust, GC-safe object-identity HashMap.
R=hpayer@chromium.org, erikcorry@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#28257}
2015-05-06 12:40:29 +00:00
mstarzinger
986e242976 [test] Remove pesky MachineCallHelper from inheritance chain.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#28173}
2015-04-30 14:51:54 +00:00
jochen
ac1c88a9b2 Reland "Remove the weak list of array buffers"
Original issue's description:
> Remove the weak list of array buffers
>
> Instead, collect live array buffers during marking and free pointers we
> no longer found.
>
> BUG=v8:3996
> R=hpayer@chromium.org
> LOG=n

BUG=v8:3996
TBR=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28156}
2015-04-30 10:57:51 +00:00
machenbach
3e25666c79 Revert of Remove the weak list of array buffers (patchset #8 id:140001 of https://codereview.chromium.org/1114563002/)
Reason for revert:
[Sheriff] Crashes in layout tests:
https://chromegw.corp.google.com/i/client.v8/builders/V8-Blink%20Linux%2064%20%28dbg%29/builds/2668

Original issue's description:
> Remove the weak list of array buffers
>
> Instead, collect live array buffers during marking and free pointers we
> no longer found.
>
> BUG=v8:3996
> R=hpayer@chromium.org
> LOG=n
>
> Committed: https://crrev.com/2d39709cf5ee17637f6f2d75380a9e61ae0b342b
> Cr-Commit-Position: refs/heads/master@{#28132}

TBR=dslomov@chromium.org,hpayer@chromium.org,jochen@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:3996

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

Cr-Commit-Position: refs/heads/master@{#28148}
2015-04-30 08:38:24 +00:00
mstarzinger
de88984334 [test] Remove deprecated GraphTester helper class.
R=bmeurer@chromium.org
TEST=cctest/test-node

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

Cr-Commit-Position: refs/heads/master@{#28138}
2015-04-29 15:16:11 +00:00
mstarzinger
4bc2beab97 [test] Turn compiler/test-node-cache into a unit test.
R=jarin@chromium.org
TEST=unittests/NodeCacheTest

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

Cr-Commit-Position: refs/heads/master@{#28136}
2015-04-29 14:40:05 +00:00
mstarzinger
58b0023fa8 [test] Remove deprecated cctest/test-node-algorithm tests.
R=jarin@chromium.org
TEST=cctest/test-graph-visualizer

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

Cr-Commit-Position: refs/heads/master@{#28134}
2015-04-29 14:13:29 +00:00
jochen
2d39709cf5 Remove the weak list of array buffers
Instead, collect live array buffers during marking and free pointers we
no longer found.

BUG=v8:3996
R=hpayer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28132}
2015-04-29 13:04:55 +00:00
adamk
909500aa1d Reimplement Maps and Sets in JS
Previously, the only optimized code path for Maps and Sets was for String keys.
This was achieved through an implementation of various complex operations
in Hydrogen. This approach was neither scalable nor forward-compatible.

This patch adds the necessary intrinsics to implement Maps and Sets almost entirely
in JS. The added intrinsics are:

  %_FixedArrayGet
  %_FixedArraySet
  %_TheHole
  %_JSCollectionGetTable
  %_StringGetRawHashField

With these additions, as well as a few changes to what's exposed as runtime functions,
most of the C++ code backing Maps and Sets is gone (including both runtime code in
objects.cc and Crankshaft in hydrogen.cc).

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

Cr-Commit-Position: refs/heads/master@{#27605}
2015-04-07 00:12:04 +00:00
jochen
2a5eb8299b Expose an API on ArrayBufferView to copy out content w/o changing the buffer
BUG=v8:3996
LOG=y
R=dslomov@chromium.org,kbr@chromium.org,hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#27580}
2015-04-02 09:36:39 +00:00
vogelheim
ee9c738929 Re-work the 'external snapshot' related build rules.
This prepares for re-landing crrev.com/956373002

This pulls all decision about the snapshot [no|internal|external] into one rule. Previously, this logic was in separate places and not /quite/ the same, which causes build problems.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27523}
2015-03-30 14:54:27 +00:00
michael_dawson
8685219066 PPC: Changes to allow AIX to compile with gcc 4.8.3
We were able to remove most of our changes needed to compile
on AIX with an earlier compiler level.  These changes are the
remaining ones.

The changes in heap/heap.cc are needed because otherwise the
compiler complains that result is potentially used before
it is initialized.

The changes in heap/mark-compact.cc are required because
AIX supports the full 64 bit address range so the check
being guarded is invalid.

The changes in build/toolchain.gypi and
test/cctest/cctest/gyp are aix only and are adjust the
compile/link options to allow the AIX build to succeed.

	modified:   build/toolchain.gypi
	modified:   src/heap/heap.cc
	modified:   src/heap/mark-compact.cc
	modified:   test/cctest/cctest.gyp

R=danno@chromium.org, svenpanne@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#27255}
2015-03-18 08:43:28 +00:00
ulan
1b00451f57 Retain maps embedded in optimized code for several garbage collections.
This keeps dying maps alive for FLAG_retain_maps_for_n_gc garbage collections
to increase chances of them being reused for new objects in future and
decrease number of deoptimizations.

BUG=v8:3664
LOG=N
TEST=cctest/test-heap/MapRetaining

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

Cr-Commit-Position: refs/heads/master@{#27040}
2015-03-06 12:36:32 +00:00
svenpanne
5d4c76eae7 Test StringLengthStub generation via TurboFan.
For now we just use the RawMachineAssembler, this will be changed
later to use the whole TurboFan pipeline.

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

Cr-Commit-Position: refs/heads/master@{#26902}
2015-02-27 06:56:59 +00:00
ishell
35841b5055 Property reconfiguring implemented.
Previous approach for property reconfiguration was to create a free-floating map with generalized representations of all fields. This patch does it right.

When property is reconfigured either by changing its kind (kData <-> kAccessor) or its attributes it implies creation of a new branch in transition tree. If such a branch already existed before reconfiguration then it should be merged with the old (or source) branch of the transition tree. Merging procedure includes all the heavy machinery such as property location changes (kDescriptor -> kField), field representation/field type generalization, map deprecation, etc.

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

Cr-Commit-Position: refs/heads/master@{#26667}
2015-02-16 15:25:54 +00:00
jarin
8bd0bd522e [turbofan] Make the representation type component independent of the semantic component.
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26621}
2015-02-12 15:21:33 +00:00
adamk
a18b797fd9 Enable compiling mjsunit tests as ES6 modules
Adding the line "// MODULE" to an mjsunit file will now cause
run-tests.py to prefix the test case with "--module" in the
d8 commandline.

d8 has itself been updated to treat files preceded with "--module" as
modules (that is, it compiles them with ScriptCompiler::CompileModule,
and turns on --harmony-modules).

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

Cr-Commit-Position: refs/heads/master@{#26555}
2015-02-10 19:11:55 +00:00
vogelheim
2ea8df76ba Fix cctest + unittest to work with an external snapshot.
To do so, extract startup_data_util from d8 and use it those executables.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26547}
2015-02-10 15:38:09 +00:00
adamk
70079dab13 Add basic compilation support for modules
This adds an "experimental" API hook (v8::ScriptCompiler::CompileModule)
allowing compilation of modules. The code gen is incredibly basic: the
module body is represented by a Block in the AST. But this at least gets
more of the pipeline working, and opens the door to writing mjsunit tests
(once d8 is modified to support module compilation).

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26496}
2015-02-06 17:52:38 +00:00
Dan Carney
878963a8a5 split interceptor tests off of test-api
BUG=
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26484}
2015-02-06 12:08:07 +00:00
bmeurer
c65ae4f10c Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26346}
2015-01-30 09:29:41 +00:00
Benedikt Meurer
883852293a Revert "Make GCC happy again." and "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.".
This reverts commit 6a4c0a3bae and commit
0deaa4b629 for breaking GCC bots.

TBR=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26342}
2015-01-30 07:19:57 +00:00
bmeurer
0deaa4b629 Initial switch to Chromium-style CHECK_* and DCHECK_* macros.
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26340}
2015-01-30 06:25:36 +00:00
danno
c6ae373335 Convert compiler cctest to unittests: SchedulerTest
R=mstarzinger@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#26267}
2015-01-26 11:21:24 +00:00
danno
87e1426ce5 Convert compiler cctest to unit tests, part 1
R=bmeurer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#26222}
2015-01-22 14:16:55 +00:00
bmeurer
c9283148d1 [turbofan] Cleanup Schedule and related classes.
- Move unit tests to schedule-unittests.cc.
- Remove pre-C++11 cruft.
- Fix some include weirdness.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26220}
2015-01-22 13:01:13 +00:00
Sven Panne
e4c5b84652 Contribution of PowerPC port (continuation of 422063005)
Contribution of PowerPC port (continuation of 422063005). The inital patch
covers the core changes to the common files.  Subsequent patches will cover
changes to common files to support AIX and to update the ppc directories so
they are current with the changes in the rest of the project.

This is based off of the GitHub repository
https://github.com/andrewlow/v8ppc

BUG=
R=svenpanne@chromium.org, danno@chromium.org, sevnpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#26091}
2015-01-16 07:42:15 +00:00
titzer
159b14172f [turbofan] Implement OSR for outer loops.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#26020}
2015-01-12 11:39:58 +00:00
dcarney
a5aa01beec remove declarative accessors
R=jochen@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#25981}
2015-01-07 16:37:43 +00:00
titzer
0f619463f2 [turbofan] First version of loop analysis: loop finder on the soup of nodes.
R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25837}
2014-12-16 09:36:40 +00:00
vogelheim
efdb6c8de1 Fix builds w/ component=="shared_library" and v8_use_external_startup_data==1.
R=machenbach@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25784}
2014-12-11 16:41:56 +00:00
ishell
7d13ca278a Reland of "TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have several entries for the same property name."
Review URL: https://codereview.chromium.org/793453004

Cr-Commit-Position: refs/heads/master@{#25750}
2014-12-10 15:18:52 +00:00
titzer
da22163d35 [turbofan] Implement jump threading after register allocation.
R=dcarney@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25521}
2014-11-26 12:41:55 +00:00
yangguo
9b8d40594a Rip out bzip compression for native sources.
R=vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25464}
2014-11-21 12:45:20 +00:00
ishell@chromium.org
2e38f33911 Revert "TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have several entries for the same property name."
Revert "Fix for an assertion failure in Map::FindTransitionToField(...). Appeared after r25136."

This revert is made in order to revert r25099 which potentially causes renderer hangs.

R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25332}
2014-11-13 15:31:04 +00:00
titzer@chromium.org
21cf5bb249 Remove PhiReducer.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25262}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 12:03:12 +00:00
ishell@chromium.org
c5a492961f Reland "In-object double fields unboxing (for 64-bit only)."
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25258}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25258 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-11 10:25:46 +00:00
verwaest@chromium.org
2d9079ca1d Revert "In-object double fields unboxing (for 64-bit only)."
Revert "Fixes for Windows and Mac builds after r25250."
TBR=ishell@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25252}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 17:44:51 +00:00
ishell@chromium.org
f133ac501b In-object double fields unboxing (for 64-bit only).
This CL introduces LayoutDescriptor which is responsible for tracking which in-object fields are tagged and which are not.
LayoutDescriptor field added to Map. Currently unboxing is disabled.

R=hpayer@chromium.org, verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25250}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-10 16:35:22 +00:00
ishell@chromium.org
33dde8d92c TransitionArray now uses <is_data_property, name, attributes> tuple as a key, which allows to have several entries for the same property name.
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25136}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25136 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-05 09:26:48 +00:00
titzer@chromium.org
5bba6b20e6 Make visualizer robust to graphs with NULL inputs.
R=mstarzinger@chromium.org, jarin@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#25084}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-11-03 17:42:17 +00:00
dcarney@chromium.org
3cace296ee convert BitVector to use pointer size blocks
additionally rename data-flow.* to bit-vector.* as at some point these file became very inaccurately named

BUG=
R=svenpanne@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#25030}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25030 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-31 10:44:47 +00:00
titzer@chromium.org
90a7f07489 Implement loop variable assignment analysis.
This analysis computes the set of variables that are assigned in each loop. This is useful to avoid creating redundant loop phis when building an SSA graph, which just waste memory and require analysis to get rid of.

This CL implements an AST walk for the analysis and plugs the result into the TurboFan graph builder. I left this analysis under a flag for A/B testing and until sufficient unit tests can be developed.

R=danno@chromium.org, mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#24957}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24957 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-28 17:30:14 +00:00
mvstanton@chromium.org
c688ebd858 vector-based ICs did not update type feedback counts correctly.
BUG=v8:3605
LOG=N
R=jkummerow@chromium.org, ulan@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24732 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-20 11:42:56 +00:00
titzer@chromium.org
e4c6f9488e Implement graph trimming in ControlReducer.
Trimming the graph consists of breaking links from nodes that are not reachable from end to nodes that are reachable from end. Such dead nodes show up in the use lists of the live nodes and though mostly harmless, just clutter up the graph. They also can limit instruction selection opportunities, so it is good to get rid of them.

This CL is one half of the ControlReducer functionality, the other half
being branch folding.

R=bmeurer@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24694 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-17 11:51:57 +00:00
neis@chromium.org
93d0e79d6e Again reland "Refine expression typing, esp. by propagating range information."
This relands commit 24552.

TBR=rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24615 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 08:21:46 +00:00
bmeurer@chromium.org
f574d93e51 Revert "Reland "Refine expression typing, esp. by propagating range information.""
This reverts commit r24609 for breaking the
cctest/test-js-typed-lowering/Int32BitwiseBinops test.

TBR=rossberg@chromium.org,neis@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-15 03:50:13 +00:00
neis@chromium.org
a7eb593147 Reland "Refine expression typing, esp. by propagating range information."
This relands commit 24552.

R=rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24609 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-14 16:27:26 +00:00
neis@chromium.org
a2f4963abd Revert "Refine expression typing, esp. by propagating range information."
This reverts commit 24552.

TBR=rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24553 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 10:48:01 +00:00
neis@chromium.org
5a0ff8e656 Refine expression typing, esp. by propagating range information.
R=rossberg@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24552 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-13 10:40:29 +00:00
mstarzinger@chromium.org
3bc3df9a27 Implement inlined stack-check guards in TurboFan.
R=bmeurer@chromium.org
TEST=cctest/test-run-stackcheck/TerminateAtMethodEntry

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24367 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-01 14:03:02 +00:00
bmeurer@chromium.org
3eebdc3264 Replace OStream with std::ostream.
Review URL: https://codereview.chromium.org/618643002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24319 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-30 10:29:32 +00:00
alph@chromium.org
24d1ef4868 Initial implementation of GetStackSample sampling profiler API.
The patch is based on https://codereview.chromium.org/578163002/#ps20001
made by gholap@chromium.org

LOG=N
BUG=v8:3490
R=bmeurer@chromium.org, yurys@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 12:59:54 +00:00
dcarney@chromium.org
5d0e9a2496 [turbofan] basic block profiler
R=titzer@chromium.org, mstarzinger@chromium.org

BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-29 07:29:14 +00:00
bmeurer@chromium.org
5042b23b86 [turbofan] Get rid of the StructuredMacroAssembler.
R=titzer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23718 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-05 08:48:41 +00:00
mstarzinger@chromium.org
51894ec36c Move StructuredMachineAssembler into cctest suite.
R=bmeurer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23681 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 10:23:51 +00:00
bmeurer@chromium.org
4edcff907f Refactor libplatform unit tests to use GTest/GMock.
Also migrate them to src.

BUG=v8:3489
LOG=n
R=svenpanne@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23541 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-01 07:13:55 +00:00
mstarzinger@chromium.org
cc8cec354c Preliminary lowering of typed array loads in TF.
R=titzer@chromium.org
TEST=cctest/test-run-properties/TypedArrayLoad

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23492 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 14:35:11 +00:00
titzer@chromium.org
496697df4e Add MachineSignature, which is an encapsulation of the machine types for parameters and return values in a graph.
This utility will be used to simplify Linkage and fix representation inference
to work with graphs where parameters and return values are something other
than tagged. It will also make testing representation inference a lot
easier, since we can then exactly nail down the machine types of parameters
and returns.

This CL also adds c-signature.h, which demonstrates how to convert C function
signatures into MachineSignatures. The CSignatures will be used in tests to
make it easier and simpler to codegen tests.

R=jarin@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23490 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-28 13:17:38 +00:00
bmeurer@chromium.org
1efe3de965 Migrate test-semaphore to base-unittests.
TEST=base-unittests
BUG=v8:3489
LOG=n
R=machenbach@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23296 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-22 08:52:40 +00:00
sigurds@chromium.org
566cdc3bcd Reland "Add initial support for inlining."
Reland Fixes:
* Remove usage of C++11 vector members.
* Guard tests by V8_TURBO_TARGET.

Changes:
* Make context specialization clean up after itself.
* Add UpdateToAndIncrement to Inputs::iterator.
  Uses:iterator already provides this member function.
* Allow next node id in graph to be set.

R=titzer@chromium.org, mstarzinger@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-20 13:05:03 +00:00
sigurds@chromium.org
b488b2ed29 Revert "Add initial support for inlining."
This reverts commit r23197.

TBR=titzer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 12:48:44 +00:00
sigurds@chromium.org
4b943f35cf Add initial support for inlining.
* Add stack depth checking to function tester.
* Make context specialization clean up after itself.
* Add UpdateToAndIncrement to Inputs::iterator.
  Uses:iterator already provides this member function.
* Allow next node id in graph to be set.

R=mstarzinger@chromium.org, titzer@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23197 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-19 12:23:19 +00:00