Commit Graph

36361 Commits

Author SHA1 Message Date
littledan
53fdf9d192 Use a different map to distinguish eval contexts
eval() may introduce a scope which needs to be represented as a context at
runtime, e.g.,

  eval('var x; let y; ()=>y')

introduces a variable y which needs to have a context allocated for it. However,
when traversing upwards to find the declaration context for a variable which leaks,
as the declaration of x does above, this context has to be understood to not be
a declaration context in sloppy mode.

This patch makes that distinction by introducing a different map for eval-introduced
contexts. A dynamic search for the appropriate context will continue past an eval
context to find the appropriate context. Marking contexts as eval contexts rather
than function contexts required updates in each compiler backend.

BUG=v8:5295, chromium:648719

Review-Url: https://codereview.chromium.org/2435023002
Cr-Commit-Position: refs/heads/master@{#41869}
2016-12-20 16:23:19 +00:00
bmeurer
3d9c77d812 [es6] Fix the %TypedArray% constructor.
The %TypedArray% constructor must not ever try to construct an instance,
but rather throw a TypeError instead.

R=jarin@chromium.org
BUG=v8:5763

Review-Url: https://codereview.chromium.org/2587413002
Cr-Commit-Position: refs/heads/master@{#41868}
2016-12-20 16:14:08 +00:00
littledan
b88d96c73a [intl] Remove new.target check in Intl functions and method
The Intl implementation included manual checks to see if they were
being called as a constructor. However, these checks are redundant,
as %FunctionRemovePrototype has already marked the functions as
un-constructable. This path removes the unnecessary checks.

R=yangguo

Review-Url: https://codereview.chromium.org/2587713002
Cr-Commit-Position: refs/heads/master@{#41867}
2016-12-20 16:06:19 +00:00
titzer
6e8338865a [wasm] Implement correct 2-level namespace for imports.
R=clemensh@chromium.org
CC=rossberg@chromium.org
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2591753002
Cr-Commit-Position: refs/heads/master@{#41866}
2016-12-20 15:32:56 +00:00
jochen
a1c917ca58 Update heap constants
R=ishell@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2590923002
Cr-Commit-Position: refs/heads/master@{#41865}
2016-12-20 15:26:08 +00:00
jyan
2d7f1c2c55 s390: clean up RR/RRE/RRD/RIL format in Assembler
R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2589063002
Cr-Commit-Position: refs/heads/master@{#41864}
2016-12-20 15:03:49 +00:00
titzer
058f188715 [wasm] Only SNPrintF the function index if a name was not supplied.
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2590833002
Cr-Commit-Position: refs/heads/master@{#41863}
2016-12-20 14:36:05 +00:00
clemensh
081ac37048 [wasm] Introduce WasmSharedModuleData and refactor other objects
The new object will hold information which is shared by all clones of a
WasmCompiledModule, e.g. the decoded asm.js offset table, and in the
future also breakpoints. From there, we can set them on each new
instantiation of any clone.

While already changing lots of the code base, I also renamed all
getters from "get_foo" to "foo", to conform to the style guide.

R=titzer@chromium.org, yangguo@chromium.org
BUG=v8:5732

Review-Url: https://codereview.chromium.org/2591653002
Cr-Commit-Position: refs/heads/master@{#41862}
2016-12-20 14:34:07 +00:00
marja
a48e5ab880 objects.h splitting: Split out ScopeInfo + add necessary structures.
See tracking bug for more information.

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2594663002
Cr-Commit-Position: refs/heads/master@{#41861}
2016-12-20 14:08:21 +00:00
jgruber
9feefafa66 [js-perf-test] Add a basic async-await microbenchmark
These benchmarks are intended to compare the overhead of async-await vs.
a naive promise implementation vs. the babel async-await transformation.
The functions in the benchmark don't do any work themselves, so results
should reflect only overhead of the chosen implementation.

Current numbers on my local machine (higher is better):

BaselineES2017-AsyncAwait(Score): 2006
BaselineNaivePromises-AsyncAwait(Score): 7470
Native-AsyncAwait(Score): 3640

BUG=v8:5639

Review-Url: https://codereview.chromium.org/2577393002
Cr-Commit-Position: refs/heads/master@{#41860}
2016-12-20 13:10:07 +00:00
bbudge
e54e2dd916 [ARM] Add fp version of vceq to assembler, disassembler, and simulator.
LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2593443002
Cr-Commit-Position: refs/heads/master@{#41859}
2016-12-20 13:06:58 +00:00
cbruni
c1402cbde3 [builtins] Fix String.prototype.indexOf with negative positions
BUG=chromium:674889

Review-Url: https://codereview.chromium.org/2593593002
Cr-Commit-Position: refs/heads/master@{#41858}
2016-12-20 12:40:57 +00:00
tebbi
fd4812323f [turbofan] reenable escape analysis to further investigate crashes
R=jarin@chromium.org

BUG=chromium:669242

Review-Url: https://codereview.chromium.org/2589163002
Cr-Commit-Position: refs/heads/master@{#41857}
2016-12-20 12:33:17 +00:00
cbruni
1e56813f48 [runtime] Add fast-paths for common conversion methods
Add inlineable fast-paths for Object::ToPropertyKey, Object::ToLength and
Object::ToIndex for the most common argument types.

BUG=

Review-Url: https://codereview.chromium.org/2587013002
Cr-Commit-Position: refs/heads/master@{#41856}
2016-12-20 12:21:00 +00:00
yangguo
28432588c2 [api] add API for Promise status and result.
Currently, to find out a Promise's status and result, one has to use the
debug context. This is for example done in Node.js. This new API is a
better replacement, also in the context of the debug context being
deprecated eventually.

R=franzih@chromium.org, gsathya@chromium.org, jochen@chromium.org
BUG=v8:5764

Review-Url: https://codereview.chromium.org/2589113002
Cr-Commit-Position: refs/heads/master@{#41855}
2016-12-20 12:13:29 +00:00
jochen
55c88e586b Disable API call inline in TF when gather runtime stats
BUG=none
R=epertoso@chromium.org,mvstanton@chromium.org,cbruni@chromium.org

Review-Url: https://codereview.chromium.org/2588363002
Cr-Commit-Position: refs/heads/master@{#41854}
2016-12-20 12:10:49 +00:00
clemensh
fb43021511 [wasm] Cleanup unneeded casts to WasmInstanceObject
Plus another minor refactoring.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2590563002
Cr-Commit-Position: refs/heads/master@{#41853}
2016-12-20 11:49:20 +00:00
leszeks
73afbaa8c1 [tests] Fix test-api for non-optimizing ignition-staging runs
BUG=v8:5762

Review-Url: https://codereview.chromium.org/2590843002
Cr-Commit-Position: refs/heads/master@{#41852}
2016-12-20 11:47:31 +00:00
clemensh
6361f133ab [wasm] Add iterators for opcodes or offsets of one function
We have the BytecodeIterator with next() and has_next() methods, and
pc_offset() and current() accessors.
This CL adds an interface to iterate over the opcodes or offsets in a
C++ foreach loop.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2587143002
Cr-Commit-Position: refs/heads/master@{#41851}
2016-12-20 11:28:44 +00:00
titzer
e797e0ea6d [wasm] Add test for reexport of the same import twice.
R=clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2592563003
Cr-Commit-Position: refs/heads/master@{#41850}
2016-12-20 10:43:54 +00:00
titzer
cbd3b3d0fe Implement header size calculation for array iterators.
R=bmeurer@chromium.org
BUG=chromium:674232

Review-Url: https://codereview.chromium.org/2592633002
Cr-Commit-Position: refs/heads/master@{#41849}
2016-12-20 10:38:17 +00:00
tebbi
abd63018d7 [turbofan] fixed escape analysis bug: missing copy of virtual state
R=jarin@chromium.org

BUG=chromium:673243

Review-Url: https://codereview.chromium.org/2578133002
Cr-Commit-Position: refs/heads/master@{#41848}
2016-12-20 10:30:52 +00:00
clemensh
3bede2f79d [compiler] Emit source position also for the control input
Before, source position information was only emitted for nodes
contained in a block, which excluded calls that terminate a block.

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

Review-Url: https://codereview.chromium.org/2586123003
Cr-Commit-Position: refs/heads/master@{#41847}
2016-12-20 10:20:04 +00:00
ishell
faf80b4ec0 [crankshaft] Ensure that we use inlined Array.prototype.shift only when there's no elements in the prototype chain.
BUG=chromium:663340

Review-Url: https://codereview.chromium.org/2593553002
Cr-Commit-Position: refs/heads/master@{#41846}
2016-12-20 10:18:02 +00:00
cbruni
608df93382 Revert of [runtime] Add fast-paths for common conversion methods (patchset #1 id:1 of https://codereview.chromium.org/2587013002/ )
Reason for revert:
breaks mips port: http://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/6131

Original issue's description:
> [runtime] Add fast-paths for common conversion methods
>
> Add inlineable fast-paths for Object::ToPropertyKey, Object::ToLength and
> Object::ToIndex for the most common argument types.
>
> BUG=
>
> Review-Url: https://codereview.chromium.org/2587013002
> Cr-Commit-Position: refs/heads/master@{#41839}
> Committed: d173807b9d

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

Review-Url: https://codereview.chromium.org/2587373002
Cr-Commit-Position: refs/heads/master@{#41845}
2016-12-20 10:14:23 +00:00
machenbach
5173b0fb78 [foozzie] Add sources metadata to failure output.
BUG=chromium:673246
NOTRY=true

Review-Url: https://codereview.chromium.org/2589683003
Cr-Commit-Position: refs/heads/master@{#41844}
2016-12-20 10:09:23 +00:00
clemensh
623300a6d8 [assembler] Introduce assembler-inl.h
This moves the platform-specific distinction to one place, and allows
to just include assembler-inl.h instead of macro-assembler.h to get the
correct inline functions defined in assembler.h (e.g.
RelocInfo::set_target_address).

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

Review-Url: https://codereview.chromium.org/2587113002
Cr-Commit-Position: refs/heads/master@{#41843}
2016-12-20 10:07:45 +00:00
ishell
576a46f520 [crankshaft] Properly handle OOB string accesses.
BUG=chromium:665793

Review-Url: https://codereview.chromium.org/2589823003
Cr-Commit-Position: refs/heads/master@{#41842}
2016-12-20 10:01:59 +00:00
mlippautz
119db080c5 [heap] Fix unittest compilation on mips
BUG=
TBR=hpayer@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2587363002
Cr-Commit-Position: refs/heads/master@{#41841}
2016-12-20 09:56:39 +00:00
hpayer
fc423493e5 [heap] Turn on black allocation.
BUG=

Review-Url: https://codereview.chromium.org/2590133002
Cr-Commit-Position: refs/heads/master@{#41840}
2016-12-20 09:52:26 +00:00
cbruni
d173807b9d [runtime] Add fast-paths for common conversion methods
Add inlineable fast-paths for Object::ToPropertyKey, Object::ToLength and
Object::ToIndex for the most common argument types.

BUG=

Review-Url: https://codereview.chromium.org/2587013002
Cr-Commit-Position: refs/heads/master@{#41839}
2016-12-20 09:50:30 +00:00
hpayer
44b70cb744 [heap] Do not clear mark bits of black large objects on right trim.
BUG=

Review-Url: https://codereview.chromium.org/2592603002
Cr-Commit-Position: refs/heads/master@{#41838}
2016-12-20 09:36:51 +00:00
mlippautz
17318bbd39 [heap] Create a thin wrapper around wrapper tracing in V8 to avoid misuse
BUG=chromium:468240

Review-Url: https://codereview.chromium.org/2576453002
Cr-Commit-Position: refs/heads/master@{#41837}
2016-12-20 09:35:05 +00:00
machenbach
7e8bd39a49 [foozzie] Add some system tests.
BUG=chromium:673246
NOTRY=true

Review-Url: https://codereview.chromium.org/2585193003
Cr-Commit-Position: refs/heads/master@{#41836}
2016-12-20 09:33:55 +00:00
machenbach
f6d8ec4fca Revert of Turn on icu_case_mapping by default (patchset #3 id:40001 of https://codereview.chromium.org/2588963002/ )
Reason for revert:
Causes gc stress failures:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20GC%20Stress%20-%20custom%20snapshot/builds/9920

Original issue's description:
> Turn on icu_case_mapping by default
>
> BUG=v8:4477, v8:4476
> TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*,
>      mjsunit/string-case, intl/general/case*
>
> Review-Url: https://codereview.chromium.org/2588963002
> Cr-Commit-Position: refs/heads/master@{#41834}
> Committed: 7c79e23c34

TBR=littledan@chromium.org,yangguo@chromium.org,jshin@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4477, v8:4476

Review-Url: https://codereview.chromium.org/2593543002
Cr-Commit-Position: refs/heads/master@{#41835}
2016-12-20 09:28:35 +00:00
jshin
7c79e23c34 Turn on icu_case_mapping by default
BUG=v8:4477, v8:4476
TEST=test262/{built-ins,intl402}/Strings/*, webkit/fast/js/*,
     mjsunit/string-case, intl/general/case*

Review-Url: https://codereview.chromium.org/2588963002
Cr-Commit-Position: refs/heads/master@{#41834}
2016-12-20 09:00:50 +00:00
leszeks
0a5bffe24d [turbofan] Do not set node's mark to min on get
This simplifies the mark getter enough to generate a branch-free check
on many architectures (e.g. using cmov on x64 or csel on ARM).

As a drive-by, we can now make the mark access const.

Review-Url: https://codereview.chromium.org/2583043004
Cr-Commit-Position: refs/heads/master@{#41833}
2016-12-20 08:52:54 +00:00
yangguo
a141898108 [debugger] sunset --expose-debug-as flag.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2589083002
Cr-Commit-Position: refs/heads/master@{#41832}
2016-12-20 07:45:48 +00:00
v8-autoroll
fc209dc6cb Update V8 DEPS.
Rolling v8/build: 29ac3ae..53a8a4b

Rolling v8/third_party/catapult: 4fc1816..70f42a7

Rolling v8/tools/clang: fe25d46..fcefe9f

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

Review-Url: https://codereview.chromium.org/2589043002
Cr-Commit-Position: refs/heads/master@{#41831}
2016-12-20 04:25:51 +00:00
alph
f2281ac7cd Revert of [profiler] Add extra CHECK to track down crbug.com/665398 (patchset #1 id:1 of https://codereview.chromium.org/2556833003/ )
Reason for revert:
Not needed anymore. The bug is fixed.

Original issue's description:
> [profiler] Add extra CHECK to track down crbug.com/665398
>
> BUG=chromium:665398
>
> Committed: https://crrev.com/dfc0bb63a1bc115d39f29cfc338aed5676578c4b
> Cr-Commit-Position: refs/heads/master@{#41545}

TBR=yangguo@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=chromium:665398

Review-Url: https://codereview.chromium.org/2588973003
Cr-Commit-Position: refs/heads/master@{#41830}
2016-12-20 02:28:39 +00:00
sampsong
787f1596b6 S390: Change LoadP to LoadB for TestIfSmi
R=jyan@ca.ibm.com, joransiu@ca.ibm.com,

BUG=

Review-Url: https://codereview.chromium.org/2588163002
Cr-Commit-Position: refs/heads/master@{#41829}
2016-12-19 22:25:54 +00:00
bbudge
0625a686b5 [Turbofan] Add native ARM support for basic SIMD 32x4 operations.
- Adds Float32x4 ExtractLane, ReplaceLane, Splat, Add, Sub,
and conversions to Int32x4 and Uint32x4.
- Adds Int32x4 ExtractLane, ReplaceLane, Splat, Add, Sub and
conversions to Float32x4 (int and unsigned int).
- Adds Int32x4 CompareEqual, CompareNotEqual.
- Adds S32x4 Select.
- Adds tests for all new SIMD operations.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2584863002
Cr-Commit-Position: refs/heads/master@{#41828}
2016-12-19 22:23:03 +00:00
gsathya
cc7e0b0eff [promises] Port CreateResolvingFunctions to TF
2% improvement on benchmarks over 5 runs.

BUG=v8:5343

Review-Url: https://codereview.chromium.org/2567033003
Cr-Commit-Position: refs/heads/master@{#41827}
2016-12-19 22:21:35 +00:00
littledan
48a36c7df7 [intl] Avoid modifying options bag from constructor
Previously, the Intl.DateTimeFormat constructor and other related paths had
a bug where the options bag passed in would be modified in place. This patch
makes V8's Intl implementation follow the specification's logic to avoid
such a modification.

BUG=v8:4219

Review-Url: https://codereview.chromium.org/2587703002
Cr-Commit-Position: refs/heads/master@{#41826}
2016-12-19 21:36:16 +00:00
littledan
6cc91d6a13 [parser] Harden DCHECK into CHECK in parser
A DCHECK is guarding something which has previously been a memory
integrity issue. It should be cheap to run. This patch makes it
into a CHECK.

BUG=chromium:658267

Review-Url: https://codereview.chromium.org/2584223002
Cr-Commit-Position: refs/heads/master@{#41825}
2016-12-19 21:25:52 +00:00
sampsong
8c6ace9884 Use TM instead of TMLL in case of memory operand.
R=jyan@ca.ibm.com, joransiu@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2582973002
Cr-Commit-Position: refs/heads/master@{#41824}
2016-12-19 20:32:37 +00:00
bjaideep
35bf403f0d PPC: Use optimal seq for atomic load/store
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Review-Url: https://codereview.chromium.org/2590543003
Cr-Commit-Position: refs/heads/master@{#41823}
2016-12-19 20:20:04 +00:00
clemensh
5cbc4a9674 [wasm] Freeze exports object
We were not conforming to the spec before.

R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2587913005
Cr-Commit-Position: refs/heads/master@{#41822}
2016-12-19 18:45:07 +00:00
jshin
af38272dd9 Optimize case conversion with icu_case_mapping
Use FastAsciiConvert (as used by Unibrow) for i18n-aware
case conversion with --icu_case_mapping.

Move FastAsciiConvert to src/string-case.cc so that it can be used
by both runtime-{string,i18n}.

Add more tests.

BUG=v8:4477,v8:4476
TEST=intl/general/case*

Review-Url: https://codereview.chromium.org/2533983006
Cr-Commit-Position: refs/heads/master@{#41821}
2016-12-19 18:43:55 +00:00
jyan
4c640be19b s390: cleanup s390 opcode table
Cleanup s390 opcode table and add z13 new opcodes

R=joransiu@ca.ibm.com, bjaideep@ca.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2586503003
Cr-Commit-Position: refs/heads/master@{#41820}
2016-12-19 18:42:43 +00:00