Commit Graph

25660 Commits

Author SHA1 Message Date
mstarzinger
ea26401266 [turbofan] Call FastNewContextStub for function context.
This lowers JSCreateFunctionContext nodes to call the above stub for
help with allocating function contexts when possible. It also contains
an implementation for inlined allocations of such contexts, which is
still behind a flag until inlined allocations are ready for prime time.

TEST=unittests/JSTypedLoweringTest.JSCreateFunctionContext
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31068}
2015-10-02 09:30:21 +00:00
ishell
aa6a654a0f Temporarily disable mjsunit/call-counts test until --vector-stores is prermanently enabled.
BUG=v8:4458
LOG=N
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31067}
2015-10-02 09:29:10 +00:00
rmcilroy
90f69d1610 Revert of [Interpreter] Add CallRuntime support to the interpreter. (patchset #6 id:180001 of https://codereview.chromium.org/1362383002/ )
Reason for revert:
Broke Arm64 bot (CEntry stub is trying to pop arguments off stack when argv_in_reg, so I need to fix this).

Original issue's description:
> [Interpreter] Add CallRuntime support to the interpreter.
>
> Adds support for calling runtime functions from the interpreter. Adds the
> CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
> and the arguments in sequential registers. Adds a InterpreterCEntry builtin
> to enable the interpreter to enter C++ code based on the functionId.
>
> Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
> and groups all the interpreter builtins together.
>
> BUG=v8:4280
> LOG=N
>
> Committed: https://crrev.com/40e8424b744f8b6e3e1d93e20f23487419911dfc
> Cr-Commit-Position: refs/heads/master@{#31064}

TBR=bmeurer@chromium.org,oth@chromium.org,mstarzinger@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4280

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

Cr-Commit-Position: refs/heads/master@{#31066}
2015-10-02 09:21:59 +00:00
Djordje.Pesic
d36667b391 MIPS: Pass -fp32 flag to the compiler when building for loongson
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31065}
2015-10-02 07:32:06 +00:00
rmcilroy
40e8424b74 [Interpreter] Add CallRuntime support to the interpreter.
Adds support for calling runtime functions from the interpreter. Adds the
CallRuntime bytecode which takes a Runtime::FunctionId of the function to call
and the arguments in sequential registers. Adds a InterpreterCEntry builtin
to enable the interpreter to enter C++ code based on the functionId.

Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall
and groups all the interpreter builtins together.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31064}
2015-10-02 07:25:56 +00:00
paul.lind
88a3cc79df Fix another gcc 4.9.2 sign-compare error.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31063}
2015-10-02 06:59:56 +00:00
v8-autoroll
2657beadd3 Update V8 DEPS.
Rolling v8/third_party/icu to 94e4b770ce2f6065d4261d29c32683a6099b9d93

Rolling v8/tools/swarming_client to e4c0e242eeec361886ed2b89591a505ebe24db43

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31062}
2015-10-02 03:25:02 +00:00
machenbach
366dc81143 [Swarming] Presort tests - slowest first.
Swarming won't support an incremental data file. By just
sorting the lowest hanging fruits to the beginning we
already get a big bang for the buck (>80% of the improvement
we get otherwise).

This will require semi-regular manual updates of the
slowest tests.

BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31061}
2015-10-01 19:19:17 +00:00
alph
0dedff6bf1 Move strings-storage.* to the profiler directory
Review URL: https://codereview.chromium.org/1378253002

Cr-Commit-Position: refs/heads/master@{#31060}
2015-10-01 18:11:03 +00:00
ishell
898524afce Disable vector store ICs for mjsunit/call-counts because slot indices change when --vector-stores is enabled.
Review URL: https://codereview.chromium.org/1381073003

Cr-Commit-Position: refs/heads/master@{#31059}
2015-10-01 18:03:46 +00:00
rmcilroy
03369ed2cb [Interpreter] Add support for short (16 bit) operands.
Adds support for short operands, starting with kIdx16. Introduces
BytecodeTraits to enable compile time determination of various traits for a
bytecode, such as size, operands, etc. Reworks BytecodeIterator,
BytecodeArrayBuilder and Bytecodes::Decode to support 16 bit operands. Adds
support to Interpreter to load 16 bit operands.

Also fixes a bug with ToBoolean where it wouldn't get emitted at the start
of a block, and added a test.

BytecodeTraits template magic inspired by oth@chromium.org.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31058}
2015-10-01 17:23:14 +00:00
titzer
924b0ecf85 [turbofan] Fix calls to computed code objects.
R=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31057}
2015-10-01 17:11:56 +00:00
alph
8d55da3830 Eliminate no_frame_range data
It was supposed to be used by the CPU profiler. But as long as
these ranges are not built when profiler is not running, once
the profiler is started there're no ranges for already compiled
functions. So basically this code never worked.

As long as now CPU profiler uses another approach this code is no
longer needed.

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

Cr-Commit-Position: refs/heads/master@{#31056}
2015-10-01 17:08:55 +00:00
neis
ce08f45b1b Add access check to JSObject::IsExtensible.
R=verwaest@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31055}
2015-10-01 16:10:03 +00:00
bmeurer
2a0759d3ff [es6] Fix missing bits for full @@toPrimitive support.
Introduce %_ToNumber intrinsic, which just calls to the existing
ToNumberStub, and remove all uses of our custom JavaScript plus
intrinsics based ToNumber and friends.

Also replace the TO_NUMBER_INLINE macro with TO_NUMBER,
which is currently a wrapper for %_ToNumber. Newly written JS
code should use TO_NUMBER (similar to TO_STRING, TO_INT32,
and friends).

Also finally remove the DefaultString/DefaultNumber builtins, which
are basically the ES5 version of ToPrimitive. Now all code uses the
ES6 version, which is implemented in Object::ToPrimitive and
JSReceiver::ToPrimitive in C++.

CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
R=jarin@chromium.org
BUG=v8:4307
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31054}
2015-10-01 16:08:49 +00:00
hablich
7ccf444572 [Release] Removed not needed revert feature from merge_to_branch.py
This feature is no longer needed because of the autotag bot.

NOTRY=true
LOG=N
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31053}
2015-10-01 15:22:12 +00:00
oth
a7e16e5132 [Interpreter] Add for/while/do support to the bytecode generator.
Improve bytecode generation for if when there's no else clause.

Display target addresses for jump instructions in
Bytecode::Disassemble().

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31052}
2015-10-01 15:04:27 +00:00
neis
cf82eea6d7 Fix completion of try..finally.
R=rossberg
BUG=v8:2529
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#31051}
2015-10-01 13:59:56 +00:00
ishell
90998947bc Distinction between FeedbackVectorICSlot and FeedbackVectorSlot eliminated.
This CL also allows to use arbitrary number of feedback vector elements for particular slot kind.

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

Cr-Commit-Position: refs/heads/master@{#31050}
2015-10-01 13:48:19 +00:00
mbrandy
1ed17f2057 [Interpreter] Fix cctest/test-bytecode-generator/IfConditions.
Avoid hard-coding expected parameter indices.  These depend on the
frame size which can vary (e.g. if embedded constant pools are
enabled).

R=oth@chromium.org, rmcilroy@chromium.org, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31049}
2015-10-01 13:33:26 +00:00
mlippautz
1d998bd0a6 [heap] Refactor and clean up FreeListCategory.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31048}
2015-10-01 13:17:15 +00:00
hablich
2128d6c036 [Release] Fix broken UnitTest
NOTRY=true
LOG=N
R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31047}
2015-10-01 13:12:20 +00:00
machenbach
983747acce [swarming] Add isolate driver.
This is a simplified version of chromium's isolate driver:
- 'prepare' will create a *.isolate.gen.json with the
arguments to be used later.
- other modes will just be passed through to the isolate
script.

BUG=chromium:535160
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31046}
2015-10-01 12:32:09 +00:00
machenbach
baeb9125e1 [swarming] Add luci-go's isolate tool, downloaded via runhooks.
Port https://codereview.chromium.org/1154633003/

BUG=chromium:535160
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31045}
2015-10-01 12:11:46 +00:00
mvstanton
5becebee31 Wrap JSFunction bindings in a helper object.
We need to do other things with this bindings object, like store a feedback vector. Therefore, it's a good time to wrap it up in a helper class.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#31044}
2015-10-01 11:46:19 +00:00
hablich
8499fa2505 [Release] Distinguish between merges and follow-up CLs
With this change mergeinfo.py gets more useful. There is
a distinction between merges and follow-up CLs/ports/reverts.

Also the information is show if the commit is already
rolled/an lkgr/deployed to Canary channel.

Additionally some formatting errors were resolved and
the already existing git wrapper used.

LOG=N
R=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#31043}
2015-10-01 11:29:16 +00:00
rossberg
2c2848dccf [es6] Scoping & initialization for var shadowing non-simple parameters
Var-bindings may shadow parameters from a non-simple parameter list. When that happens: they create separate bindings, but are initialised with the respective parameter value. Thus:

(function(x, f = () => x) { var x; var y = x; x = 2; return [x, y, f()] })(1) -->  [2, 1, 1]

This CL implements that by inserting a suitable assignment for every shadwowing var-variable (e.g., x = outer_x above) at the beginning of the function's body block.

R=adamk@chromium.org
BUG=v8:4440,v8:811
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31042}
2015-10-01 10:42:33 +00:00
neis
af33cccfc4 Enable visitor in rewriter to replace statements.
This is in preparation of implementing ES6 completion semantics and
depends on #1362333002.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31041}
2015-10-01 09:06:13 +00:00
mlippautz
7a6f47fe22 [heap] Properly account for wasted bytes.
- Wasted bytes are now accounted where they accrue, i.e., the corresponding free
  list. The amount of waste is transferred by concatenating free lists.
- During concatenation, free lists are no longer locked on FreeListCategory
  level, but in the FreeList itself, simplifying the sync between contained nodes
  and wasted bytes (which are effectively dropped nodes).

This is pre-work for properly moving memory to compaction spaces, which requires
correct accounting of wasted memory.

BUG=chromium:524425
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31040}
2015-10-01 08:14:23 +00:00
cbruni
6b629ef76c KeyAccumulator: tweaking parameters for benchmarks
R=ishell@chromium.org
BUG=chromium:536790
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#31039}
2015-10-01 07:20:47 +00:00
v8-autoroll
ed906a9100 Update V8 DEPS.
Rolling v8/buildtools to 0c88009d5c50b9f21b6f8849db08abfb9eb29f1e

TBR=machenbach@chromium.org,vogelheim@chromium.org,hablich@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31038}
2015-10-01 03:24:09 +00:00
littledan
76da493315 Extend Annex B 3.3 sloppy-mode block-scoped hoisting to scripts, eval
The ES2015 spec is missing an extension of sloppy-mode block-scoped function
behavior to the global scope in scripts, as well as to eval. This patch
brings that hoisting to those two areas. The behavior is not perfectly
spec-compliant since properties created on the global scope should be
set as enumerable even if they are non-enumerable previously, but the
attributes will not be modified if the property already exists under
this patch.

BUG=v8:4441
LOG=Y
R=adamk
TEST=reddit comment functionality seems to be fixed

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

Cr-Commit-Position: refs/heads/master@{#31037}
2015-09-30 23:48:34 +00:00
mbrandy
6fb3708d68 PPC: Full code shouldn't embed the type feedback vector.
Port c90c60ba26

Original commit message:
    Make sure to always reference it indirectly. This allows us to make the vector
    native-context dependent should we wish.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31036}
2015-09-30 21:16:46 +00:00
mbrandy
aeefe1013d PPC: Introduce LiteralsArray to hide it's implementation.
Port d8cdd6956a

Original commit message:
    The LiteralsArray will soon hold a type feedback vector. Code treats it as an
    ordinary fixed array, and needs to stop that.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31035}
2015-09-30 21:10:35 +00:00
mbrandy
96d6fcffa5 PPC: [es6] Fix invalid ToString in implementation of ToName.
Port 09626525fe

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31034}
2015-09-30 21:09:35 +00:00
mbrandy
8de7235caf PPC: [turbofan] Call ArgumentsAccessStub to materialize arguments.
Port 9b12ec9ac2

Original commit message:
    This lowers JSCreateArgument nodes to call the ArgumentsAccessStub for
    help with materializing arguments objects when possible. Along the way
    this changes the calling convention of said stub to take parameters in
    registers instead of on the stack.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31033}
2015-09-30 21:07:30 +00:00
adamk
c2c6323218 Two minor cleanups in pattern rewriter
- No need to call AsVariableProxy() on a VariableProxy
- Reduce AST visitor boilerplate using pre-existing macro
  (and re-alphabetize the list of non-patterns).

R=littledan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31032}
2015-09-30 20:22:46 +00:00
adamk
163419e8fa Remove --harmony-arrow-functions flag
Arrow functions have been enabled by default since the 4.5 branch.

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

Cr-Commit-Position: refs/heads/master@{#31031}
2015-09-30 19:50:40 +00:00
adamk
51d28914bd [es6] Function constructor-created functions should be named "anonymous"
Besides matching the spec, this matches the behavior of Firefox and Edge.

BUG=v8:3699
LOG=n
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

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

Cr-Commit-Position: refs/heads/master@{#31030}
2015-09-30 19:20:04 +00:00
adamk
bab3b55082 Revert "Stage sloppy block-scoped functions (Annex B 3.3)"
The current implemention breaks sloppy mode code that uses function
declarations inside blocks at top-level. Work is ongoing on a patch
to fix this issue, but in the meantime it seems reasonable to move
the feature out of staging.

Manual revert of commit 6e07f5a75b.

R=littledan@chromium.org
BUG=chromium:535836
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#31029}
2015-09-30 19:17:41 +00:00
kozyatinskiy
ce54e16270 [V8] Add name of function for function's closure scope
Added ScopeDetails.name field for closure scopes. It contains function's debug name of current context of scope.

BUG=493156
LOG=Y
R=yurys@chromium.org,yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31028}
2015-09-30 17:24:33 +00:00
mbrandy
623e802132 PPC: [es6] Introduce spec compliant IsConstructor.
Port 8fe3ac0701

Original commit message:
    There was already a bit on the Map named "function with prototype",
    which basically meant that the Map was a map for a JSFunction that could
    be used as a constructor. Now this CL generalizes that bit to
    IsConstructor, which says that whatever (Heap)Object you are looking at
    can be used as a constructor (i.e. the bit is also set for bound
    functions that can be used as constructors and proxies that have a
    [[Construct]] internal method).

    This way we have a single chokepoint for IsConstructor checking, which
    allows us to get rid of the various ways in which we tried to guess
    whether something could be used as a constructor or not.

    Drive-by-fix: Renamed IsConstructor on FunctionKind to
    IsClassConstructor to resolve the weird name clash, and the
    IsClassConstructor name also matches the spec.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413, v8:4430
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31027}
2015-09-30 17:01:21 +00:00
mbrandy
aa30d4e29d PPC: [runtime] Remove weird pushing of something on StackOverflow.
Port 556b522ac6

Original commit message:
    We somehow try to push some stuff on the stack when we detect a stack
    overflow, that we don't need. Even worse we might access outside the
    valid stack bounds. Since we don't need this, it's gone.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=chromium:534881
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31026}
2015-09-30 16:30:21 +00:00
mbrandy
ba79bd48c2 PPC: [builtin] Refactor Invoke to deal with any kind of callable.
Port 634d1d86d8

Original commit message:
    Now both Execution::Call and Execution::New can deal with any
    kind of target and will raise a proper exception if the target is not
    callable (which is not yet spec compliant for New, as we would
    have to check IsConstructor instead, which we don't have yet).

    Now we no longer need to do any of these weird call/construct
    delegate gymnastics in C++, and we finally have a single true
    bottleneck for Call/Construct abstract operations in the code
    base, with only a few special handlings left in the compilers to
    optimize the JSFunction case.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4430, v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31025}
2015-09-30 16:28:55 +00:00
jkummerow
b4b69fd9c0 Teach JSReceiver::GetKeys() how to include symbols
No users of that functionality yet, those will come separately.

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

Cr-Commit-Position: refs/heads/master@{#31024}
2015-09-30 15:00:32 +00:00
jkummerow
e3833fdce2 Add LookupIterator constructor for arbitrary Object keys
Continuing unification of properties/elements handling, the new
LookupIterator::PropertyOrElement(..., Handle<Object> key, ...) takes
any Object and does the required ToPrimitive/ToName/ToArrayIndex
conversions on it.

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

Cr-Commit-Position: refs/heads/master@{#31023}
2015-09-30 14:51:56 +00:00
neis
66660ab02b Reland "Clean up rewriter" (issue 1362333002).
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31022}
2015-09-30 14:43:30 +00:00
neis
4620029c4b Make AstPrinter print position information.
R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#31021}
2015-09-30 14:23:06 +00:00
machenbach
9a03979dc9 [swarming] Only isolate d8 with target toolset.
BUG=chromium:535160,chromium:537247
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#31020}
2015-09-30 13:48:26 +00:00
mstarzinger
6a769ac1df [presubmit] Enable readability/namespace linter checking.
This enables linter checking for "readability/namespace" violations
during presubmit and instead marks the few known exceptions that we
allow explicitly.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#31019}
2015-09-30 13:47:11 +00:00