Commit Graph

24778 Commits

Author SHA1 Message Date
wingo
bb43d6c032 Fix parsing of arrow function formal parameters
Not all parenthesized AssignmentExpressions whose components are valid
binding patterns are valid arrow function formal parameters.  In
particular (a,b,c)() is not valid, and in general the existing code
wasn't catching the tail productions of ConditionalExpression,
BinaryExpression, PostfixExpression, LeftHandSideExpression,
and MemberExpression.

Thanks to Adrian Perez for the test case.

BUG=v8:4211
LOG=Y
R=rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30286}
2015-08-21 09:29:08 +00:00
yangguo
371ad73a50 Do not use js builtins object to determine whether a function is a builtin.
We can use the script type to determine that instead. Script of type
TYPE_NATIVE are considered builtins, TYPE_NORMAL are not. The only exception
to this rule is the empty function, for which the script is TYPE_NATIVE
(observable by the debugger), but should be stringified to "function () {}"
instead of "function () { [native code] }". For this, I introduce a
hide_source flag on the script object.

We also use IsBuiltin and IsSubjectToDebugging interchangeably. For debugger,
we now use the latter, hiding the detail that only non-builtins are debuggable.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30285}
2015-08-21 09:13:04 +00:00
mvstanton
cd35155918 VectorICs: New interface descriptor for vector transitioning stores.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30284}
2015-08-21 09:04:53 +00:00
yangguo
4c5efa9961 Introduce SharedFunctionInfo::Iterator and Script::Iterator.
R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30283}
2015-08-21 08:12:27 +00:00
mstarzinger
01579c6ebb Remove obsolete static methods from V8 class.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30282}
2015-08-21 07:41:33 +00:00
mlippautz
a56f537381 [heap] Cleanup and fix GC flags
GC flags are now part of the {Heap} and should be respected by all
sub-components.

Also add a infrastructure to write tests accessing private methods.

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

Cr-Commit-Position: refs/heads/master@{#30281}
2015-08-21 07:09:19 +00:00
yangguo
eaba98d97a Unify symbols sharing across native scripts and runtime.
We currently have several ways to share symbols that are used in
both native scripts and the runtime. This change unifies this.
We do not use the symbols registry since we don't need the
registry any longer after bootstrapping, but the registry stays
alive afterwards.

R=mlippautz@chromium.org, rossberg@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30280}
2015-08-21 06:44:35 +00:00
v8-autoroll
2e84d14274 Update V8 DEPS.
Rolling v8/tools/clang to 5439585778385813bc7711f3d6b7035b9eb78572

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30279}
2015-08-21 03:31:12 +00:00
yangguo
a683f83dec Fix bug in Code::VerifyRecompiledCode.
The code should do what the comment says :)

R=mstarzinger@chromium.org
BUG=chromium:522895
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30278}
2015-08-20 17:20:02 +00:00
mstarzinger
de57a6c060 [heap] Hide MemoryReducer inside the heap component.
This prevents leakage of the memory-reducer.h declarations inside of the
heap and prevents it from being exposed to the world. Protects private
state from being inadvertently mocked with.

R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30277}
2015-08-20 16:48:51 +00:00
mstarzinger
1a3c7e2fb1 [heap] Hide GCTracer inside the heap component.
This prevents leakage of the gc-tracer.h declarations inside of the
heap and prevents it from being exposed to the world. Protects private
state from being inadvertently mocked with.

R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30276}
2015-08-20 15:48:12 +00:00
hpayer
267381d978 Don't filter store buffer after sweeping.
Additionally, this CL moves a bit of code around to free up more memory before compaction starts.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30275}
2015-08-20 15:33:20 +00:00
mvstanton
e31695f907 Simplify KeyedAccessStoreMode.
The map tells us the source elements kind, and holeyness.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30274}
2015-08-20 14:40:26 +00:00
hpayer
a4bcd81aed Large objects do not require special handling anymore when they are freed.
Invalid slots in large objects can only occur when large objects became dead. These slots are filtered out already after marking.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30273}
2015-08-20 14:21:58 +00:00
mstarzinger
05e843443a [heap] Move {hidden_string} into the root list.
R=hpayer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30272}
2015-08-20 14:08:46 +00:00
cbruni
6d67f7db37 Revert of Moving ArraySplice Builtin to ElementsAccessor (patchset #6 id:100001 of https://codereview.chromium.org/1293683005/ )
Reason for revert:
failing bot http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/builds/3827

Original issue's description:
> - remove the Backing-Store speficic code from builtins.cc and put it in elements.cc.
> - adding tests to improve coverage of the splice method
>
> BUG=
>
> Committed: https://crrev.com/8533d4b5433d3a9e9fb1015f206997bd6d869fe3
> Cr-Commit-Position: refs/heads/master@{#30269}

TBR=mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30271}
2015-08-20 13:51:15 +00:00
mstarzinger
8a8867d341 Make snapshot.h usable without objects-inl.h header.
This CL us a pure refactoring that makes an empty compilation unit
including just "snapshot.h" but not "objects-inl.h" compile without
warnings or errors. This is needed to further reduce the header
dependency tangle.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30270}
2015-08-20 13:06:06 +00:00
cbruni
8533d4b543 - remove the Backing-Store speficic code from builtins.cc and put it in elements.cc.
- adding tests to improve coverage of the splice method

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30269}
2015-08-20 12:55:05 +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
mlippautz
f8874287db [heap] Remove unflattened_string_length
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30267}
2015-08-20 10:00:32 +00:00
yangguo
38ef0e94bf Add deserialized scripts to script list.
TBR=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30266}
2015-08-20 09:26:35 +00:00
mstarzinger
95845ad421 Turn v8.h into a normal header.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30265}
2015-08-20 09:24:39 +00:00
yangguo
3ead18974d Keep track of script objects in a weak fixed array.
We need this for the debugger and for future changes that need to
find all shared function infos (through scripts).

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30264}
2015-08-20 08:04:53 +00:00
mstarzinger
98a0fe0f32 Remove grab-bag includes of v8.h from everywhere.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30263}
2015-08-20 07:44:15 +00:00
sbonda
434a291a0a Make FlushICache NOP for Nvidia Denver 1.0 only
FlushICache should be NOP for Denver with part numbers 0x0, 0x1 and 0x2 only.
Instruction cache needs to flushed for future versions of denver.

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

Cr-Commit-Position: refs/heads/master@{#30262}
2015-08-20 04:44:48 +00:00
v8-autoroll
06f75cc429 Update V8 DEPS.
Rolling v8/third_party/android_tools to 4238a28593b7e6178c95431f91ca8c24e45fa7eb

Rolling v8/tools/clang to 1c7f9147c834d78b36787f31ecfc5c47f3c98da8

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30261}
2015-08-20 03:22:51 +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
adamk
de26ce051f [api] Relax CHECK for ArrayBuffer API abuse
Zero-length ArrayBuffers are allowed to have NULL backing stores.

BUG=522496
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30259}
2015-08-19 21:53:17 +00:00
Ben Smith
14495ba64a Re-enable regress-crbug-501711 and regress-4279 for --isolates tests
BUG=v8:4378
TBR=yangguo@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30258}
2015-08-19 20:59:59 +00:00
Ben Smith
7d706b6b74 Remove regress-crbug-518748. It's too hard to make this non-flaky
BUG=chromium:518748
R=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30257}
2015-08-19 18:58:20 +00:00
Ben Smith
8f441181a5 Disable regress-crbug-518748. It is failing/flaking on many bots
BUG=chromium:518748
TBR=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30256}
2015-08-19 17:48:49 +00:00
Michael Starzinger
95694f00a7 [heap] Fix compilation of LargeObjectSpace on Windows.
R=thakis@chromium.org, titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30255}
2015-08-19 17:39:30 +00:00
titzer
ac3e24c96f Rename ParserInfo::function() and CompilationInfo::function() to literal().
R=rossberg@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30254}
2015-08-19 16:51:51 +00:00
mstarzinger
373c0b511a [heap] Remove obsolete Heap::sweep_generation field.
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30253}
2015-08-19 16:09:55 +00:00
mlippautz
20ab9b1259 [heap] Fix comment in tracer.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30252}
2015-08-19 15:38:54 +00:00
yangguo
147299b9fd Do not compact weak fixed array when re-allocating new backing store.
JSObject::UnregisterPrototypeUser relies on the index of the weak
fixed array entry not to change.

See commit 1e65e2018.

There is no bug currently, because we would only re-allocate if there is no empty slot left. In which case there is no actual compaction going on during re-allocation.

R=jkummerow@chromium.org, mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30251}
2015-08-19 14:29:50 +00:00
mvstanton
fe432e1ace Cleanup: Remove unncessary leave_frame parameter from stub cache.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30250}
2015-08-19 13:51:29 +00:00
jarin
bb869374fe Fix variable decl register collision on ARM.
BUG=chromium:455207
LOG=n
R=ulan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30249}
2015-08-19 12:50:14 +00:00
yangguo
d0225c832d Native context: install JS builtins via container object.
Instead of installing them on the JS builtins object and later
grab them from there.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30248}
2015-08-19 12:49:08 +00:00
mstarzinger
4adb8dcae4 Realize IWYU pattern for fdlibm.cc file.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30247}
2015-08-19 12:47:59 +00:00
yangguo
55a2f5a50a Native context: do not hold onto helper functions on the utils object.
This is to avoid holding onto the function context of prologue.js.

R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30246}
2015-08-19 11:30:28 +00:00
yangguo
22cf0b5919 Ignore test failure for mjsunit/for-in-opt in gc stress.
TBR=hablich@chromium.org
BUG=v8:4381

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

Cr-Commit-Position: refs/heads/master@{#30245}
2015-08-19 10:03:50 +00:00
yangguo
eb8c092822 Native context: debug.js does not load from js builtins object anymore.
This mainly changes how we share ToBoolean, ToNumber and ToString between
native scripts. Instead of putting them on the js builtins object, we now
explicitly export and import those functions.

I also had to change the import/export mechanism slightly. Previously,
exports and imports are hooked up after all native scripts have been
executed. This means that imported functions cannot be called at the time
the native script is executed.

However, since ToBoolean (and also e.g. ObjectDefineProperties) is called
in v8natives.js, I changed the mechanism so that exports from previous
native scripts (runtime.js for ToBoolean) is imported immediately and can
be called.

R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30244}
2015-08-19 08:34:34 +00:00
jkummerow
7fc7957be5 [API] Check for NULL external data pointer in ArrayBuffer::New()
Embedders must not provide invalid pointers for external backing stores.

BUG=chromium:522128
LOG=n
R=cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30243}
2015-08-19 06:30:58 +00:00
v8-autoroll
9fc29357f6 Update V8 DEPS.
Rolling v8/third_party/android_tools to 9e9b6169a098bc19986e44fbbf65e4c29031e4bd

TBR=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30242}
2015-08-19 03:24:21 +00:00
chunyang.dai
b46f0e9f46 X87: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values.
port f4c079d450 (r30107).

original commit message:

    There's no need to have one InstanceType per SIMD primitive type (this
    will not scale long-term).  Also reduce the amount of code duplication
    and make it more robust wrt adding new SIMD types.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30241}
2015-08-19 03:18:55 +00:00
ejcaruso
df999c9790 Only evaluate length once in %TypedArray%.prototype.set
The ES6 spec for this function declares that ToLength
should only be called once. We were evaluating it multiple
times, so if length was an object with a valueOf method,
we could see effects take place multiple times.

R=littledan@chromium.org
LOG=N
BUG=v8:4218

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

Cr-Commit-Position: refs/heads/master@{#30240}
2015-08-19 01:33:06 +00:00
bbudge
f33d5717eb [simd.js] Macro-ize more SIMD code.
Use macros for SIMD get/set_lane, and print fns.

LOG=N
BUG=v8:4124

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

Cr-Commit-Position: refs/heads/master@{#30239}
2015-08-18 20:39:55 +00:00
Ben Smith
f644b71e75 Disable regress-crbug-518748 on ARM
BUG=chromium:518748
TBR=mstarzinger@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30238}
2015-08-18 18:55:58 +00:00
Ben L. Titzer
86439b3ae3 [test] Silence array bounds warning. GCC, I think you are wrong in this case.
TBR=mstarzinger@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30237}
2015-08-18 18:51:34 +00:00