Commit Graph

25249 Commits

Author SHA1 Message Date
mbrandy
1b191a5d72 PPC: Reland Vector ICs: platform support for vector-based stores.
Port 40fbed0609

Original commit message:
    The last changes for vector store functionality, they are in 3 areas:

    1) The new vector [keyed] store code stubs - implementation.
    2) IC and handler compiler adjustments
    3) Odds and ends. A change in ast.cc, a test update, a small Oracle fix.

R=mvstanton@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30657}
2015-09-09 14:43:06 +00:00
mbrandy
31a9396e4b PPC: [builtins] Unify the various versions of [[Call]] with a Call builtin.
Port ccbb4ff00f

Original commit message:
    The new Call and CallFunction builtins supersede the current
    CallFunctionStub (and CallIC magic) and will be the single bottleneck
    for all calling, including the currently special Function.prototype.call
    and Function.prototype.apply builtins, which had handwritten (and
    not fully compliant) versions of CallFunctionStub, and also the
    CallIC(s), which where also slightly different.

    This also reduces the overhead for API function calls, which is still
    unnecessary high, but let's do that step-by-step.

    This also fixes a bunch of cases where the implicit ToObject for
    sloppy receivers was done in the wrong context (in the caller
    context instead of the callee context), which basically meant
    that we allowed cross context access to %ObjectPrototype%.

    MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30656}
2015-09-09 14:40:00 +00:00
mbrandy
50c6b031fd PPC: [runtime] Replace many buggy uses of %_CallFunction with %_Call.
Port db2ba190db

Original commit message:
    The semantics of the %_CallFunction intrinsic seem to be very unclear,
    which resulted in a lot of bugs. Especially the combination with
    %IsSloppyModeFunction is always a bug, because the receiver would be
    wrapped in the wrong context. So the %IsSloppyModeFunction helper is
    gone now, and many of the buggy uses of %_CallFunction are also
    eliminated.

    If you ever need to call something with a different receiver, then
    %_Call is your friend now. It does what you want and implements the
    call sequence fully (and correct).

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30655}
2015-09-09 14:27:44 +00:00
mstarzinger
a504a184f6 [turbofan] Make %Arguments composable with inlining.
This makes the C++ fallback implementations for the two intrinsics,
%Arguments and %ArgumentsLength composable with respect to inlining.
Using deoptimization information gives us accurate data here.

R=bmeurer@chromium.org
TEST=mjsunit/regress/regress-4374
BUG=v8:4374
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30654}
2015-09-09 14:14:18 +00:00
balazs.kilvady
da830b0eaa MIPS64: Fix 'On a call to Array(), we patched a call ic.'
Port ba7b641398

Original commit message:
This CL makes do with a single dispatcher which inlines the special handling for the Array() call case, loading the allocation site found in the vector and calling the array constructor stub appropriately.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30653}
2015-09-09 13:58:04 +00:00
bmeurer
100da0a78b [runtime] Remove unused %NumberUnaryMinus runtime function.
This has been dead code for quite a while now.

R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30652}
2015-09-09 13:55:24 +00:00
mstarzinger
c505907dce [turbofan] Handle stack overflow exceptions in JSInliner.
R=bmeurer@chromium.org
BUG=chromium:527364
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30651}
2015-09-09 10:24:31 +00:00
jochen
65ba650fa6 Use v8-reviews@ for review mail, so v8-dev@ is free for dev discussions
BUG=none
R=danno@chromium.org
LOG=y

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

Cr-Commit-Position: refs/heads/master@{#30650}
2015-09-09 08:14:11 +00:00
mvstanton
ba7b641398 On a call to Array(), we patched a call ic. This CL makes do with a single dispatcher which inlines the special handling for the Array() call case, loading the allocation site found in the vector and calling the array constructor stub appropriately.
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30649}
2015-09-09 08:05:45 +00:00
bmeurer
b37907ff7f [calls] Consistent call protocol for calls.
The number of actual arguments should always be available, there's no
point in trying to optimize away a simple assignment of an immediate to
a register before some calls.

The main motivation is to have a consistent state at the beginning of every
function. Currently the arguments register (i.e. rax or eax) either contains
the number of arguments or some random garbage depending on whether
the callsite decided that the callee might need the information or not.
This causes trouble with runtime implementations of functions that
do not set internal_formal_parameter_count to the DontAdaptArguments
sentinel (we don't have any of those yet), but also makes it impossible
to sanity check the arguments in the callee, because the callee doesn't
know whether the caller decided to pass the number of arguments or
random garbage.

BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30648}
2015-09-09 05:01:22 +00:00
caitpotter88
ce95a4db69 [es6] add js-perf-test for rest parameters
BUG=v8:2160
LOG=N
R=adamk, rossberg, wingo

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

Cr-Commit-Position: refs/heads/master@{#30647}
2015-09-08 23:17:11 +00:00
paul.lind
e4a8161adb MIPS: minor cleanup in macro-assembler.
Fix some dodgy temp-register usage and remove some unnecessary
push/pop's.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30646}
2015-09-08 21:58:51 +00:00
dusan.m.milosavljevic
4329a7c2cf MIPS64: [turbofan] Improve changes from and to Smi.
The instruction selection for following sequences is
improved:

  113: Word64Sar(107, 91) : Internal/Any
  114: TruncateInt64ToInt32(113) : Signed32/UntaggedSigned32
  115: ChangeInt32ToFloat64(114) : Signed32/UntaggedFloat64

TEST=unittests/InstructionSelectorTest.ChangesFromToSmi
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30645}
2015-09-08 21:55:00 +00:00
balazs.kilvady
affd6dfcb5 MIPS: Fix 'Optimize simulator.'
For simulator optimization we modified Instruction::InstructionType() function so a simpler but less complete InstructionType() function used by default. This fix enables the full InstructionType checking to properly decode a dd-constant label as unsupported opcode, rather than aborting.

BUG=chromium:528875
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#30644}
2015-09-08 19:32:27 +00:00
paul.lind
444a933931 MIPS: Fix MacroAssembler::AssertFunction()
Porting mistake in ccbb4ff0 '[builtins] Unify the various versions of [[Call]]
with a Call builtin.', which only showed as debug assertion in later commit
db2ba190 '[runtime] Replace many buggy uses of %_CallFunction with %_Call.'

Use temporary register rather than push/pop of 'object' register.

BUG=
TEST=cctest/test-api/SetFunctionEntryHook, cctest/test-serialize/PerIsolateSnapshotBlobs, ...

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

Cr-Commit-Position: refs/heads/master@{#30643}
2015-09-08 19:29:40 +00:00
mstarzinger
0faceaec7f [heap] Prevent leakage of GCCallbacksScope outside of heap.
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30642}
2015-09-08 17:14:27 +00:00
ulan
057514d3fa Use idle task to perform incremental marking steps.
This moves incremental marking steps from gc-idle-time-handler and heap to the new incremental marking task.

BUG=chromium:490559
LOG=NO

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

Cr-Commit-Position: refs/heads/master@{#30641}
2015-09-08 15:54:37 +00:00
vogelheim
244cc0a6a9 Remove all gyp BUILD rules with multiple outputs.
- Modify js2c to accept --js and --nojs,
- modify mksnapshot to accept --startup_src
  (instead of a positional parameter, so that it can be omitted),
- modify v8.gyp to use the above so that no target has multiple
  output dependencies, and
- update GN to use the switches above.

(I have not succeeded in fixing the GYP->make translator to properly map
 multi-output rules, so that they work as expected in all edge cases.
 This CL signals defeat on that front, and instead I rewrite the GYP
 file to avoid that situation in the first place.)

R=jochen@chromium.org
BUG=v8:4382
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30640}
2015-09-08 15:24:53 +00:00
rmcilroy
c9f0368add [Interpreter] Ensure that implicit return undefined is generated.
When there is no explicit return we need to generate an implicit
return undefined.

BUG=v8:4280
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30639}
2015-09-08 15:02:58 +00:00
jianghua.yjh
275cd657df Fix a potential overflow of binary search
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30638}
2015-09-08 14:50:49 +00:00
mstarzinger
6f454aa1a8 [heap] Remove obsolete DisallowAllocationFailure scope.
This removes the DisallowAllocationFailure assertion scope which mostly
coincided with the AlwaysAllocateScope anyways. Access to the bitfield
in the Isolate was not synchronized and hence the AlwaysAllocateScope
was not thread-safe in debug mode, now it is.

R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30637}
2015-09-08 14:42:44 +00:00
cbruni
a93ffde366 [builtins] Removing %_CallFunction in GetThirdIndex.
By using an InternArray for the pivot calculation we can get rid of yet
another %_CallFunction.

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

Cr-Commit-Position: refs/heads/master@{#30636}
2015-09-08 14:22:27 +00:00
mstarzinger
819b40aae8 Use baseline code to compute message locations.
This switches Isolate::ComputeLocation to use baseline code when
computing message locations. This unifies locations between optimized
and non-optimized code by always going through the FrameSummary for
location computation.

R=bmeurer@chromium.org
TEST=message/regress/regress-4266
BUG=v8:4266
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30635}
2015-09-08 14:14:59 +00:00
bmeurer
db2ba190db [runtime] Replace many buggy uses of %_CallFunction with %_Call.
The semantics of the %_CallFunction intrinsic seem to be very unclear,
which resulted in a lot of bugs. Especially the combination with
%IsSloppyModeFunction is always a bug, because the receiver would be
wrapped in the wrong context. So the %IsSloppyModeFunction helper is
gone now, and many of the buggy uses of %_CallFunction are also
eliminated.

If you ever need to call something with a different receiver, then
%_Call is your friend now. It does what you want and implements the
call sequence fully (and correct).

BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30634}
2015-09-08 13:35:32 +00:00
mstarzinger
e615c03ba1 Fix AstPrinter::VisitCallRuntime to not print garbage.
R=bmeurer@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30633}
2015-09-08 12:39:34 +00:00
karl
a5f7102754 Cache String.split not found results as well
Before String.split only cached results if the seperator was found

BUG=v8:4191
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30632}
2015-09-08 10:30:20 +00:00
karl
b7db5cd9c7 [es6] Optimize String{Starts, Ends}With
Replace Math{Min,Max}
Direct string comparison

Compared to https://codereview.chromium.org/1321853006/
single character
 found at true
77
P found at false
70
က found at false
70

BUG=v8:4384
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30631}
2015-09-08 10:20:43 +00:00
mlippautz
aeb4068496 [heap] Fix MemoryChunk::kHeaderSize computation and add some assertions.
R=mstarzinger@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30630}
2015-09-08 08:36:35 +00:00
bmeurer
ccbb4ff00f [builtins] Unify the various versions of [[Call]] with a Call builtin.
The new Call and CallFunction builtins supersede the current
CallFunctionStub (and CallIC magic) and will be the single bottleneck
for all calling, including the currently special Function.prototype.call
and Function.prototype.apply builtins, which had handwritten (and
not fully compliant) versions of CallFunctionStub, and also the
CallIC(s), which where also slightly different.

This also reduces the overhead for API function calls, which is still
unnecessary high, but let's do that step-by-step.

This also fixes a bunch of cases where the implicit ToObject for
sloppy receivers was done in the wrong context (in the caller
context instead of the callee context), which basically meant
that we allowed cross context access to %ObjectPrototype%.

MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.

R=mstarzinger@chromium.org, jarin@chromium.org, mvstanton@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
BUG=v8:4413
LOG=n

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

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

Cr-Commit-Position: refs/heads/master@{#30629}
2015-09-08 07:50:34 +00:00
bmeurer
298d4a6b76 Revert of [builtins] Unify the various versions of [[Call]] with a Call builtin. (patchset #10 id:260001 of https://codereview.chromium.org/1311013008/ )
Reason for revert:
Breaks nosnap, needs investigation

Original issue's description:
> [builtins] Unify the various versions of [[Call]] with a Call builtin.
>
> The new Call and CallFunction builtins supersede the current
> CallFunctionStub (and CallIC magic) and will be the single bottleneck
> for all calling, including the currently special Function.prototype.call
> and Function.prototype.apply builtins, which had handwritten (and
> not fully compliant) versions of CallFunctionStub, and also the
> CallIC(s), which where also slightly different.
>
> This also reduces the overhead for API function calls, which is still
> unnecessary high, but let's do that step-by-step.
>
> This also fixes a bunch of cases where the implicit ToObject for
> sloppy receivers was done in the wrong context (in the caller
> context instead of the callee context), which basically meant
> that we allowed cross context access to %ObjectPrototype%.
>
> MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.
>
> R=mstarzinger@chromium.org, jarin@chromium.org, mvstanton@chromium.org
> CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg
> BUG=v8:4413
> LOG=n
>
> Committed: https://crrev.com/ef268a83be4dead004047c25b702319ea4be7277
> Cr-Commit-Position: refs/heads/master@{#30627}

TBR=rmcilroy@chromium.org,jarin@chromium.org,mstarzinger@chromium.org,mvstanton@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=v8:4413

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

Cr-Commit-Position: refs/heads/master@{#30628}
2015-09-08 06:12:36 +00:00
bmeurer
ef268a83be [builtins] Unify the various versions of [[Call]] with a Call builtin.
The new Call and CallFunction builtins supersede the current
CallFunctionStub (and CallIC magic) and will be the single bottleneck
for all calling, including the currently special Function.prototype.call
and Function.prototype.apply builtins, which had handwritten (and
not fully compliant) versions of CallFunctionStub, and also the
CallIC(s), which where also slightly different.

This also reduces the overhead for API function calls, which is still
unnecessary high, but let's do that step-by-step.

This also fixes a bunch of cases where the implicit ToObject for
sloppy receivers was done in the wrong context (in the caller
context instead of the callee context), which basically meant
that we allowed cross context access to %ObjectPrototype%.

MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com.

R=mstarzinger@chromium.org, jarin@chromium.org, mvstanton@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg
BUG=v8:4413
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30627}
2015-09-08 05:06:46 +00:00
chunyang.dai
15cf7d6174 X87: initialize the FPU state for X87 in prologue.
This CL is a fix for c0c3d866fb (r30606).
   In r30606, initialization of FPU implementation is not moved to prologue
   generation correctly.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30626}
2015-09-08 03:27:20 +00:00
v8-autoroll
2ba06a0adc Update V8 DEPS.
Rolling v8/build/gyp to 5d01a8cda53bfa23f1dcbe0c31c33aa30f50cf4c

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

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

Cr-Commit-Position: refs/heads/master@{#30625}
2015-09-08 03:25:32 +00:00
fedor
c7392f2e41 [heap] introduce ArrayBufferTracker
Move various ArrayBuffer-related methods from Heap class to the newly
created ArrayBufferTracker. Consolidate and simplify things!

BUG=
R=mlippautz@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30624}
2015-09-07 19:38:30 +00:00
brettw
0014ad92a3 Add a GN import for sanitizers.gni.
The is_*san flags are moving from the master build config file into this
.gni file. This patch will allow V8 to continue compiling when that change
is landed.

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

Cr-Commit-Position: refs/heads/master@{#30623}
2015-09-07 15:22:58 +00:00
jochen
c161799f2c Start removing deprecated APIs from cctest
BUG=4134
R=vogelheim@chromium.org,rmcilroy@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#30622}
2015-09-07 14:44:56 +00:00
mstarzinger
3a204ea97e [presubmit] Enable build/c++11 linter checking.
This enables the general linter checking for "build/c++11" violations
during presubmit and instead marks the few known exceptions that we
allow explicitly.

R=jochen@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30621}
2015-09-07 14:24:18 +00:00
cbruni
73cb8c7774 Adding js2c.py "Too many arguments" for Macros Error
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30620}
2015-09-07 14:04:06 +00:00
cbruni
cbdb13533e Adding ElementsAccessor::Concat
- Moving parts of ArrayConcat from builtins.cc to the ElementsAccessor
- Removing ArrayConcat Runtime Function

BUG=v8:4317
LOG=N

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

Cr-Commit-Position: refs/heads/master@{#30619}
2015-09-07 13:45:02 +00:00
cbruni
aef772b4d3 Avoid using %_CallFunction if the receiver doesn't change.
Review URL: https://codereview.chromium.org/1326263002

Cr-Commit-Position: refs/heads/master@{#30618}
2015-09-07 12:45:40 +00:00
machenbach
85d1464c42 [test] Return target name on failures.
This information can be used on the buildbot side to only
rebuild the failing target for bisection.

BUG=chromium:511215
LOG=n
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#30617}
2015-09-07 10:11:38 +00:00
mstarzinger
b48e0c4a58 [turbofan] Clarify comment about Parameter indexing.
This clarifies a comments in the AstGraphBuilder that has led to
confusion about what "parameter index" refers to. The off-by-one is
confusing and a terribly phrased comment doesn't make it any better.

R=rmcilroy@chromium.org,oth@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#30616}
2015-09-07 09:37:07 +00:00
karl
0e0c802858 Fix two byte string-search on big endian platforms
Use AlignDown instead of IsAligned to avoid false negatives
on big endian platforms
Use byte with highest value to speedup search

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30615}
2015-09-07 09:08:03 +00:00
cbruni
00b85aabbf Adding GetMoreGeneralElementsKind in elements-kind.h
BUG=

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

Cr-Commit-Position: refs/heads/master@{#30614}
2015-09-07 08:37:28 +00:00
chunyang.dai
b2a47a0bc6 X87: [runtime] Remove useless IN builtin.
port 3dc9b122fa (r30582).

original commit message:

    Similar to DELETE, the IN builtin is just a thin wrapper for %HasElement
    and %HasProperty anyway, and cannot be optimized, plus it had a weird
    special fast case (which also involved at least one LOAD_IC plus some
    intrinsic magic).

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30613}
2015-09-07 08:26:15 +00:00
chunyang.dai
6b69d5365d X87: Reland Vector ICs: platform support for vector-based stores.
port 40fbed0609 (r30581)

original commit message:

    The last changes for vector store functionality, they are in 3 areas:

    1) The new vector [keyed] store code stubs - implementation.
    2) IC and handler compiler adjustments
    3) Odds and ends. A change in ast.cc, a test update, a small Oracle fix.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30612}
2015-09-07 08:19:49 +00:00
chunyang.dai
0fce748dc6 X87: Remove obsolete functionality from the MacroAssemblers.
port 64e3bad367 (r30577)

original commit message:

    This is uncontroversial the dead code removal part of
    https://codereview.chromium.org/1307943013, which was
    previously landed, but got reverted because of DOM
    breakage that requires more investigation.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30611}
2015-09-07 08:14:45 +00:00
chunyang.dai
691f796f72 X87: [es6] Introduce a dedicated JSIteratorResult type.
port 72bc4b5c8a (r30557)

original commit message:

    Use a single JSIteratorResult type for all implementation provided
    iterator results (i.e. the String, Array and collection iterators,
    and also for generators).  This removes one source of unnecessary
    polymorphism in for-of loops.  It is accomplished by a new intrinsic
    %_CreateIterResultObject() that should be used to create iterator
    result objects from JavaScript builtins (there's a matching factory
    method for C++ code).

    Also restructure the %StringIteratorPrototype%.next() and
    %ArrayIteratorPrototype%.next() functions to be a bit more friendly
    to optimizing compilers.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30610}
2015-09-07 08:10:37 +00:00
chunyang.dai
57d16cf417 X87: [es6] Initial steps towards a correct implementation of IsCallable.
port 8a378f46d5 (r30552)

original commit message:

    This turns the has_instance_call_handler bit on Map into an is_callable
    bit, that matches the spec definition of IsCallable (i.e. instances have
    [[Call]] internal methods).

    Also fix the typeof operator to properly say "function" for everything
    that is callable.

    Also remove the (unused) premature %_GetPrototype optimization from
    Crankshaft, which just complicated the Map bit swap.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30609}
2015-09-07 08:00:49 +00:00
chunyang.dai
e5ee42fa05 X87: [es6] Re-implement rest parameters via desugaring.
port 510baeacba (r30550)

original commit message:

    Kills the kRestParameter bailout/disabled optimization, and fixes
    lazily parsed arrow functions with rest parameters.

    Supercedes https://crrev.com/1235153006/

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30608}
2015-09-07 07:51:35 +00:00