Commit Graph

29160 Commits

Author SHA1 Message Date
jfb
abbdca947f wasm: use strings for section names
This will require an equivalent sexpr-wasm change.

See:
https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#high-level-structure

R=titzer@chromium.org, binji@chronium.org

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

Cr-Commit-Position: refs/heads/master@{#34668}
2016-03-10 12:37:19 +00:00
Toon Verwaest
4bbd051acc Resort to presubmit style.
TBR=machenbach@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34667}
2016-03-10 12:34:09 +00:00
epertoso
7fea25f049 Marks the label associated with the runtime call in CodeStubAssembler::Allocate as deferred.
BUG=593359
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34666}
2016-03-10 12:24:18 +00:00
ulan
561e162902 Implement parallel pointer updates after evacuation.
BUG=chromium:568495
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#34665}
2016-03-10 12:19:18 +00:00
verwaest
5c73b25ff5 Split off api-arguments.[h|cc] from arguments.[h|cc]
NOPRESUBMIT=true
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34664}
2016-03-10 12:16:05 +00:00
machenbach
e7f99c1ed5 [Swarming] Isolate sancov tool.
BUG=chromium:535160,chromium:568949
LOG=n
TBR=tandrii@chromium.org, kjellander@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34663}
2016-03-10 12:04:32 +00:00
jacob.bramley
6b6236587d [arm] Basic simulation of msr and mrs.
Only CPSR_f is supported, and then only for the flags that we actually
simulate (NZCV). This isn't currently used, but will be useful for some
tests.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34662}
2016-03-10 11:39:04 +00:00
yangguo
fe92166111 [serializer] allow test-serialize/PartialSerializerCustomContext to optimize.
Previously, optimization has been disabled because of an assertion
failure, which requires the context to be linked into the weak native
context list of the heap.

R=jkummerow@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34661}
2016-03-10 11:18:50 +00:00
verwaest
79ccf34a78 Inline calling into the interceptor into the IC callbacks rather than going through the LookupIterator.
This is highly performance sensitive as there is no faster path; it's
used directly by the IC.

BUG=chromium:592305
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34660}
2016-03-10 10:56:05 +00:00
machenbach
bc78ab674c [Ignition] Remove outdated test expectation.
BUG=v8:4680
LOG=n
NOTRY=true
TBR=rmcilroy@chromium.org
NOTREECHECKS=true
NOPRESUBMIT=true

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

Cr-Commit-Position: refs/heads/master@{#34659}
2016-03-10 10:54:18 +00:00
Michael Achenbach
179feed59f Whitespace change after reviving test262 with ignition.
Cr-Commit-Position: refs/heads/master@{#34658}
2016-03-10 10:33:47 +00:00
yangguo
a65edb8be6 Improve test-serialize test cases.
Changes include:
 - better test coverage for builds with snapshot
 - write snapshot blobs to buffer instead of test serialization files
 - renamed tests

R=machenbach@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34657}
2016-03-10 09:58:26 +00:00
zhengxing.li
25279332c7 X87: [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32.
port 240b7db9c7 (r34630)

  original commit message:
  I implemented I64ShrU and I64ShrS the same as I64Shl in https://codereview.chromium.org/1756863002

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34656}
2016-03-10 09:39:41 +00:00
hpayer
dedfe5aee5 Call RecordWriteIntoCode when storing the target object in the reloc info on all platforms.
BUG=chromium:561449
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#34655}
2016-03-10 09:36:19 +00:00
neis
3062af70eb Implement iterator finalization in array destructuring.
We must close the iterator whenever the destructuring didn't exhaust it, unless an iterator operation (eg. next) threw.  We do this by wrapping the iterator use in a try-catch-finally similar to the desugaring of for-of.

This is behind --harmony-iterator-close.

R=adamk@chromium.org
BUG=v8:3566
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34654}
2016-03-10 09:34:36 +00:00
Michael Achenbach
9bf7730db0 Whitespace change to kick off bots.
Cr-Commit-Position: refs/heads/master@{#34653}
2016-03-10 09:29:48 +00:00
zhengxing.li
ebd28ac650 X87: Rework CallApi*Stubs.
port 5096492f1b (r34627)

  original commit message:
  - Eliminate stubs with a variable number of arguments.
    (That only worked due to their very limited use. These
     stubs' interface descriptors were basically lying
     about their number of args, which will fail when used
     generically.)
  - Fix all CallApi*Stubs' interface descriptors to no
    longer lie about their arguments.
  - Unify CallApi*Stub, for * in Function, Accessor,
    FunctionWithFixedArgs.
    (Since these are now all doing the same thing.)
  - Rename the unified stub (and interface descriptors) to
    *ApiCallback*, since that's really what they're doing.
  - Refuse inlining an API callback if its number of
    parameters exceeds the supported number of args.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34652}
2016-03-10 06:31:02 +00:00
zhengxing.li
7b84d299ea X87: [turbofan] [deoptimizer] Support inlining of ES6 tail calls.
port c29a4560bb548fa0ebeec8262f9d6fca9d50fe7a(r34610)

  original commit message:
  In case when F was called with incompatible number of arguments (and therefore
  the arguments adator frame was created), F inlines a tail call of G which then
  deopts the deoptimizer should also remove the arguments adaptor frame for F.

  This CL adds required machinery to the deoptimizer.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34651}
2016-03-10 06:15:44 +00:00
zhengxing.li
92eb11e959 X87: [undetectable] Really get comparisons of document.all right now.
port 679d9503cffe631cb3b938627274aea10893069c(r34608)

  original commit message:
  According to https://www.w3.org/TR/html5/obsolete.html#dom-document-all,
  comparisons of document.all to other values such as strings or objects,
  are unaffected. In fact document.all only gets special treatment in
  comparisons with null or undefined according to HTML. Especially setting
  the undetectable doesn't make two distinct JSReceivers equal.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34650}
2016-03-10 06:12:20 +00:00
v8-autoroll
0f8cb27ef0 Update V8 DEPS.
Rolling v8/tools/clang to fc7b250f6ca03bcbcd2cd1a3e4102cb639a2814a

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

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

Cr-Commit-Position: refs/heads/master@{#34649}
2016-03-10 04:19:01 +00:00
zhengxing.li
7a51f8c843 X87: [runtime] Unify and simplify how frames are marked.
port 9dcd0857d6 (r34571)

  original commit message:
  Before this CL, various code stubs used different techniques
  for marking their frames to enable stack-crawling and other
  access to data in the frame. All of them were based on a abuse
  of the "standard" frame representation, e.g. storing the a
  context pointer immediately below the frame's fp, and a
  function pointer after that. Although functional, this approach
  tends to make stubs and builtins do an awkward, unnecessary
  dance to appear like standard frames, even if they have
  nothing to do with JavaScript execution.

  This CL attempts to improve this by:

  * Ensuring that there are only two fundamentally different
    types of frames, a "standard" frame and a "typed" frame.
    Standard frames, as before, contain both a context and
    function pointer. Typed frames contain only a minimum
    of a smi marker in the position immediately below the fp
    where the context is in standard frames.
  * Only interpreted, full codegen, and optimized Crankshaft and
    TurboFan JavaScript frames use the "standard" format. All
    other frames use the type frame format with an explicit
    marker.
  * Typed frames can contain one or more values below the
    type marker. There is new magic macro machinery in
    frames.h that simplifies defining the offsets of these fields
    in typed frames.
  * A new flag in the CallDescriptor enables specifying whether
    a frame is a standard frame or a typed frame. Secondary
    register location spilling is now only enabled for standard
    frames.
  * A zillion places in the code have been updated to deal with
    the fact that most code stubs and internal frames use the
    typed frame format. This includes changes in the
    deoptimizer, debugger, and liveedit.
  * StandardFrameConstants::kMarkerOffset is deprecated,
    (CommonFrameConstants::kContextOrFrameTypeOffset
    and StandardFrameConstants::kFrameOffset are now used
    in its stead).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#34648}
2016-03-10 02:39:58 +00:00
littledan
43adcd3c65 String.prototype[Symbol.iterator] does RequireObjectCoercible(this)
BUG=v8:4348
R=adamk
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34647}
2016-03-10 00:59:20 +00:00
littledan
7297f018e7 Stage restrictive declarations flag
This flag bans illegal (and likely useless) constructs like

for (;;) function f() {}

R=adamk
BUG=v8:4824
LOG=Y

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

Cr-Commit-Position: refs/heads/master@{#34646}
2016-03-10 00:05:17 +00:00
mbrandy
eaa38ad177 PPC: [undetectable] Really get comparisons of document.all right now.
Port 679d9503cf

Original commit message:
    According to https://www.w3.org/TR/html5/obsolete.html#dom-document-all,
    comparisons of document.all to other values such as strings or objects,
    are unaffected. In fact document.all only gets special treatment in
    comparisons with null or undefined according to HTML. Especially setting
    the undetectable doesn't make two distinct JSReceivers equal.

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

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

Cr-Commit-Position: refs/heads/master@{#34645}
2016-03-09 23:14:26 +00:00
mbrandy
209c215244 PPC: [turbofan] [deoptimizer] Support inlining of ES6 tail calls.
Port c29a4560bb

Original commit message:
    In case when F was called with incompatible number of arguments (and therefore
    the arguments adator frame was created), F inlines a tail call of G which then
    deopts the deoptimizer should also remove the arguments adaptor frame for F.

    This CL adds required machinery to the deoptimizer.

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

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

Cr-Commit-Position: refs/heads/master@{#34644}
2016-03-09 23:11:14 +00:00
mbrandy
4445c095d2 PPC: [runtime] Unify and simplify how frames are marked
Port 9dcd0857d6

Original commit message:
    Before this CL, various code stubs used different techniques
    for marking their frames to enable stack-crawling and other
    access to data in the frame. All of them were based on a abuse
    of the "standard" frame representation, e.g. storing the a
    context pointer immediately below the frame's fp, and a
    function pointer after that. Although functional, this approach
    tends to make stubs and builtins do an awkward, unnecessary
    dance to appear like standard frames, even if they have
    nothing to do with JavaScript execution.

    This CL attempts to improve this by:

    * Ensuring that there are only two fundamentally different
      types of frames, a "standard" frame and a "typed" frame.
      Standard frames, as before, contain both a context and
      function pointer. Typed frames contain only a minimum
      of a smi marker in the position immediately below the fp
      where the context is in standard frames.
    * Only interpreted, full codegen, and optimized Crankshaft and
      TurboFan JavaScript frames use the "standard" format. All
      other frames use the type frame format with an explicit
      marker.
    * Typed frames can contain one or more values below the
      type marker. There is new magic macro machinery in
      frames.h that simplifies defining the offsets of these fields
      in typed frames.
    * A new flag in the CallDescriptor enables specifying whether
      a frame is a standard frame or a typed frame. Secondary
      register location spilling is now only enabled for standard
      frames.
    * A zillion places in the code have been updated to deal with
      the fact that most code stubs and internal frames use the
      typed frame format. This includes changes in the
      deoptimizer, debugger, and liveedit.
    * StandardFrameConstants::kMarkerOffset is deprecated,
      (CommonFrameConstants::kContextOrFrameTypeOffset
      and StandardFrameConstants::kFrameOffset are now used
      in its stead).

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

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

Cr-Commit-Position: refs/heads/master@{#34643}
2016-03-09 23:08:23 +00:00
mbrandy
50e43bc37e PPC: Fix "Rework CallApi*Stubs".
R=joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34642}
2016-03-09 23:05:11 +00:00
titzer
4cb568ec5f [wasm] Encode function signatures, bodies, and names as separate sections.
R=binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34641}
2016-03-09 22:51:50 +00:00
adamk
c48c1736c7 Expose Array.prototype.values behind a flag and stage it
BUG=v8:4247
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#34640}
2016-03-09 22:47:03 +00:00
binji
29cd25be1d [Wasm] Move data segment data inline to the data segment section
BUG=
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34639}
2016-03-09 19:43:14 +00:00
yangguo
48f9c16184 [regexp] allow loose matching for property names.
As described in unicode database file PropertyValueAliases.txt

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

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

Cr-Commit-Position: refs/heads/master@{#34638}
2016-03-09 19:07:46 +00:00
binji
ca0dbaece0 [wasm] All strings are length-prefixed and inline
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34637}
2016-03-09 18:56:30 +00:00
littledan
ca5deb1ff8 Ensure appropriate bounds checking for Array subclass concat
When an Array subclass is used as the receiver for concat, or with
certain usages of @@species, the output that's constructed is of
a different type with new slow path logic. This slow path still
made references to elements, so it's important that bounds checking
for a too-long result still be done. This patch repairs that bounds
checking.

R=cbruni
LOG=Y
BUG=chromium:592340

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

Cr-Commit-Position: refs/heads/master@{#34636}
2016-03-09 18:54:44 +00:00
titzer
f99624a98e [wasm] Encode immediates to Load and Store as varint.
R=binji@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34635}
2016-03-09 18:54:43 +00:00
hlopko
fd43661c50 Add flag to trace object groups
BUG=chromium:468240
LOG=no

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

Cr-Commit-Position: refs/heads/master@{#34634}
2016-03-09 17:56:19 +00:00
jkummerow
32b3d3e931 [arm/arm64][stubs] Fix d16-d31 preservation on stub failure
Reading the registers' values back from the FrameDescription
should use the same offset computation as storing them into it.
The offsets must also match what the deoptimizer expects, which
is rx at offset rx.code() * kDoubleSize, even if some registers
are not saved (leaving gaps).

BUG=v8:4800
LOG=n
R=danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34633}
2016-03-09 17:36:07 +00:00
alan.li
4ec5a1e368 MIPS: Fix '[wasm] add rotate opcodes'
Port 9d0cf920bd

Bug Descriptions:
1. We are missing drotr32 instruction
2. Ror Macro should also handle values less than zero or bigger than 31, as WASM instruction kExprI32Rol will generate shifting operands beyond [0 .. 31] range.
3. Same as Dror.
4. drotrv instruction in simulator is incorrect.

BUG=
TEST=cctest/test-run-wasm/Run_WasmInt32Binops,cctest/test-run-wasm/Run_WasmInt64Binops

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

Cr-Commit-Position: refs/heads/master@{#34632}
2016-03-09 17:32:53 +00:00
ssanfilippo
8447072d60 [Interpreter] Log code-creation events for bytecode handlers.
BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34631}
2016-03-09 16:52:19 +00:00
ahaas
240b7db9c7 [wasm] Int64Lowering of I64ShrU and I64ShrS on ia32.
I implemented I64ShrU and I64ShrS the same as I64Shl in https://codereview.chromium.org/1756863002

R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34630}
2016-03-09 16:38:43 +00:00
ahaas
d7ddd35c29 [wasm] Int64Lowering of I64XConvertI32.
R=titzer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34629}
2016-03-09 16:21:08 +00:00
verwaest
8340f52f98 [LookupIterator] mark index_ as const
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34628}
2016-03-09 16:21:07 +00:00
vogelheim
5096492f1b Rework CallApi*Stubs.
- Eliminate stubs with a variable number of arguments.
  (That only worked due to their very limited use. These
   stubs' interface descriptors were basically lying
   about their number of args, which will fail when used
   generically.)
- Fix all CallApi*Stubs' interface descriptors to no
  longer lie about their arguments.
- Unify CallApi*Stub, for * in Function, Accessor,
  FunctionWithFixedArgs.
  (Since these are now all doing the same thing.)
- Rename the unified stub (and interface descriptors) to
  *ApiCallback*, since that's really what they're doing.
- Refuse inlining an API callback if its number of
  parameters exceeds the supported number of args.

BUG=

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

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

Cr-Commit-Position: refs/heads/master@{#34627}
2016-03-09 16:19:03 +00:00
yangguo
d1f68f776e [regexp] fix bogus assertion in CharacterRange constructor.
The CharacterRange constructor checks the input for validity. However,
CharacterRange::Singleton also uses the constructor and may have
kEndMarker as input, causing the check to fail.

The solution is to move the check to CharacterRange::Range and
consistently use it across the code base.

R=jkummerow@chromium.org
BUG=chromium:593282
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#34626}
2016-03-09 15:55:38 +00:00
jkummerow
592ad6dce1 [x64] Fix crashes in CheckAccessGlobalProxy
We have to do a Smi check on the frame marker, not just compare
against a single frame type.

BUG=chromium:593332
LOG=n
TBR=danno@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34625}
2016-03-09 15:15:11 +00:00
vogelheim
52a741d18e Revert of Rework CallApi*Stubs. (patchset #5 id:100001 of https://codereview.chromium.org/1748123003/ )
Reason for revert:
Breaks Chromium.

Original issue's description:
> Rework CallApi*Stubs.
>
> - Eliminate stubs with a variable number of arguments.
>   (That only worked due to their very limited use. These
>    stubs' interface descriptors were basically lying
>    about their number of args, which will fail when used
>    generically.)
> - Fix all CallApi*Stubs' interface descriptors to no
>   longer lie about their arguments.
> - Unify CallApi*Stub, for * in Function, Accessor,
>   FunctionWithFixedArgs.
>   (Since these are now all doing the same thing.)
> - Rename the unified stub (and interface descriptors) to
>   *ApiCallback*, since that's really what they're doing.
> - Refuse inlining an API callback if its number of
>   parameters exceeds the supported number of args.
>
> BUG=
>
> Committed: https://crrev.com/d238b953a474272c0e3ea22ef6a9b63fa9729340
> Cr-Commit-Position: refs/heads/master@{#34614}

TBR=danno@chromium.org,jkummerow@chromium.org,mstarzinger@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/1775933005

Cr-Commit-Position: refs/heads/master@{#34624}
2016-03-09 14:59:03 +00:00
mbrandy
40a9b8d170 Fix "[runtime] Unify and simplify how frames are marked" for embedded constant pools.
Avoid hard-coding fp offset to marker in StandardFrame::IterateCompiledFrame.

R=danno@chromium.org, michael_dawson@ca.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34623}
2016-03-09 14:38:11 +00:00
ishell
209eb337b1 Parallelize test/mjsunit/es6/tail-call-megatest.js in order to avoid timeouts on slow architectures.
Review URL: https://codereview.chromium.org/1778663004

Cr-Commit-Position: refs/heads/master@{#34622}
2016-03-09 14:08:57 +00:00
titzer
8e9c019bf2 [wasm] Memory is exported on the module.exports object.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34621}
2016-03-09 13:32:53 +00:00
jochen
34a47649e8 Annotate runtime call stats with trace events
I used a new category "v8.runtime" and all events are disabled by
default, so there shouldn't be any perf impact.

BUG=none
R=fmeawad@chromium.org,cbruni@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#34620}
2016-03-09 13:09:43 +00:00
hpayer
6975f77b4d [heap] Remove dead code in map space class.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#34619}
2016-03-09 12:57:02 +00:00