Commit Graph

28909 Commits

Author SHA1 Message Date
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
verwaest
dec80752eb [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=

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

Cr-Commit-Position: refs/heads/master@{#34379}
2016-03-01 07:21:01 +00:00
bmeurer
b4b9fc2927 [compiler] Fix a bunch of wrong word size assumptions.
Operations on word size data must be word sized, and not word32.
Currently this only generates worse code, but in the future, it
might even generate wrong code, so we should better get this right
from the beginning.

R=yangguo@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34378}
2016-03-01 07:10:26 +00:00
bmeurer
74d6c64cc0 [for-in] Record slow path feedback only when we hit %ForInFilter.
The only place in fullcodegen, where we know for sure that a for-in loop
entered the slow-path is right before the potential call to %ForInFilter.
So there's no point in also updating the mode eagerly during ForInPrepare.

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

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

Cr-Commit-Position: refs/heads/master@{#34377}
2016-03-01 06:10:40 +00:00
alph
b01cd96eb5 Make CPU profiler unwind the inlined functions stack.
BUG=575466
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34376}
2016-03-01 06:00:08 +00:00
aseemgarg
4537f09374 Replace __init__ function in asm-wasm-builder with the start function section
BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=mjsunit/asm-wasm
R=titzer@chromium.org,bradnelson@chromium.org
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34375}
2016-03-01 05:50:55 +00:00
v8-autoroll
a4462be1bb Update V8 DEPS.
Rolling v8/base/trace_event/common to e40c41030f44cbd5b6f54081436620f43c3bb08a

Rolling v8/tools/clang to d53e60b4f31f03a6f719b13ed2de7389a4d89be4

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

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

Cr-Commit-Position: refs/heads/master@{#34374}
2016-03-01 04:22:51 +00:00
littledan
2765a0609a Make %TypedArray%.from spec-compliant
This patch fixes %TypedArray%.from to follow the ES2016 draft spec
more precisely. Specifically, the input is first converted to an
ArrayLike, and then afterwards, the mapping function is run and the
results written into the TypedArray. This fixes a test262 test.

R=adamk
LOG=Y
BUG=v8:4782

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

Cr-Commit-Position: refs/heads/master@{#34373}
2016-03-01 02:41:42 +00:00
zhengxing.li
4a6f15124f X87: [turbofan] Don't use the CompareIC in JSGenericLowering.
port d00da47b61462681b48e48bdff4a80a33da1a6d6(r34335)

  original commit message:
  The CompareICStub produces an untagged raw word value, which has to be
  translated to true or false manually in the TurboFan code. But for lazy
  bailout after the CompareIC, we immediately go back to fullcodegen or
  Ignition with the raw value, to a location where both fullcodegen and
  Ignition expect a boolean value, which might crash or in the worst case
  (depending on the exact computation inside the CompareIC) could lead to
  arbitrary memory access.

  Short-term fix is to use the proper runtime functions (unified with the
  interpreter now) for comparisons. Next task is to provide optimized
  versions of these based on the CodeStubAssembler, which can then be used
  via code stubs in TurboFan or directly in handlers in the interpreter.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34372}
2016-03-01 02:37:12 +00:00
mbrandy
0a287e230b PPC: [compiler] Drop the CompareNilIC.
Port fb59ea3334

Original commit message:
    Since both null and undefined are also marked as undetectable now, we
    can just test that bit instead of having the CompareNilIC try to collect
    feedback to speed up the general case (without the undetectable bit
    being used).

    Drive-by-fix: Update the type system to match the new handling of
    undetectable in the runtime.

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

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

Cr-Commit-Position: refs/heads/master@{#34371}
2016-02-29 20:27:52 +00:00
cbruni
8d12b61144 [counters] Only initialize the RuntimeCallStats when --runtime_call_stat is
specified.

BUG=chromium:590668
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34370}
2016-02-29 19:13:15 +00:00
adamk
65b23ac721 [cleanup] Move ForEach vector feedback slots to ForInStatement
The "each" slot is only actually used by ForIn, so this simply cleans
up a TODO of mine and removes an IsForOfStatement() call.

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

Cr-Commit-Position: refs/heads/master@{#34369}
2016-02-29 19:10:09 +00:00
titzer
c5b2f1536b [wasm] Add support and unittests for decoding signed LEB128.
R=bradnelson@chromium.org,ahaas@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34368}
2016-02-29 18:42:26 +00:00