Commit Graph

27874 Commits

Author SHA1 Message Date
mlippautz
10429d9f53 Revert "[heap] Make survival counters concurrent (atomic)"
This reverts commit 7cf64f4017.

Tanks octane. Will use a different approach here.

BUG=chromium:578871, chromium:524425
LOG=N
TBR=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33382}
2016-01-19 08:46:14 +00:00
titzer
6d38478849 [wasm] Use TruncationMode::kJavaScript when coming from asm.js.
R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33381}
2016-01-19 08:29:28 +00:00
bmeurer
bf027fe756 [runtime] Migrate Object.getOwnPropertyNames to C++.
The Object.getOwnPropertyNames method always calls into C++ anyway,
so there's no point in having the JavaScript wrapper around at all.

Drive-by-fix: Inline GetOwnEnumerablePropertyNames into its single
call site.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33380}
2016-01-19 07:35:01 +00:00
bmeurer
3fdd37b028 [builtins] Migrate Object.getOwnPropertyDescriptor to C++.
The implementation of Object.getOwnPropertyDescriptor always called into
C++ anyway, so there's no need to have this JavaScript wrapper around at
all.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33379}
2016-01-19 06:55:28 +00:00
v8-autoroll
8e918ea2ad Update V8 DEPS.
Rolling v8/tools/clang to c3b604840a63c06fa1c0c652119860e97fd57abe

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

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

Cr-Commit-Position: refs/heads/master@{#33378}
2016-01-19 04:29:59 +00:00
verwaest
90952d768b [runtime] Stop cloning AccessorInfo, just rely on PropertyAttributes for readonly.
The old mechanism was a left-over from a previous time where the runtime
would rely on the presence or absence of the setter to figure out
whether or not the property is mutable. This is unnecessary by now.

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

Cr-Commit-Position: refs/heads/master@{#33377}
2016-01-18 20:00:04 +00:00
verwaest
c7c6093590 [runtime] Reuse MakeAccessor in MakeModuleExport
Previously MakeModuleExport invalidly set "all-can-*" to true. Also module export setters need to throw (in strict-mode) according to ES6 9.4.6.6 and 9.4.6.9.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33376}
2016-01-18 18:48:43 +00:00
Ben L. Titzer
2e16d9862a [wasm] Disable asm-wasm test (requires SSE 4.1).
R=jkummerow@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33375}
2016-01-18 18:47:35 +00:00
titzer
5ad6f6de07 [wasm] Add test for non-misaligned OOB access.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33374}
2016-01-18 17:34:08 +00:00
mstarzinger
e26aa58b1a [interpreter] Add field for handler table to bytecode array.
This adds a handler table field to the header of our BytecodeArray
objects. The field will eventually hold a range-based handler table
similar to full-codegen code, to support exception handlong within
interpreted code.

R=oth@chromium.org
BUG=v8:4674
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33373}
2016-01-18 17:21:01 +00:00
titzer
60d9733a57 [wasm] Enable WASM JavaScript API tests.
LOG=Y
BUG=chromium:575167

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

Cr-Commit-Position: refs/heads/master@{#33372}
2016-01-18 17:19:56 +00:00
mythria
8ae9fb69c2 [Interpreter] Fixes VisitObjectLiteral to reserve consecutive registers in innerscope.
VisitObjectLiteral has two parts. First it creates a literal and then
sets properties or accessor properties. Setting properties requires a
runtime call and it expects the literal object which was created in the
first part is contiguous with other registers it allocates. Since these
are allocated in a different scope they are not always contiguous.
This causes problems with mjsunit/setter-on-constructor-prototype.js.
This cl fixes by allocating contiguous registers in the inner scope.
Literal value is copied into the newly allocated register so that all
the required registers are always contiguous.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33371}
2016-01-18 17:18:52 +00:00
Ben L. Titzer
81e796ff36 [wasm] Disable failing tests on arm.
R=ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33370}
2016-01-18 17:07:05 +00:00
ahaas
900b293348 Revert of [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (patchset #2 id:20001 of https://codereview.chromium.org/1584663007/ )
Reason for revert:
Code is incorrect for -0.

Original issue's description:
> [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1.
>
> The implementation sets the rounding mode flag and then uses the
> cvtsd2si and cvtsi2sd instructions (convert between float and int) to do
> the rounding. Input values outside int range either don't have to be
> rounded anyways, or are rounded by calculating input + 2^52 - 2^52 for
> positive inputs, or input -2^52 + 2^52 for negative inputs. The original
> rounding mode is restored afterwards.
>
> R=titzer@chromium.org
>
> B=575379
>
> Committed: https://crrev.com/fa5d09e547abe79a8c82f780deb980c53ad78beb
> Cr-Commit-Position: refs/heads/master@{#33367}

TBR=titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#33369}
2016-01-18 16:28:00 +00:00
yangguo
4836180143 [regexp] do not include irregexp interpreter by default.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33368}
2016-01-18 16:12:29 +00:00
ahaas
fa5d09e547 [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1.
The implementation sets the rounding mode flag and then uses the
cvtsd2si and cvtsi2sd instructions (convert between float and int) to do
the rounding. Input values outside int range either don't have to be
rounded anyways, or are rounded by calculating input + 2^52 - 2^52 for
positive inputs, or input -2^52 + 2^52 for negative inputs. The original
rounding mode is restored afterwards.

R=titzer@chromium.org

B=575379

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

Cr-Commit-Position: refs/heads/master@{#33367}
2016-01-18 16:10:09 +00:00
titzer
b577ecfd6a [wasm] Create a wrapper function for WASM.asmCompileRun().
R=bradnelson@chromium.org, ahaas@chromium.org
LOG=Y
BUG=chromium:575372

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

Cr-Commit-Position: refs/heads/master@{#33366}
2016-01-18 15:39:44 +00:00
nikolaos
9ed5596ade Fix re-indexing for literals in do-expressions
This became temporarily a big issue, because spreads are desugared
into do-expressions.  This patch fixes the problem with having
spreads as parameter initializers in arrow expressions, e.g., this
line would crash:

    [], ((x = [...[42]]) => x)();

R=rossberg@chromium.org
BUG=chromium:578038
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33365}
2016-01-18 15:20:58 +00:00
verwaest
e4b41d64e5 [runtime] remove left-over distinction between AccessorInfo and ExecutableAccessorInfo
Review URL: https://codereview.chromium.org/1600353003

Cr-Commit-Position: refs/heads/master@{#33364}
2016-01-18 15:09:08 +00:00
cbruni
5346972186 Use default argument count for runtime function calls.
In many places we over-specify runtime-calls by explicitly mentioning
again the argument count. Except for var-args runtime-functions we can
easily deduce this from the parameters in runtime.h.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33363}
2016-01-18 14:48:24 +00:00
titzer
bb552d4c8c [wasm] Add more thorough tests for WASM->JS and JS->WASM parameters.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33362}
2016-01-18 14:29:28 +00:00
balazs.kilvady
ccb3181c0b MIPS: Refine 'r6 compact branch optimization.'
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33361}
2016-01-18 14:28:20 +00:00
neis
faf5e68169 Make generators non-constructable.
BUG=v8:4163,v8:4630
LOG=y

R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#33360}
2016-01-18 13:11:06 +00:00
cbruni
ec30425a77 [proxy] Reload the initial map after prototype lookup on constructable
Proxy.

If a constructable Proxy changes the target's prototype during the
prototype lookup the target's initial map stays uninitialized half-way
during object construction.

LOG=n
BUG=chromium:578039

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

Cr-Commit-Position: refs/heads/master@{#33359}
2016-01-18 12:49:29 +00:00
jochen
9b7035d96c LookupIterator should find private symbols on JSProxies
BUG=chromium:571365
R=verwaest@chromium.org,neis@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33358}
2016-01-18 12:41:30 +00:00
rmcilroy
1ea0b91a83 [Interpreter] Make ForInPrepare take a kRegTriple8 and ForInNext take kRegPair8 for cache state
Make ForInPrepare take a kRegTriple8 operand and ForInNext take kRegPair8
operand for cache state. This is to ensure that the cache state output of
ForInPrepare is in consecutive registers to allow us to deopt the
ForInPrepare node from TF->Ignition (to be done in a followup CL).

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33357}
2016-01-18 12:40:22 +00:00
neis
107db2ca8c Remove premature crankshaft optimization of HasInPrototypeChain.
R=bmeurer@chromium.org
BUG=chromium:578775
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33356}
2016-01-18 12:12:32 +00:00
mythria
dac46ef717 [Interpreter] Adds support for variable/function declarations in lookup slots.
Adds support for variable and function declarations in lookup slots to the
interpreter.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33355}
2016-01-18 12:00:25 +00:00
yangguo
085487dd03 [regexp] fix interpreted irregexp build.
R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33354}
2016-01-18 10:42:13 +00:00
mstarzinger
8041a753ca Drop "current_code" from compiler API.
This removes the need to pass in the current unoptimized code when
requesting optimized code for a function. Note that the notion of
unoptimized code becomes moot when optimizing from the interpreter
bytecode, hence the API should not encode such a dependency.

R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33353}
2016-01-18 10:24:22 +00:00
zhengxing.li
a4414c9570 X87: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple.
port 84f8a506e2 (r33334)

  original commit message:
  Adds a ForInPrepare Runtime function which returns a triple of
  cache_type, cache_array and cache_length.

  This requires adding support to CEntryStub to call runtime functions
  which return a ObjectTriple - a struct containing three Object*
  pointers. Also did some cleanup of the x64 CEntryStub to avoid
  replicated code.

  Replaces the interpreter's use of the ad-hock InterpreterForInPrepare
  Runtime function with ForInPrepare in preparation for fixing deopt in
  BytecodeGraphBuilder for ForIn (which will be done in a followup CL).

  MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33352}
2016-01-18 08:42:08 +00:00
zhengxing.li
30bcfba3f7 X87: [turbofan] Add the RoundInt32ToFloat32 operator to turbofan.
port e06f7d784e (r33347)

  original commit message:
  The new operator converts an int32 input to float32. If the input cannot
  be represented exactly in float32, the value is rounded using the
  round-ties-even rounding mode (the default rounding mode).

  I provide implementations of the new operator for x64, ia32, arm, arm64,
  mips, mips64, ppc, and ppc64.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#33351}
2016-01-18 08:39:58 +00:00
bmeurer
6faa6b317a [runtime] Remove the now unused %StoreArrayLiteralElement.
The runtime function is no longer used and obsolete by now.

R=jarin@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33350}
2016-01-18 06:34:22 +00:00
mtrofin
4ca809d7b2 [turbofan] Skip spill operand ranges from spilled in deferred.
We don't need to treat as "spills in deferred blocks" ranges that have
no spill range, or that have a spill operand.

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

Cr-Commit-Position: refs/heads/master@{#33349}
2016-01-18 06:05:43 +00:00
v8-autoroll
c539769aa5 Update V8 DEPS.
Rolling v8/tools/clang to 908392433b14b2ffe86bd1c791531816a65b7378

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

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

Cr-Commit-Position: refs/heads/master@{#33348}
2016-01-17 04:29:46 +00:00
ahaas
e06f7d784e [turbofan] Add the RoundInt32ToFloat32 operator to turbofan.
The new operator converts an int32 input to float32. If the input cannot
be represented exactly in float32, the value is rounded using the
round-ties-even rounding mode (the default rounding mode).

I provide implementations of the new operator for x64, ia32, arm, arm64,
mips, mips64, ppc, and ppc64.

R=titzer@chromium.org, v8-arm-ports@googlegroups.com, v8-mips-ports@googlegroups.com, v8-ppc-ports@googlegroups.com

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

Cr-Commit-Position: refs/heads/master@{#33347}
2016-01-16 13:12:16 +00:00
ahaas
fc53eed14b [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan.
The new operator converts a float32 input to int32 through truncation.
I provide implementations of the new operator for x64, ia32, arm,
arm64, mips, mips64, and x87. @v8-ppc-ports, can you please take care
of the ppc implementation?

R=titzer@chromium.org, v8-arm-ports@googlegroups.com, v8-mips-ports@googlegroups.com, weiliang.lin@intel.com

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

Cr-Commit-Position: refs/heads/master@{#33346}
2016-01-16 11:41:31 +00:00
adamk
dc6a593918 [ast cleanup] Remove unnecessary frozen_ bit from ModuleDescriptor
This may have made more sense in the old module design (where
"unification" was a thing), but as-is it's only used for a few
asserts in debug mode. These asserts don't make much sense inside
ModuleDescriptor; instead, as the modules implementation is fleshed
out, I expect the appropriate replacement asserts to show up at the
use of the ModuleDescriptor.

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

Cr-Commit-Position: refs/heads/master@{#33345}
2016-01-16 00:42:45 +00:00
adamk
25532be593 [modules] Support parsing anonymous default exports
This includes anonymous Function, Generator, and Class declarations when
preceded by 'export default'. Parsing only at the moment, nothing useful is
done with the parsed Function/ClassLiteral.

BUG=v8:1569
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33344}
2016-01-15 20:39:00 +00:00
mbrandy
b099e861ef PPC: Fix simulator.
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33343}
2016-01-15 20:24:01 +00:00
mbrandy
b2c246e0a9 PPC: [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple.
Port 84f8a506e2

Original commit message:
    Adds a ForInPrepare Runtime function which returns a triple of
    cache_type, cache_array and cache_length.

    This requires adding support to CEntryStub to call runtime functions
    which return a ObjectTriple - a struct containing three Object*
    pointers. Also did some cleanup of the x64 CEntryStub to avoid
    replicated code.

    Replaces the interpreter's use of the ad-hock InterpreterForInPrepare
    Runtime function with ForInPrepare in preparation for fixing deopt in
    BytecodeGraphBuilder for ForIn (which will be done in a followup CL).

R=rmcilroy@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33342}
2016-01-15 19:06:32 +00:00
mbrandy
bbb95fba40 PPC: [runtime] Throw exception for derived constructors in correct context.
Port c86f1897ac

Original commit message:
    When derived constructors return a non-object (or not undefined) we
    currently throw an exception directly in the callee context. This was
    achieved by desugaring the return statement for derived classes. To
    be spec compliamnt a separate ConstructStubForDerived is introduced.
    Instead of trowing directly, the desugared return statement inside
    a derived constructor only returns an integer to indicate an incompatible
    result.

R=cbruni@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:4509
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33341}
2016-01-15 19:05:24 +00:00
balazs.kilvady
316ef28676 MIPS: [runtime] Throw exception for derived constructors in correct context.
Port for https://codereview.chromium.org/1593553002/

Original commit message:
When derived constructors return a non-object (or not undefined) we
currently throw an exception directly in the callee context. This was
achieved by desugaring the return statement for derived classes. To
be spec compliamnt a separate ConstructStubForDerived is introduced.
Instead of trowing directly, the desugared return statement inside
a derived constructor only returns an integer to indicate an incompatible
result.

BUG=v8:4509
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33340}
2016-01-15 16:58:43 +00:00
mbrandy
39f709368e PPC: Fix CompatibleReceiverCheck.
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33339}
2016-01-15 16:52:41 +00:00
Michael Achenbach
b540f5a7bd Whitespace change to test swarming.
Cr-Commit-Position: refs/heads/master@{#33338}
2016-01-15 16:39:57 +00:00
rmcilroy
609e754193 [Interpreter] Skip test-heap/Regress538257 on Arm64 Ignition due to flake.
BUG=v8:4280
LOG=N
TBR=machenbach@chromium.org
NOTRY=TRUE

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

Cr-Commit-Position: refs/heads/master@{#33337}
2016-01-15 16:04:56 +00:00
cbruni
c86f1897ac [runtime] Throw exception for derived constructors in correct context.
When derived constructors return a non-object (or not undefined) we
currently throw an exception directly in the callee context. This was
achieved by desugaring the return statement for derived classes. To
be spec compliamnt a separate ConstructStubForDerived is introduced.
Instead of trowing directly, the desugared return statement inside
a derived constructor only returns an integer to indicate an incompatible
result.

BUG=v8:4509
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#33336}
2016-01-15 15:31:28 +00:00
mstarzinger
c55561643d [heap] Remove left-over object stats tracking declaration.
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33335}
2016-01-15 14:38:44 +00:00
rmcilroy
84f8a506e2 [Interpreter] Add ForInPrepare runtime function which returns a ObjectTriple.
Adds a ForInPrepare Runtime function which returns a triple of
cache_type, cache_array and cache_length.

This requires adding support to CEntryStub to call runtime functions
which return a ObjectTriple - a struct containing three Object*
pointers. Also did some cleanup of the x64 CEntryStub to avoid
replicated code.

Replaces the interpreter's use of the ad-hock InterpreterForInPrepare
Runtime function with ForInPrepare in preparation for fixing deopt in
BytecodeGraphBuilder for ForIn (which will be done in a followup CL).

MIPS port contributed by Balazs Kilvady <balazs.kilvady@imgtec.com>.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#33334}
2016-01-15 14:35:31 +00:00
hablich
80a648f557 Update V8 version after branch creation to 4.10
TBR=danno@chromium.org,machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#33333}
2016-01-15 14:21:50 +00:00