Commit Graph

2068 Commits

Author SHA1 Message Date
mstarzinger
c7de3e7f27 [heap] Separate ObjectStats out into its own class.
Note that this is only pulling out the bookkeeping side of things, the
marking visitor that actually records the statistics should also move
into the ObjectStats class. That will be done as a follow-up.

R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30547}
2015-09-02 16:43:40 +00:00
ofrobots
5434d052f1 fix gen-postmortem-metadata.py for kInObjectPropertiesOffset
This is causing build breaks for Node.js w/ V8 4.6.

Map::kInObjectPropertiesOffset was been replaced by
kInObjectPropertiesOrConstructorFunctionIndexOffset in
https://codereview.chromium.org/1276533003. This is causing the post-mortem
debug information generation to fail.

R=bmeurer@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30536}
2015-09-02 07:45:40 +00:00
hablich
224d74ed6f [Release] Stop prepending "r" to commit hashes
Follow-up of https://codereview.chromium.org/1298973007/

Fix syntax

R=adamk@chromium.org, machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30521}
2015-09-01 18:31:50 +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
mstarzinger
093f7260e9 [presubmit] Fix runtime/indentation_namespace linter violations.
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30514}
2015-09-01 15:20:09 +00:00
mstarzinger
77e40bc5f3 Make presubmit.py rules differential.
This turns the absolute list of linter rules within the presubmit.py
wrapper into a list relative to the default of the cpplint.py script.
This has the advantage that new rules are picked up when the script is
updated and that allowed violations are visible from the list.

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30513}
2015-09-01 14:28:31 +00:00
hablich
76fb022fd2 Revert of Stop prepending "r" to commit hashes in merge_to_branch.py (patchset #1 id:1 of https://codereview.chromium.org/1298973007/ )
Reason for revert:
Result when using the script:

tools/release/merge_to_branch.py
  File "tools/release/merge_to_branch.py", line 108
    self["revision_list"] = ", ".join(self["full_revision_list"]))
                                                                 ^
SyntaxError: invalid syntax

Original issue's description:
> Stop prepending "r" to commit hashes in merge_to_branch.py
>
> R=machenbach@chromium.org
>
> Committed: https://crrev.com/e5dbfd06c3dab5934e846c40af2a8b7fb5cdf0d6
> Cr-Commit-Position: refs/heads/master@{#30483}

TBR=machenbach@chromium.org,adamk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30505}
2015-09-01 11:11:11 +00:00
mstarzinger
5f57ebe222 Make isolate.h usable without objects-inl.h header.
This CL us a pure refactoring that makes an empty compilation unit
including just "isolate.h" or "contexts.h" but not "objects-inl.h"
compile without warnings or errors. This is needed to further reduce
the header dependency tangle.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30500}
2015-09-01 09:25:27 +00:00
adamk
e5dbfd06c3 Stop prepending "r" to commit hashes in merge_to_branch.py
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30483}
2015-08-31 17:46:26 +00:00
mstarzinger
3d7a34b5c7 [heap] Move IdentityMap data structure out of heap.
This data structure uses the public heap API only and is not specific
to any heap internals. It should be usable throughout V8 and inclusion
of the header file should not be restricted.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30443}
2015-08-28 13:01:08 +00:00
yangguo
6bef1d0a13 Remove builtin/runtime name clash presubmit check.
It has become obsolete since we do the name lookup at compile time.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30405}
2015-08-27 11:14:09 +00:00
bradnelson
e2b3edbf31 Spliting out TyperCache into ZoneTypeCache to share with AsmTyper.
The zone type cache would be handy inside the asm.js typer.
Pulling it out into a seperate inlinable header to allow sharing.

BUG=https://code.google.com/p/v8/issues/detail?id=4203
TEST=None
R=andreas@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30398}
2015-08-26 21:41:05 +00:00
mtrofin
5d954d6506 [turbofan] Deferred blocks splintering.
This change encompasses what is necessary to enable stack checks in loops without suffering large regressions.

Primarily, it consists of a new mechanism for dealing with deferred blocks by "splintering", rather than splitting, inside deferred blocks.

My initial change was splitting along deferred block boundaries, but the regression introduced by stackchecks wasn't resolved conclusively. After investigation, it appears that just splitting ranges along cold block boundaries leads to a greater opportunity for moves on the hot path, hence the suboptimal outcome.

The alternative "splinters" ranges rather than splitting them. While splitting creates 2 ranges and links them (parent-child), in contrast, splintering creates a new independent range with no parent-child relation to the original. The original range appears as if it has a liveness hole in the place of the splintered one. All thus obtained ranges are then register allocated with no change to the register allocator.

The splinters (cold blocks) do not conflict with the hot path ranges, by construction. The hot path ones have less pressure to split, because we remove a source of conflicts. After allocation, we merge the splinters back to their original ranges and continue the pipeline. We leverage the previous changes made for deferred blocks (determining where to spill, for example).

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

Cr-Commit-Position: refs/heads/master@{#30357}
2015-08-25 14:47:38 +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
mstarzinger
8c70c20568 Remove code.h header and move ParameterCount class.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30291}
2015-08-21 10:25:21 +00:00
mstarzinger
4e39437a02 Separate UnicodeCache out into an own file.
This make inclusion of unicode-inl.h in object.h absolete. Now most
compilation units don't require that header. It also breaks a cycle
within declarations of the scanner.h header.

This tries to remove includes of "-inl.h" headers from normal ".h"
headers, thereby reducing the chance of any cyclic dependencies and
decreasing the average size of our compilation units.

Note that this change still leaves 3 violations of that rule in the
code, checked with the "tools/check-inline-includes.sh" tool.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30268}
2015-08-20 11:47:09 +00:00
domenic
6f582f088a Add experimental, non-snapshotted V8 extras
Embedders would use these for features which must be able to be turned
off at runtime, despite being compiled into V8. They can be turned on
and off by the embedder using the --experimental_extras flag, e.g. via
v8::SetFlagsFromString.

R=yangguo@chromium.org, mlippautz@chromium.org, hpayer@chromium.org
BUG=chromium:507137
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#30260}
2015-08-20 00:01:14 +00:00
mstarzinger
e1ad02375a Remove empty string-search.cc file.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30234}
2015-08-18 18:18:22 +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
danno
cbbaf9ea6a [turbofan] Unify referencing of stack slots
Previously, it was not possible to specify StackSlotOperands for all
slots in both the caller and callee stacks. Specifically, the region
of the callee's stack including the saved return address, frame
pointer, function pointer and context pointer could not be addressed
by the register allocator/gap resolver.

In preparation for better tail call support, which will use the gap
resolver to reconcile outgoing parameters, this change makes it
possible to address all slots on the stack, because slots in the
previously inaccessible dead zone may become parameter slots for
outgoing tail calls. All caller stack slots are accessible as they
were before, with slot -1 corresponding to the last stack
parameter. Stack slot indices >= 0 access the callee stack, with slot
0 corresponding to the callee's saved return address, 1 corresponding
to the saved frame pointer, 2 corresponding to the current function
context, 3 corresponding to the frame marker/JSFunction, and slots 4
and above corresponding to spill slots.

The following changes were specifically	needed:

* Frame	has been changed to explicitly manage three areas of the
  callee frame, the fixed header, the spill slot area, and the
  callee-saved register area.
* Conversions from stack slot indices to fp offsets all now go through
  a common bottleneck: OptimizedFrame::StackSlotOffsetRelativeToFp
* The generation of deoptimization translation tables has been changed
  to support the new stack slot indexing scheme. Crankshaft, which
  doesn't support the new slot numbering in its register allocator,
  must adapt the indexes when creating translation tables.
* Callee-saved parameters are now kept below spill slots, not above,
  to support saving only the optimal set of used registers, which is
  only known after register allocation is finished and spill slots
  have been allocated.

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

Cr-Commit-Position: refs/heads/master@{#30224}
2015-08-18 14:48:11 +00:00
mstarzinger
366262e606 Remove inline header includes from natives.h header.
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30222}
2015-08-18 14:31:34 +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
yangguo
f3059c43a4 Native context: run prologue.js before runtime.js
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30217}
2015-08-18 11:15:50 +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
yangguo
67e4b3732a Move regexp implementation into its own folder.
Review URL: https://codereview.chromium.org/1285163003

Cr-Commit-Position: refs/heads/master@{#30144}
2015-08-13 06:55:36 +00:00
yangguo
5df7d689eb Debugger: load debugger builtins as normal native JS.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30136}
2015-08-12 14:22:22 +00:00
mstarzinger
00a07bc1b7 Remove inline header includes from non-inline headers (1).
This tries to remove includes of "-inl.h" headers from normal ".h"
headers, thereby reducing the chance of any cyclic dependencies and
decreasing the average size of our compilation units.

Note that this change still leaves 7 violations of that rule in the
code. However there now is the "tools/check-inline-includes.sh" tool
detecting such violations.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30125}
2015-08-12 07:32:54 +00:00
adamk
7a823598f8 run-tests.py: warn when no tests were run
The previous approach to this (in 1b1de2d22) did not work well with
bots that intentionally run no tests. But I think this warning message
is still useful for developers.

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

Cr-Commit-Position: refs/heads/master@{#30116}
2015-08-11 17:03:29 +00:00
machenbach
3444bb6485 Revert of Make run-tests.py warn when it's not testing anything (patchset #1 id:1 of https://codereview.chromium.org/1283513003/ )
Reason for revert:
Some bots that don't run tests (by design) don't return the test results json anymore which makes the infrastructure side fail now.

Original issue's description:
> Make run-tests.py warn when it's not testing anything
>
> I've often been confused by an "all passed" run of the test script
> when it turned out that either all the tests I cared about were skipped
> or, more likely, I mistyped the name(s) of the tests I wanted to run.
> This patch aims to fix that (and gives a useful diagnostic for the
> "all matched tests were skipped" case).
>
> R=machenbach@chromium.org
> NOTRY=true
>
> Committed: https://crrev.com/1b1de2d221a0ed23e529e91bf9fa3dc287acb2ca
> Cr-Commit-Position: refs/heads/master@{#30095}

TBR=jkummerow@chromium.org,adamk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30097}
2015-08-10 18:55:04 +00:00
adamk
1b1de2d221 Make run-tests.py warn when it's not testing anything
I've often been confused by an "all passed" run of the test script
when it turned out that either all the tests I cared about were skipped
or, more likely, I mistyped the name(s) of the tests I wanted to run.
This patch aims to fix that (and gives a useful diagnostic for the
"all matched tests were skipped" case).

R=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30095}
2015-08-10 18:16:31 +00:00
adamk
34c5640956 Remove spammy "Network distribution disabled" message from default config
R=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30094}
2015-08-10 18:15:27 +00:00
titzer
7a222c612d [turbofan] Remove architecture-specific linkage files and LinkageTraits. Use macro-assembler-defined constants.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30063}
2015-08-07 10:45:43 +00:00
machenbach
5defb720bd [test] Return variant and random seed on failures.
BUG=chromium:511215
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30057}
2015-08-07 08:36:16 +00:00
Michael Achenbach
4b3ded55fa Whitespace change to test infra-runner change.
Cr-Commit-Position: refs/heads/master@{#30048}
2015-08-06 15:19:09 +00:00
mstarzinger
325257744f Helpful checks.cc file is being helpful.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30046}
2015-08-06 13:33:45 +00:00
machenbach
7ce3afa0df [test] Make test filters platform-independent.
Use the same path separator for test cases on the cmd-line
on all platforms as in testcase.GetLabel, which is used to
report failures.

BUG=chromium:511215
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30045}
2015-08-06 12:36:56 +00:00
yangguo
0a1a714f7e Introduce object visitor to estimate the size of a native context.
This is only an estimate since it counts objects that could be shared,
for example strings, cow arrays, heap numbers, etc.

It however ignores objects that could be shared, but may only be used
by the context to be measured, for example shared function infos,
script objects, scope infos, etc.

R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30029}
2015-08-05 14:07:33 +00:00
adamk
2e4efcfac2 Add a --harmony-object-observe runtime flag (on by default)
To avoid tanking context startup performance, only the actual installation of the
JS-exposed API is flag-guarded. The remainder of the implementation still
resides in the snapshot.

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

Cr-Commit-Position: refs/heads/master@{#30017}
2015-08-04 20:53:32 +00:00
mtrofin
c11ab6f7e5 Setting up the stage for heuristics that preprocess live ranges before register allocation, and are independent of register allocation - e.g. the deferred blocks heuristic, or the split at call sites heuristic.
Added a separate flag for this, since we intend to enable it for the linear allocator as well. Currently, the option is "on" for greedy, as a point in time to enable its testing (through the greedy allocator bots).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30005}
2015-08-04 14:50:05 +00:00
yangguo
4e036f3042 Debugger: refactor ScopeIterator, FrameInspector and DebugEvaluate.
This is a pure refactor and does not change functionality.

R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29995}
2015-08-04 12:10:13 +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
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
titzer
c215c9569e [turbofan] Factor C call descriptor building into compiler/c-linkage.cc.
This is the first step in cutting the Gordian linkage/linkage-impl knot.

This basically changes the axis along which we organize call descriptor
building logic from having platform-specific files dedicated to all call
descriptor types to having call-descriptor-type-specific files that have

The next step is to factor the JS, code stub, and runtime call descriptors
similarly, dumping them into:
  compiler/js-linkage.cc
  compiler/runtime-linkage.cc
  compiler/code-stub-linkage.cc

 or, alternatively, all of them just into compiler/js-linkage.cc.

This also anticipates a wasm-linkage.cc file in the future.

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

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

Cr-Commit-Position: refs/heads/master@{#29931}
2015-07-30 12:36:29 +00:00
machenbach
4970084133 [test] Fix for keying variants.
BUG=chromium:511215
NOTREECHECKS=true
NOTRY=true
LOG=n
TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29900}
2015-07-29 07:40:57 +00:00
machenbach
4fe08abde6 [test] Key variant flags by variant name everywhere.
This allows variants to be named on test failures (follow
up) and then to be used in the test runner for a repro.

This also speeds up variant iteration for test262 and fixes
a bug with variants for benchmarks.

BUG=chromium:511215
NOTREECHECKS=true
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29899}
2015-07-29 07:14:30 +00:00
machenbach
2fdebc0407 [test] Replace android_commands in v8 perf runner.
BUG=chromium:267773
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29875}
2015-07-27 14:57:06 +00:00
oth
cb6e705686 [Interpreter] Add BytecodeArray class and add to SharedFunctionInfo.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29843}
2015-07-24 12:03:03 +00:00
yangguo
3be39a24bf Move Full-codegen into its own folder.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29840}
2015-07-24 10:11:57 +00:00
Michael Achenbach
48d87b57c5 Whitespace change to check git quota issues.
Cr-Commit-Position: refs/heads/master@{#29833}
2015-07-24 06:48:51 +00:00
Michael Achenbach
99ae9b6017 Whitespace change to check git quota issues.
Cr-Commit-Position: refs/heads/master@{#29832}
2015-07-24 06:29:27 +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
machenbach
3bc1b1346a [test] Let test runner only use exact matches of tests on the cmd-line.
There are many test names in the v8 code base that prefix
others, which makes it hard to only run those tests.

BUG=chromium:511215
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29809}
2015-07-23 13:01:38 +00:00
mstarzinger
0788c98d3b [turbofan] Remove bloated GraphBuilder base class.
Using the GraphBuilder base class forces each node creation to go
through a virtual function dispatch just for the sake of saving the
duplication of the NewNode helper methods. In total that added up to
saving minus (sic!) six lines of code.

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29799}
2015-07-23 08:25:40 +00:00
jochen
4da289c55a Store offset between fixed typed array base and data start in object
The layout of fixed typed array base is then capable of handling
external typed arrays as well. In a follow-up CL, I'll delete external
typed arrays, and use fixed typed array base instead

BUG=v8:3996
R=jarin@chromium.org,mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29786}
2015-07-22 10:32:25 +00:00
aperez
abcab811b4 Fix missing "re" module import in GDB support script
The gdb-v8-support.py script uses the "re" module to match regular expression,
but it does not import it, resulting in an error when loading the script from
GDB. This patch adds the missing import.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29770}
2015-07-21 09:28:50 +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
epertoso
df2d1ef979 Don't run the second pass of the pending phantom callbacks if the heap has been torn down.
R=jochen@chromium.org
BUG=511204
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#29759}
2015-07-20 15:04:08 +00:00
binji
35b2114874 Atomics Futex API
BUG=chromium:497295
R=jarin@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29736}
2015-07-17 17:11:47 +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
mvstanton
9386b861fd Special printing for type feedback vectors.
Gdb macro jfv on an object will print it as a feedback vector.
Printouts look like this:

DebugPrint: 0x5dc0d2ad: [TypeFeedbackVector]
 - length: 12
 - ics with type info: 3
 - generic ics: 0
 ICSlot 0 CALL_IC MONOMORPHIC
  [4]: 0x5dc0d365 WeakCell for 0x5dc0cd69 <JS Function foo (SharedFunctionInfo 0x5dc0cb0d)>
  [5]: 0x4203c4c1 <Code: HANDLER>
 ICSlot 1 LOAD_IC MONOMORPHIC
  [6]: 0x5dc0d1f5 WeakCell for 0x3a710481 <Map(FAST_HOLEY_SMI_ELEMENTS)>
  [7]: 0x4203a1c1 <Code: HANDLER>
 ICSlot 2 LOAD_IC UNINITIALIZED
  [8]: 0x3060d045 <Symbol: 711234650 <String[20]: uninitialized_symbol>>
  [9]: 0x3060d045 <Symbol: 711234650 <String[20]: uninitialized_symbol>>
 ICSlot 3 LOAD_IC MONOMORPHIC
  [10]: 0x5dc0d3b5 WeakCell for 0x3a710d71 <Map(FAST_HOLEY_ELEMENTS)>
  [11]: 0x4202af01 <Code: HANDLER>

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29679}
2015-07-15 12:22:03 +00:00
Michael Achenbach
1c148b0a29 Whitespace change to test ninja switch on windows.
Cr-Commit-Position: refs/heads/master@{#29612}
2015-07-13 14:31:23 +00:00
mstarzinger
4b22d5eca2 Remove unused bailout reasons.
This also adds a script to the tools directory that allows to grep for
unused bailout reasons. For now the script needs to be run manually.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29609}
2015-07-13 13:34:12 +00:00
machenbach
0a3b77397b Prepare for using ninja for win64.
BUG=chromium:508921
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29605}
2015-07-13 12:39:28 +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
danno
a1475dae5d Create a internal native context used only for TF-generated code stubs
Until now, TF-generated code stubs piggy-backed off of the builtin
context. Since generation of code stubs is lazy, stubs generated at
different times in different native contexts would contain embedded
pointers different builtin contexts, leading to cross-context references
and memory leaks.

After this CL, all TF-generated code stubs are generated inside a
internal thinned-out, native context that lives solely for the
purpose of hosting generated code stubs.

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

Cr-Commit-Position: refs/heads/master@{#29593}
2015-07-13 09:45:51 +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
machenbach
e925e0b69f [test] Let perf runner interleave try executions.
This allows running two executables interleaved to reduce
flakiness of tryjobs. The executables must reside in
different out directories.

BUG=chromium:507213
LOG=n
NOTRY=true
TEST=python -m unittest run_perf_test

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

Cr-Commit-Position: refs/heads/master@{#29572}
2015-07-10 13:02:25 +00:00
epertoso
3c7d5820b1 Fixes the parser-shell by adding a dependency to StartupDataUtil.
Review URL: https://codereview.chromium.org/1230173002

Cr-Commit-Position: refs/heads/master@{#29566}
2015-07-10 10:27:04 +00:00
machenbach
21d64edfdf [test] Raise timeout for testing without vfp3.
TBR=bmeurer@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29554}
2015-07-09 13:56:16 +00:00
Michael Achenbach
b7795b6a3e Whitespace change to test ninja on windows.
Cr-Commit-Position: refs/heads/master@{#29553}
2015-07-09 11:23:33 +00:00
littledan
a415f59458 Guard @@isConcatSpreadable behind a flag
The breakage to Chrome seems to be based on @@isConcatSpreadable
and turning that part off with this patch fixes the Maps Tips & Tricks
test case.

BUG=chromium:507553
LOG=Y
R=adamk

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

Cr-Commit-Position: refs/heads/master@{#29545}
2015-07-08 21:49:58 +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
machenbach
373d739650 [test] Refactoring - Make perf suite definitions stateless regarding measurements.
This prepares for making multiple measurements of one trace.
For this, the suite/trace configurations need to be
independent of the measurement instances.

BUG=chromium:507213
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29531}
2015-07-08 12:31:38 +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
machenbach
3e966abc1f [test] Turn off certificate verification when downloading test data on windows.
BUG=v8:4254
LOG=n
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29513}
2015-07-07 11:42:26 +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
e7330a644f [test] Fix redirect problem for downloading test data on windows.
BUG=v8:4254
LOG=n
NOTRY=true
NOPRESUBMIT=true
NOTREECHECKS=true
TBR=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29510}
2015-07-07 10:35:33 +00:00
machenbach
90d0f67fd6 [test] Push binaries to separate folders on Android devices.
BUG=chromium:507213
LOG=n
NOTRY=true
TBR=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29492}
2015-07-06 12:37:48 +00:00
machenbach
7d5db46e89 [test] Add android perf trybots.
BUG=chromium:502176
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29491}
2015-07-06 12:17:27 +00:00
bmeurer
ef661b0804 [turbofan] Reland "Add new JSFrameSpecialization reducer." and "Perform OSR deconstruction early and remove type propagation.".
We have to reland these two commits at once, because the first breaks
some asm.js benchmarks without the second. The change was reverted
because of bogus checks in the verifier, which will not work in the
presence of OSR (and where hidden because of the type back propagation
hack in OSR so far). Original messages are below:

[turbofan] Add new JSFrameSpecialization reducer.

The JSFrameSpecialization specializes an OSR graph to the current
unoptimized frame on which we will perform the on-stack replacement.
This is used for asm.js functions, where we cannot reuse the OSR
code object anyway because of context specialization, and so we could as
well specialize to the max instead.

It works by replacing all OsrValues in the graph with their values
in the JavaScriptFrame.

The idea is that using this trick we get better performance without
doing the unsound backpropagation of types to OsrValues later. This
is the first step towards fixing OSR for TurboFan.

[turbofan] Perform OSR deconstruction early and remove type propagation.

This way we don't have to deal with dead pre-OSR code in the graph
and risk optimizing the wrong code, especially we don't make
optimistic assumptions in the dead code that leaks into the OSR code
(i.e. deopt guards are in dead code, but the types propagate to OSR
code via the OsrValue type back propagation).

BUG=v8:4273
LOG=n
R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29486}
2015-07-06 11:11:26 +00:00
machenbach
9e71cdba48 Revert "[turbofan] Add new JSFrameSpecialization reducer."
Also revert "[turbofan] Perform OSR deconstruction early and remove type propagation."

This reverts commit b0a852e8c2.

This reverts commit cdbb6c485b.

NOTRY=true
NOTREECHECKS=true
BUG=v8:4273
LOG=n
TBR=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29480}
2015-07-06 10:01:42 +00:00
bmeurer
b0a852e8c2 [turbofan] Add new JSFrameSpecialization reducer.
The JSFrameSpecialization specializes an OSR graph to the current
unoptimized frame on which we will perform the on-stack replacement.
This is used for asm.js functions, where we cannot reuse the OSR code
object anyway because of context specialization, and so we could as well
specialize to the max instead.

It works by replacing all OsrValues in the graph with their values in
the JavaScriptFrame.

The idea is that using this trick we get better performance without
doing the unsound backpropagation of types to OsrValues later. This is
the first step towards fixing OSR for TurboFan.

R=jarin@chromium.org
BUG=v8:4273
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29476}
2015-07-06 08:27:12 +00:00
jochen
da529a1243 Remove usage of to-be-deprecated APIs from tools
BUG=v8:4134
R=bmeurer@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29474}
2015-07-06 07:11:55 +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
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
Michael Achenbach
32cdac53d3 Whitespace change to test build priorities.
Cr-Commit-Position: refs/heads/master@{#29441}
2015-07-02 13:24:32 +00:00
littledan
a1dcac3df7 Include Harmony Array/TypedArray methods unconditionally
Conditionally including Array and TypedArray methods seems to cause
a slowdown in V8 context creation, possibly due to the new code added.

BUG=chromium:504629
R=adamk@chromium.org
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29430}
2015-07-01 23:10:21 +00:00
hablich
a023b39f35 [Release tools] Add instructions how to close the auto-roller.
R=machenbach@chromium.org
BUG=494641
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29404}
2015-07-01 09:37:17 +00:00
oth
cff8c9b933 Ensure mjsunit tests use dashes not underscores in flags directives.
BUG=chromium:505228
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#29355}
2015-06-29 17:08:18 +00:00
mtrofin
1cd60451de [turbofan] Greedy allocator refactoring.
Separated core greedy allocator concepts, exposing the APIs we would want to continue working with. In particular, this change completely reworks CoalescedLiveRanges to reflect the fact that we expect more than one possible conflict, scrapping the initial design of the structure. Since this is a critical part of the design, this change may be thought of as a full rewrite of the algorithm.

Reduced all heuristics to just 2 essential ones: split "somewhere", which we'll still need when all other heuristics fail; and spill.

Introduced a simple primitive for splitting - at GapPosition::START. The goal is to use such primitives to quickly and reliably author heuristics.

I expected this primitive to "just work" for any arbitrary instruction index within a live range - e.g. its middle. That's not the case, it seems to upset execution in certain scenarios. Restricting to either before/after use positions seems to work. I'm still investigating what the source of failures is in the case of "arbitrary instruction in the range" case.

I intended to document the rationale and prove the soundness of always using START for splits, but I will postpone to after this last remaining issue is resolved.

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

Cr-Commit-Position: refs/heads/master@{#29352}
2015-06-29 15:56:33 +00:00
machenbach
b2348f42c0 [android] Remove legacy architecture configs from perf runner.
The android_* configs were never real v8 target
architectures, only make targets. This doesn't make sense
with ninja anymore.

BUG=chromium:502176
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29349}
2015-06-29 15:07:30 +00:00
Michael Achenbach
80c8a3fe1b Whitespace change to test android ninja/goma switch.
Cr-Commit-Position: refs/heads/master@{#29344}
2015-06-29 12:54:06 +00:00
dslomov
b4f49586ab [destructuring] Re-index materialized literals in arrow function parameters.
R=wingo@igalia.com
BUG=v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#29337}
2015-06-26 21:39:53 +00:00
machenbach
3e38d64495 Fix missing source dependencies.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#29328}
2015-06-26 14:24:52 +00:00
machenbach
57d1c91cd7 [tools] Add a tool to show potentially missing source deps.
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#29318}
2015-06-26 10:35:26 +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
arv
a0f4706e5e jsmin.py: Fix issue with escaping of back ticks
The escaping of back ticks in template strings was incorrect

BUG=v8:4240
LOG=N
TBR=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#29271}
2015-06-24 22:29:46 +00:00