Commit Graph

35662 Commits

Author SHA1 Message Date
mstarzinger
a90671f1b9 [interpreter] Fix stack unwinding of deoptimized frames.
This fixes stack unwinding to always recompute the stack pointer for
interpreted frames. For frames materialized by the deoptimizer we elide
the handler frame in between, hence arguments being pushed on the stack
will no longer be pushed into the handler frame but into the interpreted
frame directly.

R=jarin@chromium.org
TEST=mjsunit/regress/regress-crbug-662830
BUG=chromium:662830

Review-Url: https://codereview.chromium.org/2517203003
Cr-Commit-Position: refs/heads/master@{#41170}
2016-11-22 11:28:45 +00:00
bmeurer
84c9360b82 [turbofan] Fix broken effect chain for instanceof.
BUG=chromium:667689
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2518313002
Cr-Commit-Position: refs/heads/master@{#41169}
2016-11-22 11:05:35 +00:00
tebbi
1b320d2039 [cpu-profiler] use new source position information for deoptimization in cpu profiler
The new SourcePosition class allows for precise tracking of source positions including the stack of inlinings. This CL makes the cpu profiler use this new information. Before, the cpu profiler used the deoptimization data to reconstruct the inlining stack. However, optimizing compilers (especially Turbofan) can hoist out checks such that the inlining stack of the deopt reason and the inlining stack of the position the deoptimizer jumps to can be different (the old cpu profiler tests and the ones introduced in this cl produce such situations for turbofan). In this case, relying on the deoptimization info produces paradoxical results, where the reported position is before the function responsible is called. Even worse, https://codereview.chromium.org/2451853002/ combines the precise position with the wrong inlining stack from the deopt info, leading to completely wrong results.

Other changes in this CL:
- DeoptInlinedFrame is no longer needed, because we can compute the correct inlining stack up front.
- I changed the cpu profiler tests back to test situations where deopt checks are hoisted out in Turbofan and made them robust enough to handle the differences between Crankshaft and Turbofan.
- I reversed the order of SourcePosition::InliningStack to make it match the cpu profiler convention.
- I removed CodeDeoptEvent::position, as it is no longer used.

R=alph@chromium.org

BUG=v8:5432

Review-Url: https://codereview.chromium.org/2503393002
Cr-Commit-Position: refs/heads/master@{#41168}
2016-11-22 10:14:59 +00:00
cbruni
e735c5d378 [tools] Add deep links to callstats.html
R=hablich@chromium.org
NOTRY=true
NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2514283003
Cr-Commit-Position: refs/heads/master@{#41167}
2016-11-22 10:13:10 +00:00
bmeurer
6ce39edc86 [ignition] Report NumberOrOddball feedback for relational comparisons.
TurboFan can indeed comsume NumberOrOddball feedback for abstract
relational comparisons, so we should just provide it from Ignition.

Drive-by-fix: Add a DCHECK to protect against abstract/strict equality
number comparison accidentially utilizing Oddball feedback.

BUG=v8:5267,v8:5400
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2518283002
Cr-Commit-Position: refs/heads/master@{#41166}
2016-11-22 09:44:39 +00:00
jbroman
9d524bd33d Fix out-of-range access in unibrow::Utf8::CalculateValue.
This code should not access bytes out of the permitted range in order to check
the range of a possible UTF-8 value. Instead, the length check should occur
before such checks.

BUG=chromium:667260, chromium:662822

Review-Url: https://codereview.chromium.org/2520053003
Cr-Commit-Position: refs/heads/master@{#41165}
2016-11-22 09:27:59 +00:00
yangguo
8c4988f738 [regexp] use C++ API for unicode set over C API.
R=jshin@chromium.org

Review-Url: https://codereview.chromium.org/2514333002
Cr-Commit-Position: refs/heads/master@{#41164}
2016-11-22 07:10:13 +00:00
bmeurer
5d4253ecfb [turbofan] Utilize String comparison feedback.
Make use of the previously introduced String feedback for compare
operations in TurboFan.

R=jarin@chromium.org
BUG=v8:5267,v8:5400

Review-Url: https://codereview.chromium.org/2523463002
Cr-Commit-Position: refs/heads/master@{#41163}
2016-11-22 06:23:26 +00:00
kozyatinskiy
21091c327b [inspector] removed deprecated ScriptOrigin cstor with is_embedder_debug_script
BUG=none
R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2505823002
Cr-Commit-Position: refs/heads/master@{#41162}
2016-11-22 03:46:05 +00:00
pfeldman
f0726837af v8 inspector: do not upon empty object ids in heap profiler.
BUG=chromium:651324

Review-Url: https://codereview.chromium.org/2522593005
Cr-Commit-Position: refs/heads/master@{#41161}
2016-11-22 01:43:11 +00:00
gdeepti
e60e961140 [simd] Disable Simd Scalar lowering for x64, enable tests for all other architectures.
- Simd Scalar lowering should be conditionally disabled if the architecture has a native SIMD implementation.
 - Enable scalar lowering tests on all architectures instead of only x64.

R=bbudge@chromium.org, aseemgarg@chromium.org

Review-Url: https://codereview.chromium.org/2514663002
Cr-Commit-Position: refs/heads/master@{#41160}
2016-11-21 23:03:26 +00:00
mtrofin
71144e5aa6 [turbofan] Use correct block when tracing pending assessments in regalloc verifier
The verifier needs to use the block and assessments in that block corresponding to
a predecessor of a "pending" assessment. Not doing that causes incorrect
assessments when 2 locations are swapped.

BUG=665402

Review-Url: https://codereview.chromium.org/2515803002
Cr-Commit-Position: refs/heads/master@{#41159}
2016-11-21 22:21:14 +00:00
eholk
d0fe942d23 [wasm] Throw a RangeError if Wasm memory could not be allocated.
This fixes a bug found by the fuzzer where we would attempt to
dereference a null handle if memory allocation failed. In this case,
the failure was because the amount of memory requested was above V8's
hardcoded limit.

BUG= https://bugs.chromium.org/p/chromium/issues/detail?id=666741

Review-Url: https://codereview.chromium.org/2514983002
Cr-Commit-Position: refs/heads/master@{#41158}
2016-11-21 21:58:53 +00:00
fedor
66611810e1 [post-mortem] JS_API_OBJECT_TYPE and friends
Export JS_API_OBJECT_TYPE, JS_SPECIAL_API_OBJECT_TYPE.

Exports JSObject::kHeaderSize to ease the inspection of internal fields
in llnode.

BUG=
R=machenbach

Review-Url: https://codereview.chromium.org/2514063002
Cr-Commit-Position: refs/heads/master@{#41157}
2016-11-21 19:33:48 +00:00
thestig
ae0e92219b Properly define v8_enable_inspector and its override in GN.
Instead of directly using v8_enable_inspector_override from
build_overrides/v8.gni in all the GN configs, set a v8_enable_inspector
variable based on v8_enable_inspector_override and use that everywhere.
This is the more common pattern seen in over projects, and reduces the
need to include //build_overrides/v8.gni in many files.

Review-Url: https://codereview.chromium.org/2520683002
Cr-Commit-Position: refs/heads/master@{#41156}
2016-11-21 19:29:38 +00:00
ahaas
480a65738c [wasm] Add a flag to generate an mjsunit test out of a wasm-code fuzzer test case.
R=titzer@chromium.org
CC=mtrofin@chromium.org

Review-Url: https://codereview.chromium.org/2520853003
Cr-Commit-Position: refs/heads/master@{#41155}
2016-11-21 18:00:28 +00:00
titzer
d96131ed9b [d8] Use virtual memory to allocate large array buffers.
R=mstarzinger@chromium.org,clemensh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2520963002
Cr-Commit-Position: refs/heads/master@{#41154}
2016-11-21 17:59:31 +00:00
leszeks
f91178e823 [ignition] Add a reverse bytecode iterator
This pre-calculates and stores a vector of bytecode offsets, and then allows
one to iterate over it backwards. This could probably be adapted to a
bidirectional/random access iterator if we wanted to, but for now reverse
is all we need.

Review-Url: https://codereview.chromium.org/2518003002
Cr-Commit-Position: refs/heads/master@{#41153}
2016-11-21 17:21:13 +00:00
leszeks
ae8a77ea5f [ignition] Refactor array iterator to separate out access
Refactors the bytecode array iterator to separate the iteration and the
bytecode parameter access, placing the latter into a separate
super-class. This will allow us to have other forms of access, e.g.
reverse iteration.

Review-Url: https://codereview.chromium.org/2519923002
Cr-Commit-Position: refs/heads/master@{#41152}
2016-11-21 17:18:51 +00:00
tebbi
744a6f7422 [turbofan] increased precision of range types for bitshifts
BUG=v8:5296

Review-Url: https://codereview.chromium.org/2320753002
Cr-Commit-Position: refs/heads/master@{#41151}
2016-11-21 16:46:20 +00:00
cbruni
10a31136c4 Revert of [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters. (patchset #10 id:180001 of https://codereview.chromium.org/2511093002/ )
Reason for revert:
Wronged it even more.

Original issue's description:
> [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
>
> RuntimeTimerScopes always subtract their own time from the parent timer's
> counter to properly account for the own time. Once a scope is destructed it
> adds it own timer to the current active counter. However, if the current
> counter is changed with CorrectCurrentCounterId we will attribute all the
> subtimers to the previous counter, and add the own time to the new counter.
> This way it is possible to end up with negative times in certain counters but
> the overall would still be correct.
>
> BUG=
>
> Committed: https://crrev.com/f6c74d964d9387df4bed3d8c1ded51eb9e8aa6e8
> Cr-Commit-Position: refs/heads/master@{#41142}

TBR=ishell@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/2519073002
Cr-Commit-Position: refs/heads/master@{#41150}
2016-11-21 16:00:56 +00:00
yangguo
a78a97eb0a [debug-wrapper] migrate debug-backtrace from DCP.
R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2516343003
Cr-Commit-Position: refs/heads/master@{#41149}
2016-11-21 15:19:12 +00:00
gsathya
5e5e87963f [promises] Do not export GlobalPromise
This is unused.

BUG=v8:5343
TBR=littledan@chromium.org

Review-Url: https://codereview.chromium.org/2513413002
Cr-Commit-Position: refs/heads/master@{#41148}
2016-11-21 15:00:51 +00:00
verwaest
768f22f6f6 [parser] Keep track of whether we are in a temp-zone in the parser, and don't lazy parse anymore once we are
This avoids entering a nested temp zone, and fixes up tracing and runtime callstats names.

BUG=

Review-Url: https://codereview.chromium.org/2514353002
Cr-Commit-Position: refs/heads/master@{#41147}
2016-11-21 14:59:02 +00:00
yangguo
330ecc82cb [debugger] remove obsolete test.
This test tests a code path that's being deprecated. There is no point
in migrating it to the new debugger API.

R=jgruber@chromium.org
BUG=v8:5530

Review-Url: https://codereview.chromium.org/2519033002
Cr-Commit-Position: refs/heads/master@{#41146}
2016-11-21 14:32:41 +00:00
marja
0c92a6eb2b Scope cleanup: remove unneeded params.
BUG=

Review-Url: https://codereview.chromium.org/2517993002
Cr-Commit-Position: refs/heads/master@{#41145}
2016-11-21 14:24:19 +00:00
mstarzinger
2e5a90fd02 [test] Run module tests in all variants.
By now the compilation pipeline is flexible enough to run module tests
against all variants, we should no longer choose unsupported compilers
for modules. It also fixes the predicate checking for functions being
"resumable" in the {AstNumberingVisitor} heuristic.

R=neis@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2517143002
Cr-Commit-Position: refs/heads/master@{#41144}
2016-11-21 14:18:28 +00:00
ivica.bogosavljevic
591a7ce05b MIPS[64]: Disable Add/Shl to Lsa optimization if operand is immediate
Add/Shl to Lsa optimization doesn't yield any performance increase in case
one of the operand is immediate, because Lsa cannot use the immediate so
we use an extra instruction to load the immediate to register. On MIPSR2 and
less this optimization leads to performance degradation, since Lsa is not
supported on these architectures and it is emulated using Add/Shl which
do support immediate as operand for Add.

BUG=

Review-Url: https://codereview.chromium.org/2509203003
Cr-Commit-Position: refs/heads/master@{#41143}
2016-11-21 14:04:41 +00:00
cbruni
f6c74d964d [counters] RuntimeStats: fix wrong bookkeeping when dynamically changing counters
RuntimeTimerScopes always subtract their own time from the parent timer's
counter to properly account for the own time. Once a scope is destructed it
adds it own timer to the current active counter. However, if the current
counter is changed with CorrectCurrentCounterId we will attribute all the
subtimers to the previous counter, and add the own time to the new counter.
This way it is possible to end up with negative times in certain counters but
the overall would still be correct.

BUG=

Review-Url: https://codereview.chromium.org/2511093002
Cr-Commit-Position: refs/heads/master@{#41142}
2016-11-21 13:45:29 +00:00
hablich
da783fa1ff Revert of [turbofan] Introduce LoadFunctionPrototype simplified operator. (patchset #1 id:1 of https://codereview.chromium.org/2517913002/ )
Reason for revert:
Blocks roll https://codereview.chromium.org/2517963002/

Original issue's description:
> [turbofan] Introduce LoadFunctionPrototype simplified operator.
>
> Add a LoadFunctionPrototype simplified operator, similar to what
> Crankshaft has, that loads the prototype property of a constructor
> function.
>
> R=jarin@chromium.org
> BUG=v8:5267
>
> Committed: https://crrev.com/1737b2c74b50168e96ef1263def0eb43505fa80c
> Cr-Commit-Position: refs/heads/master@{#41127}

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

Review-Url: https://codereview.chromium.org/2514363002
Cr-Commit-Position: refs/heads/master@{#41141}
2016-11-21 13:32:41 +00:00
mstarzinger
71c5904fb7 [runtime] Rename {JSGeneratorObject::operand_stack} field.
This renames the {operand_stack} field to {register_file}, to refelct
how said field is used on all {JSGeneratorObject} instances by now. This
is a pure refactoring CL, not changes in semantics.

R=neis@chromium.org

Review-Url: https://codereview.chromium.org/2520913002
Cr-Commit-Position: refs/heads/master@{#41140}
2016-11-21 13:31:35 +00:00
yangguo
5ebde77e3b [debugger] handle stack overflow. Fail silently.
R=jgruber@chromium.org
BUG=v8:5654

Review-Url: https://codereview.chromium.org/2511733002
Cr-Commit-Position: refs/heads/master@{#41139}
2016-11-21 13:28:37 +00:00
verwaest
4097c8503e [zone] Fix zone segment pooling size limits
BUG=chromium:655129

Review-Url: https://codereview.chromium.org/2520903002
Cr-Commit-Position: refs/heads/master@{#41138}
2016-11-21 13:22:29 +00:00
mstarzinger
2405ab11b5 [runtime] Ensure {JSGeneratorObject} is created for bytecode.
This removes some outdated code that allocates a {JSGeneratorObject} for
baseline code. We no longer support such a representation of generators
and can rely on bytecode being available for all generators.

R=neis@chromium.org

Review-Url: https://codereview.chromium.org/2515253003
Cr-Commit-Position: refs/heads/master@{#41137}
2016-11-21 13:02:32 +00:00
ishell
8ca50a8862 [ic] Ensure prototype validity cell guards global object's prototype changes for LoadGlobalIC.
BUG=chromium:666742, v8:5561

Review-Url: https://codereview.chromium.org/2512183002
Cr-Commit-Position: refs/heads/master@{#41136}
2016-11-21 12:46:44 +00:00
mstarzinger
0925554111 [fullcodegen] Remove deprecated generator implementation.
This removes the deprecated generator support for resumable functions
from {FullCodeGenerator}. The existing {AstNumbering} heuristic already
triggers Ignition for most resumable functions, with this change we make
said heuristic a hard choice and remove the deprecated code. This also
has the advantage that any suspended {JSGeneratorObject} instance on the
heap is guaranteed to have code based on a bytecode array.

R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2504223002
Cr-Commit-Position: refs/heads/master@{#41135}
2016-11-21 12:25:38 +00:00
rmcilroy
bd93fa6ee2 Revert of [Interpreter] Collect NumberOrOddball feedback in CompareOps. (patchset #2 id:20001 of https://codereview.chromium.org/2506283003/ )
Reason for revert:
Turbofan doesn't do proper ToNumber conversions on NumberOrOddball equality conversions.

BUG=v8:5660

Original issue's description:
> [Interpreter] Collect NumberOrOddball feedback in CompareOps.
>
> Collect feedback for oddballs in the interpreter compare operations handlers.
> This is important to ensure that we don't consider oddball comparisons as
> generic, which prevents optimization.
>
> BUG=chromium:660947
>
> Committed: https://crrev.com/721e74d9d942fd4f2e3392ea9626d9d404dbbbd0
> Cr-Commit-Position: refs/heads/master@{#41081}

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

Review-Url: https://codereview.chromium.org/2517133002
Cr-Commit-Position: refs/heads/master@{#41134}
2016-11-21 12:14:49 +00:00
ishell
4513532f63 [ic] Don't check full prototype chain if name is a private symbol.
BUG=chromium:664974, chromium:664802, v8:5561

Review-Url: https://codereview.chromium.org/2513893003
Cr-Commit-Position: refs/heads/master@{#41133}
2016-11-21 11:21:43 +00:00
yangguo
416e423fdb [debugger] step-next across yield should not leave the generator.
Stepping in a generator now behaves similar to stepping inside an
async function. Stepping in or next at a yield expression will result in
a break inside the same generator when we return to the generator.
Behavior of step-out does not change.

R=jgruber@chromium.org, neis@chromium.org
BUG=chromium:496865

Review-Url: https://codereview.chromium.org/2519853002
Cr-Commit-Position: refs/heads/master@{#41132}
2016-11-21 11:05:08 +00:00
zhengxing.li
b94b53a28c X87:[test] Disables 2 test cases for x87.
The reason:
  The CL #40862 (https://codereview.chromium.org/2433093002 ) caused 2 test cases failed for X87.
  Because Both 2 test cases (MoveOptimizerTest.RemovesRedundantExplicit and RegisterAllocatorTest.CanAllocateFPRegisters)
  needs 2 allocatable Float/Double registers.
  But there's only 1 allocatable Float/Double register in x87 turbofan compiler, i.e.: register index 0.

  This CL disables MoveOptimizerTest.RemovesRedundantExplicit and RegisterAllocatorTest.CanAllocateFPRegisters test cases for x87.

BUG=

Review-Url: https://codereview.chromium.org/2520623005
Cr-Commit-Position: refs/heads/master@{#41131}
2016-11-21 10:50:25 +00:00
ishell
7d61ddfa91 [ic] Remove names table from type feedback metadata.
BUG=chromium:576312, v8:5561

Review-Url: https://codereview.chromium.org/2515233002
Cr-Commit-Position: refs/heads/master@{#41130}
2016-11-21 10:46:16 +00:00
jgruber
1834ab7246 [debug-wrapper] Adapt tests, breakpoint.actual_location
Adapted various tests to restrictions of inspector protocol:

* osr-typing-debug-change: Don't set function variable value.
* debug-evaluate-locals: Add variable introduced by eval, run typeof
  inside evaluate().
* regress-419663: Don't set duplicate breakpoints.
* regress-crbug-465298: Compare against function name instead of value.
* regress-crbug-621361: Make evaluate return string results.
* debug-script: Various counts were off due to new way tests are called.
                Added new inspector script type.

Breakpoints now contain the actual break position, and remote object
reconstruction has been extended a bit.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2505363002
Cr-Commit-Position: refs/heads/master@{#41129}
2016-11-21 09:29:17 +00:00
bmeurer
bd25a33129 [turbofan] Remove useless implication.
Since loop peeling was shipped, there's no need to have the implication
from --turbo to --turbo-loop-peeling.

BUG=v8:5267
TBR=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2517073002
Cr-Commit-Position: refs/heads/master@{#41128}
2016-11-21 08:13:32 +00:00
bmeurer
1737b2c74b [turbofan] Introduce LoadFunctionPrototype simplified operator.
Add a LoadFunctionPrototype simplified operator, similar to what
Crankshaft has, that loads the prototype property of a constructor
function.

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

Review-Url: https://codereview.chromium.org/2517913002
Cr-Commit-Position: refs/heads/master@{#41127}
2016-11-21 07:32:36 +00:00
franzih
f31e80548c [test] Add array destructuring micro-benchmarks.
Add array pattern destructuring micro-benchmarks. These benchmarks compare
a naive ES5 immplementation to an ES6-style implementation that uses
destructuring.

Adapted from http://kpdecker.github.io/six-speed

BUG=v8:5267

Review-Url: https://codereview.chromium.org/2513273002
Cr-Commit-Position: refs/heads/master@{#41126}
2016-11-20 20:07:47 +00:00
Andrii Shyshkalov
28122e6802 Whitespace: manual land works too.
TBR=machenbach@chromium.org
BUG=

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

Cr-Original-Funny-Footer: should become original.
Cr-Commit-Position: refs/heads/master@{#41125}
2016-11-20 19:39:35 +00:00
tandrii
700f94331f Whitespace change: CQ still works.
TBR=machenbach@chromium.org
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.chromium.org/2518883002
Cr-Commit-Position: refs/heads/master@{#41124}
2016-11-20 19:32:17 +00:00
caitp
d59c2cf1b4 [builtins] add CodeStubAssembler::IsDebugActive() helper
Utility used by Promise builtins implemented in TFJ/TFS

BUG=v8:5046
R=bmeurer@chromium.org, gsathya@chromium.org, yangguo@chromium.org, adamk@chromium.org

Review-Url: https://codereview.chromium.org/2517823002
Cr-Commit-Position: refs/heads/master@{#41123}
2016-11-20 17:57:10 +00:00
machenbach
682f6500ee Revert of [wasm] WebAssembly.Memory object can be referenced by multiple Instance objects. (patchset #10 id:180001 of https://codereview.chromium.org/2471883003/ )
Reason for revert:
Breaks gc stress:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20gc%20stress/builds/7114

Original issue's description:
> [wasm] WebAssembly.Memory object can be referenced by multiple Instance objects.
>
> Add support for WebAssembly.Memory objects to be simultaneously referenced by multiple Instance objects. GrowingMemory should maintain a consistent view of memory across instances.
>  - Store a link to instances that share WebAssembly.Memory in the WasmMemoryObject, updated on instantiate.
>  - Implement WasmInstanceWrapper as a wrapper around the instance object to keep track of previous/next instances, instance object is stored as a WeakCell that can be garbage collected.
>  - MemoryInstanceFinalizer maintains a valid list of instances when an instance is garbage collected.
>  - Refactor GrowInstanceMemory to GrowMemoryBuffer that allocates a new buffer, and UncheckedUpdateInstanceMemory that updates memory references for an instance.
>
>  R=titzer@chromium.org, mtrofin@chromium.org, bradnelson@chromium.org
>
> Committed: https://crrev.com/30ef8e33f3a199a27ca8512bcee314c9522d03f6
> Cr-Commit-Position: refs/heads/master@{#41121}

TBR=bradnelson@chromium.org,mtrofin@chromium.org,titzer@chromium.org,gdeepti@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/2512323004
Cr-Commit-Position: refs/heads/master@{#41122}
2016-11-19 13:39:49 +00:00
gdeepti
30ef8e33f3 [wasm] WebAssembly.Memory object can be referenced by multiple Instance objects.
Add support for WebAssembly.Memory objects to be simultaneously referenced by multiple Instance objects. GrowingMemory should maintain a consistent view of memory across instances.
 - Store a link to instances that share WebAssembly.Memory in the WasmMemoryObject, updated on instantiate.
 - Implement WasmInstanceWrapper as a wrapper around the instance object to keep track of previous/next instances, instance object is stored as a WeakCell that can be garbage collected.
 - MemoryInstanceFinalizer maintains a valid list of instances when an instance is garbage collected.
 - Refactor GrowInstanceMemory to GrowMemoryBuffer that allocates a new buffer, and UncheckedUpdateInstanceMemory that updates memory references for an instance.

 R=titzer@chromium.org, mtrofin@chromium.org, bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2471883003
Cr-Commit-Position: refs/heads/master@{#41121}
2016-11-19 03:31:35 +00:00