Commit Graph

31505 Commits

Author SHA1 Message Date
yangguo
ada6fa1fda Add test case for 85b8c2dc (fix observable array access in messages.js).
R=bmeurer@chromium.org
BUG=chromium:617527

Review-Url: https://codereview.chromium.org/2045153002
Cr-Commit-Position: refs/heads/master@{#36813}
2016-06-08 07:54:26 +00:00
yangguo
31c0c024bb [snapshot] remove metadata field.
The upcoming snapshot creator API will have no way to distinguish default
from custom snapshots.

R=vogelheim@chromium.org
BUG=chromium:617892

Review-Url: https://codereview.chromium.org/2040813005
Cr-Commit-Position: refs/heads/master@{#36812}
2016-06-08 07:51:28 +00:00
gsathya
3c927e07b0 Revert "Revert of [builtins] Properly optimize TypedArray/DataView accessors. (patchset #3 id:40001 of https://codereview.chromium.org/2042013003/ )"
This reverts commit d3a43e47dd.

This patch also adds typed_array_fun and typed_array_protoype to the
native context. These are used in InstallTypedArray to set up the
prototype chain correctly for each typed array sub class. This removes
the need to later monkey patch them prototype chain in typedarray.js.
This mechanism is also used to get hold of the TypedArray in
typedarray.js, removing the need for a global TypedArray.

This patch updates CallRuntime.golden to account for the two extra
native runtime calls. This patch also fixes some formatting issues (by
running git cl format).

BUG=chromium:579905, chromium:593634, v8:4085, v8:5073

Review-Url: https://codereview.chromium.org/2046333002
Cr-Commit-Position: refs/heads/master@{#36811}
2016-06-08 07:40:31 +00:00
mstarzinger
21d7ec0569 [runtime] Deprecate RUNTIME_ASSERT from atomics.
This removes explicit uses of the RUNTIME_ASSERT macro from some runtime
function. The implicit ones in CONVERT_FOO_ARG_CHECKED will be addressed
in a separate CL for all runtime modules at once.

R=binji@chromium.org
BUG=v8:5066

Review-Url: https://codereview.chromium.org/2034063002
Cr-Commit-Position: refs/heads/master@{#36810}
2016-06-08 07:40:30 +00:00
bmeurer
c91c396112 [turbofan] Do strength reduction for ObjectIsSmi based on inputs.
Ideally we would have a dedicated MachineRepresentation for Smis during
representation selection and use that to properly optimize ObjectIsSmi
(and other ObjectIs<Type> predicates), but that will take some time to
get that done. So in the meantime we can just do simple (local) strength
reduction on ObjectIsSmi to avoid Smi checks in the simplest cases at
least.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2047213002
Cr-Commit-Position: refs/heads/master@{#36809}
2016-06-08 07:13:05 +00:00
mstarzinger
80b98da2cd [compiler] Improve contract for Compiler::CompileDebugCode.
This changes the contract for the aforementioned API function to be more
permissive and allow callers to call it with less restrictions. The new
contract is:

a) For so far un-compiled functions, the compiler is free to choose the
   backend according to other decision criteria. Debug code can hence be
   provided by either Ignition or FullCodegen.
b) For compiled functions, the compiler will provide debug code within
   the same tier as existing code. For Ignition the generated code will
   be equivalent to the old one. For FullCodegen the code will contain
   debug information and debug break slots.

Concretely this fixes an issue where generator or async functions might
have been compiled with an unexpected backend, due to the fact that the
API method in question was always providing FullCodegen code.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2044063002
Cr-Commit-Position: refs/heads/master@{#36808}
2016-06-08 07:08:27 +00:00
hpayer
1e3a38d962 Revert of [heap] Uncommit unused large object page memory. (patchset #13 id:230001 of https://codereview.chromium.org/2032393002/ )
Reason for revert:
Needs fixing of slot set.

Original issue's description:
> [heap] Uncommit unused large object page memory.
>
> As a first step I uncommit the memory on the main thread. Also to measure impact and stability of that optimization. In a follow-up CL, the uncommitting should be moved on the concurrent thread.
>
> BUG=
>
> Committed: https://crrev.com/d61a5c376ba51145dc4684e39d5d3a9ce75bcfa6
> Cr-Commit-Position: refs/heads/master@{#36763}

TBR=ulan@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=

Review-Url: https://codereview.chromium.org/2043263002
Cr-Commit-Position: refs/heads/master@{#36807}
2016-06-08 06:53:26 +00:00
hpayer
56a9e33802 Revert of [heap] Unregister shrinked large object memory from chunk map. (patchset #6 id:100001 of https://codereview.chromium.org/2046953002/ )
Reason for revert:
Revert because uncommit of lo is broken.

Original issue's description:
> [heap] Unregister shrinked large object memory from chunk map.
>
> BUG=chromium:617883
> LOG=n
>
> Committed: https://crrev.com/2b38d3121b5fd0e409cdda0071fa2e0ec2846ab2
> Cr-Commit-Position: refs/heads/master@{#36793}

TBR=ulan@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:617883

Review-Url: https://codereview.chromium.org/2046563008
Cr-Commit-Position: refs/heads/master@{#36806}
2016-06-08 06:12:56 +00:00
bmeurer
f576e29c47 [crankshaft] Fix invalid number truncation assumption on HAdd inputs.
In Crankshaft we don't know reliably know that an HAdd might not turn
into a string addition later (via deoptimization), so we cannot set the
HValue::kAllowUndefinedAsNaN flag on the HAdd instruction in those
cases. It doesn't seem to affect performance if we just remove the flag
completely from the HAdd instruction, so let's stick to that approach
for now.

R=jarin@chromium.org
BUG=v8:5074

Review-Url: https://codereview.chromium.org/2048643002
Cr-Commit-Position: refs/heads/master@{#36805}
2016-06-08 03:56:22 +00:00
v8-autoroll
026ed50506 Update V8 DEPS.
Rolling v8/build to d3b5b6bf460126a9f8b6d883749baac3cebbb449

Rolling v8/buildtools to 8dd3c8e39a48743c4eb790d9a8abe9676b617046

Rolling v8/tools/clang to db6e187140f7b870bdcaab19456193c94d7963bd

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

Review-Url: https://codereview.chromium.org/2045883003
Cr-Commit-Position: refs/heads/master@{#36804}
2016-06-08 03:50:32 +00:00
bmeurer
1729349c4c Revert of [heap] Fix chunk map removal for large objects. (patchset #1 id:1 of https://codereview.chromium.org/2042123003/ )
Reason for revert:
Fails on noi18n debug build (https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20noi18n%20-%20debug/builds/8040/steps/Check/logs/unbox-double-arrays), please take a look.

Original issue's description:
> [heap] Fix chunk map removal for large objects.
>
> BUG=
>
> Committed: https://crrev.com/65dac7f8ead2eb09d417ecaaae0164699edfd510
> Cr-Commit-Position: refs/heads/master@{#36802}

TBR=mlippautz@chromium.org,hpayer@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/2046283002
Cr-Commit-Position: refs/heads/master@{#36803}
2016-06-08 03:50:31 +00:00
hpayer
65dac7f8ea [heap] Fix chunk map removal for large objects.
BUG=

Review-Url: https://codereview.chromium.org/2042123003
Cr-Commit-Position: refs/heads/master@{#36802}
2016-06-07 21:50:43 +00:00
jyan
701f94876c S390: [debug] implement intuitive semantics for stepping over await call.
Port 8d90210a1e

R=yangguo@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com, bjaideep@ca.ibm.com

BUG=v8:4483
LOG=N

Review-Url: https://codereview.chromium.org/2047673003
Cr-Commit-Position: refs/heads/master@{#36801}
2016-06-07 20:17:47 +00:00
ishell
25af5d3d32 [stubs] Enable TurboFan LoadIC dispatcher stub.
Committed: https://crrev.com/46a9322e88de037598cfd1090285375d97b11db2
Review-Url: https://codereview.chromium.org/2033943005
Cr-Original-Commit-Position: refs/heads/master@{#36760}
Cr-Commit-Position: refs/heads/master@{#36800}
2016-06-07 19:09:16 +00:00
machenbach
67af060318 Revert of [heap] Clear out of live range remembered set slots in large objects. (patchset #2 id:20001 of https://codereview.chromium.org/2043713006/ )
Reason for revert:
Fails arm sim:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm%20-%20sim/builds/1012

Original issue's description:
> [heap] Clear out of live range remembered set slots in large objects.
>
> BUG=chromium:617882
> LOG=n
>
> Committed: https://crrev.com/38ad63ff15d7e379423be4c57ae94ae2c9ffb4af
> Cr-Commit-Position: refs/heads/master@{#36795}

TBR=ulan@chromium.org,hpayer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:617882

Review-Url: https://codereview.chromium.org/2042403002
Cr-Commit-Position: refs/heads/master@{#36799}
2016-06-07 18:32:33 +00:00
mlippautz
839f3fd406 Track based on JSArrayBuffer addresses on pages instead of the attached
backing store.

Details of tracking:
- Scavenge: New space pages are processes in bulk on the main thread
- MC: Unswept pages are processed in bulk in parallel. All other pages
  are processed by the sweeper concurrently.

BUG=chromium:611688
LOG=N
TEST=cctest/test-array-buffer-tracker/*
CQ_EXTRA_TRYBOTS=tryserver.v8:v8_linux_arm64_gc_stress_dbg,v8_linux_gc_stress_dbg,v8_mac_gc_stress_dbg,v8_linux64_tsan_rel,v8_mac64_asan_rel

Review-Url: https://codereview.chromium.org/2036643002
Cr-Commit-Position: refs/heads/master@{#36798}
2016-06-07 17:29:35 +00:00
ishell
ba3703db61 [stubs] Fixed PrimaryStubCache and SecondaryStubCache tests for Ignition.
TBR=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2043103002
Cr-Commit-Position: refs/heads/master@{#36797}
2016-06-07 17:29:34 +00:00
bryleun
1f2eaa1c14 S390: Used RISBG in MacroAssembler::IndexToArrayOffset to improve performance.
R=joransiu@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com,jyan@ca.ibm.com

BUG=

Review-Url: https://codereview.chromium.org/2043843002
Cr-Commit-Position: refs/heads/master@{#36796}
2016-06-07 15:21:38 +00:00
hpayer
38ad63ff15 [heap] Clear out of live range remembered set slots in large objects.
BUG=chromium:617882
LOG=n

Review-Url: https://codereview.chromium.org/2043713006
Cr-Commit-Position: refs/heads/master@{#36795}
2016-06-07 15:21:37 +00:00
ishell
bcf3da279f [stubs] Fixed tests that prevented LoadICTF stubs from being enabled.
PrimaryStubCache and SecondaryStubCache: resurrected outdated tests (and enabled stub cache counters in the new LoadIC).
TryProbeStubCache: decreased number of code objects created.

Review-Url: https://codereview.chromium.org/2040193002
Cr-Commit-Position: refs/heads/master@{#36794}
2016-06-07 15:04:49 +00:00
hpayer
2b38d3121b [heap] Unregister shrinked large object memory from chunk map.
BUG=chromium:617883
LOG=n

Review-Url: https://codereview.chromium.org/2046953002
Cr-Commit-Position: refs/heads/master@{#36793}
2016-06-07 15:04:48 +00:00
ishell
7ba12573e0 [stubs] Fix flaky failures of cctest/test-code-stub-assembler/SeededNumberDictionaryLookup.
Dictionary::Add() must not be called for existing keys.

Review-Url: https://codereview.chromium.org/2044003004
Cr-Commit-Position: refs/heads/master@{#36792}
2016-06-07 14:49:13 +00:00
bbudge
9eb756fb30 [arm] Support float registers for moves and swaps.
Uses float registers s0-s31 for moves and swaps when rep is kFloat32.
Changes bitcast to use float registers.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2039843003
Cr-Commit-Position: refs/heads/master@{#36791}
2016-06-07 14:04:32 +00:00
cbruni
d84fe42108 GetHash and friends: return a raw pointer instead of Handle<Smi>
In most cases we return a Smi and undefined for the other cases. Hence there
is no need to handlify the result unecessary. Additionally pass in the isolate
for the hash-symbol lookup.

BUG=

Review-Url: https://codereview.chromium.org/2044843002
Cr-Commit-Position: refs/heads/master@{#36790}
2016-06-07 13:51:30 +00:00
machenbach
d311e1f1e5 [gn] Rework debug configurations
This declares v8_enable_slow_dchecks and v8_optimized_debug
as gn args. It adds support for dcheck_always_on and
debugging with v8_optimized_debug = false.

BUG=chromium:474921
NOTRY=true

Review-Url: https://codereview.chromium.org/2024833002
Cr-Commit-Position: refs/heads/master@{#36789}
2016-06-07 13:44:43 +00:00
ofrobots
2bcbe2fe2d switch perf and ll_prof loggers to line buffering
BUG=v8:5015
R=jarin@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2041243002
Cr-Commit-Position: refs/heads/master@{#36788}
2016-06-07 13:30:56 +00:00
cbruni
764d4e6103 [dictionaries] Use IsKey(Isolate* i, Object* o) everywhere
Using the isolate to check for IsUndefined and IsTheHole is roughly at least
20% faster in the worst-case and up to a factor 2x in the best case.

BUG=

Review-Url: https://codereview.chromium.org/2031533002
Cr-Commit-Position: refs/heads/master@{#36787}
2016-06-07 12:22:42 +00:00
mvstanton
3cfcc7e111 Avoid creating weak cells for literal arrays that are empty of literals.
It may be that we have a feedback vector, but no literals. In this case
we can store into the OptimizedCodeMap directly instead of using a WeakCell,
because all data in the feedback vector is already held weakly.

The use of a WeakCell in the OptimizedCodeMap is only required when
there are literals which may hold maps strongly.

This is to address a performance regression caused by the creation of
a large number of WeakCells.

BUG=chromium:615831

Review-Url: https://codereview.chromium.org/2031123003
Cr-Commit-Position: refs/heads/master@{#36786}
2016-06-07 12:03:56 +00:00
yangguo
2963b5bd40 [json] check and handle interrupts.
R=jkummerow@chromium.org
BUG=chromium:595626

Review-Url: https://codereview.chromium.org/2037363002
Cr-Commit-Position: refs/heads/master@{#36785}
2016-06-07 11:44:42 +00:00
balazs.kilvady
f53d1009e2 MIPS64: Fix 'MIPS: Fix [debug] implement intuitive semantics for stepping over await call.'
Port 941524f895

TEST=mjsunit/harmony/async-debug-*
BUG=

Review-Url: https://codereview.chromium.org/2045923002
Cr-Commit-Position: refs/heads/master@{#36784}
2016-06-07 11:41:58 +00:00
machenbach
d3a43e47dd Revert of [builtins] Properly optimize TypedArray/DataView accessors. (patchset #3 id:40001 of https://codereview.chromium.org/2042013003/ )
Reason for revert:
Blink:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/7296

Original issue's description:
> [builtins] Properly optimize TypedArray/DataView accessors.
>
> The following getters were moved to the TypedArray/DataView prototype
> chain with ES2015, and hence need different treatment now:
>
> - DataView.prototype.buffer
> - DataView.prototype.byteLength
> - DataView.prototype.byteOffset
> - TypedArray.prototype.buffer
> - TypedArray.prototype.byteLength
> - TypedArray.prototype.byteOffset
> - TypedArray.prototype.length
>
> Instead of having special magic on the LoadIC in the IC system and the
> optimizing compilers, as we used to do before (and which we got rid of
> already), we just treat those as normal accessors and make them
> recognizable via the BuiltinFunctionId mechanism. This allows us to
> remove some of the additional magic from the IC subsystem, and just
> extend the BuiltinFunctionId mechanism in Crankshaft slightly to cover
> these cases too (TurboFan doesn't yet support accessors, but that will
> be fixed soonish anyways).
>
> This addresses most of the 15-20% regression we saw on the Octane
> GameBoy emulator benchmark.
>
> BUG=chromium:579905,chromium:593634,v8:4085,v8:5073
> R=yangguo@chromium.org
>
> Committed: https://crrev.com/1ef737026565ea2becc84f30cfd432e581d50c6b
> Cr-Commit-Position: refs/heads/master@{#36782}

TBR=yangguo@chromium.org,bmeurer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:579905,chromium:593634,v8:4085,v8:5073

Review-Url: https://codereview.chromium.org/2039093005
Cr-Commit-Position: refs/heads/master@{#36783}
2016-06-07 11:27:44 +00:00
bmeurer
1ef7370265 [builtins] Properly optimize TypedArray/DataView accessors.
The following getters were moved to the TypedArray/DataView prototype
chain with ES2015, and hence need different treatment now:

- DataView.prototype.buffer
- DataView.prototype.byteLength
- DataView.prototype.byteOffset
- TypedArray.prototype.buffer
- TypedArray.prototype.byteLength
- TypedArray.prototype.byteOffset
- TypedArray.prototype.length

Instead of having special magic on the LoadIC in the IC system and the
optimizing compilers, as we used to do before (and which we got rid of
already), we just treat those as normal accessors and make them
recognizable via the BuiltinFunctionId mechanism. This allows us to
remove some of the additional magic from the IC subsystem, and just
extend the BuiltinFunctionId mechanism in Crankshaft slightly to cover
these cases too (TurboFan doesn't yet support accessors, but that will
be fixed soonish anyways).

This addresses most of the 15-20% regression we saw on the Octane
GameBoy emulator benchmark.

BUG=chromium:579905,chromium:593634,v8:4085,v8:5073
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2042013003
Cr-Commit-Position: refs/heads/master@{#36782}
2016-06-07 09:58:03 +00:00
mstarzinger
ea59da53ba Make api-arguments.h not include inline headers.
This avoids the inclusion of inline headers (i.e. vm-state-inl.h in this
case) in a normal header. There are three more such violations left in
the code-base after this change.

R=verwaest@chromium.org

Review-Url: https://codereview.chromium.org/2039913002
Cr-Commit-Position: refs/heads/master@{#36781}
2016-06-07 09:50:05 +00:00
ishell
3e0be8d7fc [runtime] Don't use ElementsTransitionAndStoreStub for transitions that involve instance rewriting.
BUG=chromium:617524, v8:5009
LOG=Y

Review-Url: https://codereview.chromium.org/2044003003
Cr-Commit-Position: refs/heads/master@{#36780}
2016-06-07 09:50:04 +00:00
titzer
ce291bedd0 [wasm] Dont compute global offsets if the module had errors (e.g. invalid memory type for global).
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=chromium:617884

Review-Url: https://codereview.chromium.org/2044833002
Cr-Commit-Position: refs/heads/master@{#36779}
2016-06-07 09:38:48 +00:00
yangguo
4620e29428 [regexp] disallow regexp property class shorthand syntax for single char.
R=littledan@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2044803003
Cr-Commit-Position: refs/heads/master@{#36778}
2016-06-07 09:14:22 +00:00
machenbach
68e77d2fad [gn] Add extra library files in stand-alone mode.
BUG=chromium:474921
TBR=vogelheim@chromium.org, jochen@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2046683003
Cr-Commit-Position: refs/heads/master@{#36777}
2016-06-07 08:57:44 +00:00
cbruni
991968029c [keys] keep track of the last non-empty prototype
Without the boundary prototypes we have to keep track of all shadowing properties
throughout the complete prototype chain. This contradicts the finding that most
objects have a rather large number of non-enumerable properties on the prototype
chain.

BUG=v8:705, v8:4905, v8:4706

Review-Url: https://codereview.chromium.org/2038043002
Cr-Commit-Position: refs/heads/master@{#36776}
2016-06-07 08:51:36 +00:00
yangguo
85b8c2dc4a Fix observable array access when formatting stack trace.
This is a fix intended to be merged. Ideally messages.js should be rewritten.

R=bmeurer@chromium.org
BUG=chromium:617527

Review-Url: https://codereview.chromium.org/2044823002
Cr-Commit-Position: refs/heads/master@{#36775}
2016-06-07 08:37:48 +00:00
machenbach
a61cae100b [gn] Fix gyp/gn translation of use_snapshot
BUG=chromium:474921
TBR=vogelheim@chromium.org, jochen@chromium.org
NOTRY=true

Review-Url: https://codereview.chromium.org/2041303002
Cr-Commit-Position: refs/heads/master@{#36774}
2016-06-07 08:02:47 +00:00
machenbach
2254abbfe4 [gn] Port exec_script whitelist from chromium/src/build
BUG=chromium:617873
NOTRY=true
TBR=jochen@chromium.org, vogelheim@chromium.org

Review-Url: https://codereview.chromium.org/2046563004
Cr-Commit-Position: refs/heads/master@{#36773}
2016-06-07 07:49:12 +00:00
yangguo
0b65799534 Remove accidentally added files.
These files somehow got added due to some rebase issues I had locally.

R=machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2042203002
Cr-Commit-Position: refs/heads/master@{#36772}
2016-06-07 07:13:53 +00:00
machenbach
688ae58727 [build] Landmine after ndk update.
Bots broke after https://codereview.chromium.org/2040913002/

BUG=chromium:599327
NOTRY=true
NOPRESUBMIT=true
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2044013002
Cr-Commit-Position: refs/heads/master@{#36771}
2016-06-07 06:41:35 +00:00
yangguo
208d2ce882 Fix presubmit check failure.
NOTRY=true
TBR=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2044593003
Cr-Commit-Position: refs/heads/master@{#36770}
2016-06-07 06:38:46 +00:00
Yang Guo
7c3748a9c4 [debug] load correct stack slot for frame details.
R=bmeurer@chromium.org
BUG=v8:5071

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

Cr-Commit-Position: refs/heads/master@{#36769}
2016-06-07 06:25:15 +00:00
bmeurer
dad8ed5342 [turbofan] Only run TypeHintAnalysis when --turbo-type-feedback is on.
There's no point in trying to extract the type hints from the
fullcodegen CompareICs, BinaryOpICs and ToBooleanICs if the
feedback is not consumed (which is guarded by the flag).

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2048543002
Cr-Commit-Position: refs/heads/master@{#36768}
2016-06-07 04:36:49 +00:00
v8-autoroll
90d31f4eb5 Update V8 DEPS.
Rolling v8/build to 274d94c4280f7a4bd0e5747ac4a6ac5d1aedad32

Rolling v8/third_party/android_tools to 5b5f2f60b78198eaef25d442ac60f823142a8a6e

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

Review-Url: https://codereview.chromium.org/2046883002
Cr-Commit-Position: refs/heads/master@{#36767}
2016-06-07 03:26:39 +00:00
gsathya
9b606523b5 Revert of Promises: Make PromiseSet operation monomorphic (patchset #1 id:1 of https://codereview.chromium.org/2025073002/ )
Reason for revert:
As a side effect of calling PromiseSet from
FulfillPromise, clears the deferred symbol and the
resolve/reject callback symbols. Although this
isn't strictly necessary, not doing this seems to
result in a leak as seen in --

https://bugs.chromium.org/p/chromium/issues/detail?id=617137#c10

Original issue's description:
> Promises: Make PromiseSet operation monomorphic
>
> The PromiseSet operation is called with two types of promises
> 1) A newly created promise object with no properties
> 2) Promise object with callbacks and other properties
>
> PromiseSet is called with the first type of promise (with no
> properties) from multiple call sites. PromiseSet is called with the
> second type of promise object only from FulfillPromise. Furthermore,
> this call only sets the value and status of the promise, the rest of
> the values are reset to UNDEFINED (which isn't necessary).
>
> This patch inlines the calls to set the value and status of the
> promise in FulfillPromise, instead of calling out to PromiseSet.
>
> This patch also reduces the number of symbol lookups, as we only set
> the value and status of the promise, and don't change the callback or
> deferred symbols.
>
> This patch results in a performance improvement of 2.8% over 5 runs in
> the bluebird benchmark.
>
> BUG=v8:5046
>
> Committed: https://crrev.com/df4f8a2b9ee9e474e674301718d19b63650a0ba5
> Cr-Commit-Position: refs/heads/master@{#36688}

TBR=littledan@chromium.org,adamk@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=v8:5046

Review-Url: https://codereview.chromium.org/2047553002
Cr-Commit-Position: refs/heads/master@{#36766}
2016-06-06 22:06:44 +00:00
gsathya
41c875a69e Promises: Short circuit promise resolution procedure
When |ResolvePromise| is resolved with a promise that is
already fulfilled or resolved, we can short circuit the
promise resolution procedure by directly looking up the
result from the promise. We save creating two closures, enqueuing in
the promise queue, and running through PromiseThen.

This patch uses IsPromise to check if the |resolution| object is a native
promise and also checks if |resolution.then| hasn't been monkey
patched.

This patch adds some redundant code from PromiseThen like setting
the promiseHasHandlerSymbol and calling PromiseRevokeReject call,
which would've been taken care of by PromiseThen in the old code path.

This patch results in a 13.8% improvement(over 5 runs) in the bluebird
benchmarks.

BUG=v8:5046

Review-Url: https://codereview.chromium.org/2028253004
Cr-Commit-Position: refs/heads/master@{#36765}
2016-06-06 21:38:39 +00:00
adamk
59785f9e64 Revert of [stubs] Enable TurboFan LoadIC dispatcher stub. (patchset #1 id:1 of https://codereview.chromium.org/2033943005/ )
Reason for revert:
Fails cctest consistently on Linux nosnap debug:

https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/7185
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/7186
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap%20-%20debug/builds/7187

Original issue's description:
> [stubs] Enable TurboFan LoadIC dispatcher stub.
>
> Committed: https://crrev.com/46a9322e88de037598cfd1090285375d97b11db2
> Cr-Commit-Position: refs/heads/master@{#36760}

TBR=verwaest@chromium.org,ishell@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2042873002
Cr-Commit-Position: refs/heads/master@{#36764}
2016-06-06 19:10:00 +00:00