Commit Graph

2000 Commits

Author SHA1 Message Date
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