mirrored from https://chromium.googlesource.com/v8/v8.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged: [wasm] Avoid js-typed-lowering optimization for wasm Memory o…
…bjects Revision: 82503e9 BUG=chromium:717194 LOG=N NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true R=bradnelson@chromium.org Change-Id: Iddb18b3933f53839ee08b56a7873668a2610dda1 Reviewed-on: https://chromium-review.googlesource.com/501467 Commit-Queue: Brad Nelson <bradnelson@chromium.org> Reviewed-by: Brad Nelson <bradnelson@chromium.org> Cr-Commit-Position: refs/branch-heads/5.9@{#39} Cr-Branched-From: fe9bb7e-refs/heads/5.9.211@{#1} Cr-Branched-From: 70ad237-refs/heads/master@{#44591}
- Loading branch information
Showing
5 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2017 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
PAGE_SIZE = 0x10000; | ||
PAGES = 10; | ||
|
||
memory = new WebAssembly.Memory({initial: PAGES}); | ||
buffer = memory.buffer; | ||
|
||
var func = (function (stdlib, env, heap) { | ||
"use asm"; | ||
|
||
var array = new stdlib.Int32Array(heap); | ||
|
||
return function () { | ||
array[0] = 0x41424344; | ||
array[1] = 0x45464748; | ||
} | ||
}({Int32Array: Int32Array}, {}, buffer)); | ||
|
||
for (var i = 0; i < 1000; ++i) | ||
func(); | ||
|
||
memory.grow(1); | ||
|
||
func(); | ||
|
||
for(var i = 0; i < 2; ++i) | ||
new ArrayBuffer(PAGE_SIZE * PAGES); |