Commit Graph

29121 Commits

Author SHA1 Message Date
verwaest
2608ecc715 Speed up the LookupIterator
This introduces a new instance type and reorders the JSObject types so any type requiring special LookupIterator support can be identified with a single range check.

In addition, it restructures the Next for better performance, avoiding unnecessary calls.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34429}
2016-03-02 13:49:11 +00:00
machenbach
76876b9ae9 [test] Remove dependent commands.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34428}
2016-03-02 13:14:13 +00:00
mstarzinger
9fd5261d7f [interpreter] Make optimized code map more flexible.
This relaxes the constraints of the optimized code map in order to be
able to update existing entries. It also simplifies the interface a
little bit. We can now insert an entry for a newly allocated literals
array together with previously cached context-independent code.

R=mvstanton@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34427}
2016-03-02 12:36:00 +00:00
bmeurer
ca6d0b1eb1 [compiler] Introduce proper StrictNotEqualStub.
Generalize the code that we have for StrictEqualStub to also general a
StrictNotEqualStub and hook that up with TurboFan and Ignition. It's
still falling back to the runtime for every String (in)equality check.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34426}
2016-03-02 12:35:59 +00:00
cbruni
94f0abf98a reland [js-perf-test] Adding micro benchmarks for for-in and keys patterns.
In order to track certain critical code-patters we will start adding
micro-benchmarks that reflect common requests on http://jsperf.com.
In this first CL a number of property enumeration methods are added,
in the hope to get a clearer picture on future regressions.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34425}
2016-03-02 12:25:41 +00:00
epertoso
820e27f98d [turbofan] Adds an Allocate macro to the CodeStubAssembler.
The macro is currently used by AllocateHeapNumberStub and AllocateMutableHeapNumberStub, which are now turbofan code stubs.
It can be used to allocate objects in the new or old space, optionally with double alignment.

BUG=588692
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34424}
2016-03-02 12:16:48 +00:00
bmeurer
4acb492e14 [compiler] Introduce initial StrictEqualStub.
Initial version of a new StrictEqualStub written as TurboFan code stub,
that implements the full strict equality comparison and is usable for
both TurboFan and Ignition (and soon for the generic CompareIC case
too). The stub is not fully optimized yet, i.e. we still go to the
runtime for string comparisons, but that'll be addressed in a follow-up
CL.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34423}
2016-03-02 11:47:49 +00:00
yangguo
44e9622aea [debugger] Ensure at least one breakable position per function.
The function literal consists of a list of statements. Each statement
is associated with a statement position including break location. The
only exception to this rule is when the function immediately throws if
scope resolution found an illegal redeclaration. Make sure that we add a
break location for this case as well. The debugger relies on this.

R=bmeurer@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34422}
2016-03-02 10:31:59 +00:00
jochen
7b40af9701 Explicitly state that the Chromium Code of Conduct also applies to V8
R=danno@chromium.org,rschoen@chromium.org,seththompson@chromium.org
BUG=
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34421}
2016-03-02 09:51:24 +00:00
zhengxing.li
11162a48d3 X87: [Interpreter] Fixes PushArgsAndConstruct builtin to not store any data outside esp.
port dbf5fffd2d (r34397)

  original commit message:
  In ia32 PushArgsAndConstruct builtin, we run out of registers and need to
  temporarily store the data in the stack. In the earlier implementation,
  a location outside the esp was used. This causes a problem if there is a
  interrupt/signals which would use the same stack and corrupt the data that
  is above the esp. This cl fixes it by pushing it onto the stack so that
  the stack pointer is updated and hence the corruption will not happen. We
  reuse the slot meant for receiver as a temporary store.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34420}
2016-03-02 08:46:39 +00:00
machenbach
5f8c2b1f1d Revert of [api] Don't go to javascript to construct API functions (patchset #3 id:40001 of https://codereview.chromium.org/1756433002/ )
Reason for revert:
[Sheriff] Breaks webkit unittests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/5043

Original issue's description:
> [api] Don't go to javascript to construct API functions
>
> BUG=
> R=bmeurer@chromium.org,verwaest@chromium.org
>
> Committed: https://crrev.com/21a5bfbd2ced6e4a3545bbde712630c0d8734c0b
> Cr-Commit-Position: refs/heads/master@{#34411}

TBR=bmeurer@chromium.org,verwaest@chromium.org,jochen@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/1758623002

Cr-Commit-Position: refs/heads/master@{#34419}
2016-03-02 07:36:24 +00:00
v8-autoroll
a3bd39e715 Update V8 DEPS.
Rolling v8/tools/clang to a8288b3f25cdc4e3c3f4dd7ea2f7765ae8847459

Rolling v8/tools/swarming_client to df6e95e7669883c8fe9ef956c69a544154701a49

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

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

Cr-Commit-Position: refs/heads/master@{#34418}
2016-03-02 04:23:51 +00:00
sergeyv
294d17a7d8 Devtools: expose scopes source location to debugger
blink-side cl: https://codereview.chromium.org/1653053002/

BUG=327092
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34417}
2016-03-02 02:20:05 +00:00
rmcilroy
d58201589b [Interpreter] Log source positions for bytecode arrays.
Add support to log source position offsets to the profiler. As part of
this change PositionsRecorder is split into two, with the subset needed
by log.cc moved into log.h and the remainder kept in assembler.h as
AssemblerPositionsRecorder. The interpreter's source position table
builder is updated to log positions when the profiler is active.

BUG=v8:4766
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34416}
2016-03-02 02:10:53 +00:00
bradnelson
cb028ac0e4 Adding Wasm + Wasm-asm variant fuzzer.
Fixing a memory leak in CompileAndRunModule.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=wasm-fuzzer
R=jochen@chromium.org,jarin@chromium.org,kcc@chromium.org,machenbach@chromium.org,titzer@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34415}
2016-03-02 00:54:08 +00:00
titzer
657538dee3 [wasm] Add support for 64-bit LEB encodings.
This is a reland of: http://crrev.com/1746063003

R=binji@chromium.org,ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34414}
2016-03-01 23:39:03 +00:00
binji
b9aa3ce764 CodeStubAssembler can generate code for builtins
This will be used for generating the Atomics builtins.

BUG=v8:4614
R=jarin@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34413}
2016-03-01 22:05:34 +00:00
fmeawad
f3fcdcfa1a [Tracing] Remove deprecated AddTraceEvent
This should land after the chromium CL that starts using the new AddTraceEvent lands
(https://codereview.chromium.org/1742603004/)

BUG=4565
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34412}
2016-03-01 21:20:48 +00:00
jochen
21a5bfbd2c [api] Don't go to javascript to construct API functions
BUG=
R=bmeurer@chromium.org,verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34411}
2016-03-01 20:58:44 +00:00
oth
49587f68b5 [interpreter] Update test262.status.
Marks additional generator tests as failing.

BUG=V8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34410}
2016-03-01 20:51:07 +00:00
yangguo
e4fcb3484f [interpreter, debugger] Update mjsunit test expectations.
R=vogelheim@chromium.org
BUG=v8:4690,v8:4765
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34409}
2016-03-01 20:33:26 +00:00
yangguo
21574d9966 Fix license header for src/snapshot/deserializer.h
TBR=machenbach@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#34408}
2016-03-01 20:12:33 +00:00
machenbach
0fbc4f4459 Revert of [wasm] Add support for 64-bit LEB encodings. (patchset #6 id:100001 of https://codereview.chromium.org/1746063003/ )
Reason for revert:
[Sheriff] Seems to break chromium win compile:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Win/builds/3800/steps/compile/logs/stdio

Original issue's description:
> [wasm] Add support for 64-bit LEB encodings.
>
> R=binji@chromium.org,ahaas@chromium.org
> BUG=
>
> Committed: https://crrev.com/616f05496e9867cfa934098a76826cfde7feeaa2
> Cr-Commit-Position: refs/heads/master@{#34406}

TBR=ahaas@chromium.org,binji@chromium.org,titzer@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/1749343002

Cr-Commit-Position: refs/heads/master@{#34407}
2016-03-01 19:56:45 +00:00
titzer
616f05496e [wasm] Add support for 64-bit LEB encodings.
R=binji@chromium.org,ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34406}
2016-03-01 19:36:57 +00:00
verwaest
8016a2d53f [crankshaft] Inline hasOwnProperty when used in fast-case for-in
e.g.,

for (var k in o) {
  if (!o.hasOwnProperty(k)) continue;
  ...
}

without enumerable properties on the prototype chain of o.

BUG=

Committed: https://crrev.com/dec80752eb344dfeb85588e61ac0afd22b11aadb
Cr-Commit-Position: refs/heads/master@{#34379}

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

Cr-Commit-Position: refs/heads/master@{#34405}
2016-03-01 18:18:03 +00:00
bradnelson
2a9a770c2a Convert float64 to float32 when coerced with a heapf32 assignment.
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=titzer@chromium.org,aseemgarg@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34404}
2016-03-01 18:07:19 +00:00
oth
318a09ea59 [interpreter] Unbreak test262 tests using constants.
Fixes a bug in the constant pool padding calculation.

BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34403}
2016-03-01 18:05:40 +00:00
jochen
adfea6af9f [api] Use shallow copy for the template instantiation cache
This means we can't cache templates that have object properties. Disable
caching for those.

BUG=
R=verwaest@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34402}
2016-03-01 17:54:54 +00:00
littledan
78d845308f Make RUNTIME_ASSERT have more useful output in debug mode
Runtime asserts are were previously a bit annoying to debug, due to
the lack of a useful error message, even in debug mode. This patch
prints out some more information in debug mode for runtime assert
failures while preserving their exception-throwing semantics. While
we're at it, it requires a semicolon after RUNTIME_ASSERT macro
invocations.

```
$ rlwrap out/Debug/d8 --allow-natives-syntax
V8 version 5.1.0 (candidate)
d8> %ArrayBufferNeuter(1)

#
# Runtime error in ../../src/runtime/runtime-typedarray.cc, line 52
#
# args[0]->IsJSArrayBuffer()

==== C stack trace ===============================

 1: 0xf70ab5
 2: 0xadeebf
 3: 0xadedd4
 4: 0x2ef17630693b
(d8):1: illegal access
%ArrayBufferNeuter(1)
^

d8>
```

Also give the other 'illegal access' case (a special SyntaxError type) a more
descriptive error message for its sole usage.

R=adamk

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

Cr-Commit-Position: refs/heads/master@{#34401}
2016-03-01 17:22:30 +00:00
joransiu
503d589340 S390: Initial impl of debug and ic
Initial implementation of S390 specific debug and IC functions.

R=danno@chromium.org,jkummerow@chromium.org,jochen@chromium.org,jyan@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34400}
2016-03-01 17:01:43 +00:00
caitpotter88
008981cf12 [esnext] stage Object.values/entries, Object.getOwnPropertyDescriptors
BUG=v8:4663, v8:4725
LOG=N
R=littledan@chromium.org, adamk@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34399}
2016-03-01 16:15:37 +00:00
mstarzinger
00e9447ad3 Remove the global Strength enum class completely.
R=bmeurer@chromium.org
BUG=v8:3956
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34398}
2016-03-01 16:06:04 +00:00
mythria
dbf5fffd2d [Interpreter] Fixes PushArgsAndConstruct builtin to not store any data outside esp.
In ia32 PushArgsAndConstruct builtin, we run out of registers and need to
temporarily store the data in the stack. In the earlier implementation,
a location outside the esp was used. This causes a problem if there is a
interrupt/signals which would use the same stack and corrupt the data that
is above the esp. This cl fixes it by pushing it onto the stack so that
the stack pointer is updated and hence the corruption will not happen. We
reuse the slot meant for receiver as a temporary store.

TBR=rmcilroy@chromium.org
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34397}
2016-03-01 15:20:10 +00:00
jkummerow
4af7757fdf When Crankshaft aborts compilation, use TurboFan next time
When we try to optimize a function with Crankshaft, but compilation
bails out, don't disable optimization for that function entirely,
just disable Crankshaft, so TurboFan will be used for the next attempt.

Thereby this widens the TurboFan intake valve.

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

Cr-Commit-Position: refs/heads/master@{#34396}
2016-03-01 15:14:00 +00:00
yangguo
6f17848caa [serializer] split up src/snapshot/serialize.*
R=rossberg@chromium.org, ulan@chromium.org, vogelheim@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34395}
2016-03-01 14:44:08 +00:00
yangguo
21622ddae4 [debugger, interpreter] add break location at if-statement.
R=mstarzinger@chromium.org, vogelheim@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34394}
2016-03-01 14:26:04 +00:00
mythria
844e410d5c [Interpreter] Adds translation of optimized frame to bytecode offset in FrameSummary
Adds the translation from optimized frame to bytecode offset
in FrameSummary. For interpreter, the bailout id represents the bytecode
array offset. So we can directly use the bailout id as the code offset
in the FrameSummary. Also updates mjsunit.status with more information
about failing tests.

BUG=v8:4280, v8:4689
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34393}
2016-03-01 14:15:29 +00:00
nikolaos
86a9ef31c7 Fix bug with multiple directives in the preparser
The preparser should ignore "use strong" if the --strong_mode flag
is not turned on, but this should not stop processing subsequent
directives.

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

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

Cr-Commit-Position: refs/heads/master@{#34392}
2016-03-01 13:59:08 +00:00
bmeurer
0cb8a1b774 [interpreter] Properly collect for-in slow mode feedback.
Similar to fullcodegen, Ignition now also marks a for-in statement as
slow (via the TypeFeedbackVector) when we have to call %ForInFilter,
i.e. we either have no enumeration cache or the receiver map changes
during an iteration of the for-in map.

R=mstarzinger@chromium.org
BUG=v8:3650
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34391}
2016-03-01 13:55:58 +00:00
Jochen Eisinger
653cdb441d Add missing config to fuzzer_support gn rules
BUG=
R=yangguo@chromium.org, machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34390}
2016-03-01 13:55:57 +00:00
yangguo
7b693cc4ab [interpreter] Fix test-serialize/SerializeToplevelIsolates.
R=rmcilroy@chromium.org
BUG=v8:4680
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34389}
2016-03-01 13:47:07 +00:00
yangguo
d9fe836dd4 [debugger] fix break locations for assignments and return.
We used to emit debug break location on block entry. This cannot be
ported to the interpreted as we do not emit bytecode for block entry.
This made no sense to begin with though, but accidentally added
break locations for var declarations.

With this change, the debugger no longer breaks at var declarations
without initialization. This is in accordance with the fact that the
interpreter does not emit bytecode for uninitialized var declarations.

Also fix the bytecode to match full-codegen's behavior wrt return
positions:
- there is a break location before the return statement, with the source
  position of the return statement.
- right before the actual return, there is another break location. The
  source position points to the end of the function.

R=rmcilroy@chromium.org, vogelheim@chromium.org
TBR=rossberg@chromium.org
BUG=v8:4690
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34388}
2016-03-01 12:47:55 +00:00
neis
0ad44590e0 [json] Fix iteration over object keys in InternalizeJSONProperty.
We must not use for-of since that could be observed.

R=yangguo@chromium.org
BUG=v8:4769
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34387}
2016-03-01 11:53:28 +00:00
neis
85d1a55e83 Fix spec-compliance bug in ArrayIteratorPrototype.
ArrayIteratorPrototype must not provide Symbol.iterator.

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34386}
2016-03-01 11:51:52 +00:00
ssanfilippo
dc71deb077 [Interpreter] Silence runtime errors in generate-bytecode-expectations.
Runtime errors will be suppressed in --rebaseline mode, unless the
--verbose flag is passed.

The reasoning behind (rebaseline && !verbose) and not just (verbose)
is to suppress harmless noise while updating the expectation for
existing, known good snippets, without hiding actually relevant
errors when the tool is used to write new expectation files.

In fact, some tests are supposed to produce a runtime error, which
might nevertheless alarm a developer who is just --rebaseline'ing.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34385}
2016-03-01 10:43:22 +00:00
neis
ef8fa8521c Fix accidental bug in yield* desugaring.
The for-of-finalization CL incorrectly removed the input argument from
BuildIteratorClose.  I'm reverting this, adding a regression test, and fixing an
existing test that was wrong.

BUG=
R=rossberg

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

Cr-Commit-Position: refs/heads/master@{#34384}
2016-03-01 09:39:18 +00:00
neis
c4f39389ea Fix spec-compliance bug in Array.prototype.join.
The code used to [[Get]] the first element twice instead of once, which can be
observed (one of the kangax tests does so).

R=rossberg
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34383}
2016-03-01 09:07:38 +00:00
nikolaos
de817ef9c7 Fix issue with re-scoping in do expressions
R=rossberg@chromium.org
BUG=v8:4783
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34382}
2016-03-01 09:04:38 +00:00
jochen
b576da4059 Add include/ to include dir list for gcmole
BUG=
R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34381}
2016-03-01 09:03:03 +00:00
verwaest
b5487307db Revert of [crankshaft] Inline hasOwnProperty when used in fast-case for-in (patchset #1 id:40001 of https://codereview.chromium.org/1742253002/ )
Reason for revert:
ARM64 GCStress failure

Original issue's description:
> [crankshaft] Inline hasOwnProperty when used in fast-case for-in
>
> e.g.,
>
> for (var k in o) {
>   if (!o.hasOwnProperty(k)) continue;
>   ...
> }
>
> without enumerable properties on the prototype chain of o.
>
> BUG=
>
> Committed: https://crrev.com/dec80752eb344dfeb85588e61ac0afd22b11aadb
> Cr-Commit-Position: refs/heads/master@{#34379}

TBR=bmeurer@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/1748143004

Cr-Commit-Position: refs/heads/master@{#34380}
2016-03-01 09:01:29 +00:00