| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1ed0c77 commit 97c0880
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ | |||
| 11 | 11 | #define V8_MAJOR_VERSION 6 | |
| 12 | 12 | #define V8_MINOR_VERSION 1 | |
| 13 | 13 | #define V8_BUILD_NUMBER 534 | |
| 14 | - #define V8_PATCH_LEVEL 38 | ||
| 14 | + #define V8_PATCH_LEVEL 42 | ||
| 15 | 15 | ||
| 16 | 16 | // Use 1 for candidates and 0 otherwise. | |
| 17 | 17 | // (Boolean macro values are not supported by all preprocessors.) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -340,11 +340,7 @@ void RelocInfo::update_wasm_function_table_size_reference( | |||
| 340 | 340 | Isolate* isolate, uint32_t old_size, uint32_t new_size, | |
| 341 | 341 | ICacheFlushMode icache_flush_mode) { | |
| 342 | 342 | DCHECK(IsWasmFunctionTableSizeReference(rmode_)); | |
| 343 | - uint32_t current_size_reference = wasm_function_table_size_reference(); | ||
| 344 | - uint32_t updated_size_reference = | ||
| 345 | - new_size + (current_size_reference - old_size); | ||
| 346 | - unchecked_update_wasm_size(isolate, updated_size_reference, | ||
| 347 | - icache_flush_mode); | ||
| 343 | + unchecked_update_wasm_size(isolate, new_size, icache_flush_mode); | ||
| 348 | 344 | } | |
| 349 | 345 | ||
| 350 | 346 | void RelocInfo::set_target_address(Isolate* isolate, Address target, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1450,7 +1450,7 @@ Type* Typer::Visitor::JSCallTyper(Type* fun, Typer* t) { | |||
| 1450 | 1450 | return Type::String(); | |
| 1451 | 1451 | case kStringIndexOf: | |
| 1452 | 1452 | case kStringLastIndexOf: | |
| 1453 | - return Type::Range(-1.0, String::kMaxLength - 1.0, t->zone()); | ||
| 1453 | + return Type::Range(-1.0, String::kMaxLength, t->zone()); | ||
| 1454 | 1454 | case kStringEndsWith: | |
| 1455 | 1455 | case kStringIncludes: | |
| 1456 | 1456 | return Type::Boolean(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -465,7 +465,7 @@ DEFINE_BOOL(turbo_loop_peeling, true, "Turbofan loop peeling") | |||
| 465 | 465 | DEFINE_BOOL(turbo_loop_variable, true, "Turbofan loop variable optimization") | |
| 466 | 466 | DEFINE_BOOL(turbo_cf_optimization, true, "optimize control flow in TurboFan") | |
| 467 | 467 | DEFINE_BOOL(turbo_frame_elision, true, "elide frames in TurboFan") | |
| 468 | - DEFINE_BOOL(turbo_escape, true, "enable escape analysis") | ||
| 468 | + DEFINE_BOOL(turbo_escape, false, "enable escape analysis") | ||
| 469 | 469 | DEFINE_BOOL(turbo_instruction_scheduling, false, | |
| 470 | 470 | "enable instruction scheduling in TurboFan") | |
| 471 | 471 | DEFINE_BOOL(turbo_stress_instruction_scheduling, false, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + // Copyright 2017 the V8 project authors. All rights reserved. | ||
| 2 | + // Use of this source code is governed by a BSD-style license that can be | ||
| 3 | + // found in the LICENSE file. | ||
| 4 | + | ||
| 5 | + // Flags: --allow-natives-syntax | ||
| 6 | + | ||
| 7 | + const maxLength = 268435440; | ||
| 8 | + const s = 'A'.repeat(maxLength); | ||
| 9 | + | ||
| 10 | + function foo(s) { | ||
| 11 | + let x = s.indexOf("", maxLength); | ||
| 12 | + return x === maxLength; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + assertTrue(foo(s)); | ||
| 16 | + assertTrue(foo(s)); | ||
| 17 | + %OptimizeFunctionOnNextCall(foo); | ||
| 18 | + assertTrue(foo(s)); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,18 @@ | |||
| 1 | + // Copyright 2017 the V8 project authors. All rights reserved. | ||
| 2 | + // Use of this source code is governed by a BSD-style license that can be | ||
| 3 | + // found in the LICENSE file. | ||
| 4 | + | ||
| 5 | + // Flags: --allow-natives-syntax | ||
| 6 | + | ||
| 7 | + const maxLength = 268435440; | ||
| 8 | + const s = 'A'.repeat(maxLength); | ||
| 9 | + | ||
| 10 | + function foo(s) { | ||
| 11 | + let x = s.lastIndexOf("", maxLength); | ||
| 12 | + return x === maxLength; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + assertTrue(foo(s)); | ||
| 16 | + assertTrue(foo(s)); | ||
| 17 | + %OptimizeFunctionOnNextCall(foo); | ||
| 18 | + assertTrue(foo(s)); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,33 @@ | |||
| 1 | + // Copyright 2017 the V8 project authors. All rights reserved. | ||
| 2 | + // Use of this source code is governed by a BSD-style license that can be | ||
| 3 | + // found in the LICENSE file. | ||
| 4 | + | ||
| 5 | + // Flags: --expose-wasm | ||
| 6 | + | ||
| 7 | + 'use strict'; | ||
| 8 | + | ||
| 9 | + load("test/mjsunit/wasm/wasm-constants.js"); | ||
| 10 | + load("test/mjsunit/wasm/wasm-module-builder.js"); | ||
| 11 | + | ||
| 12 | + var builder = new WasmModuleBuilder(); | ||
| 13 | + builder.addImportedTable("x", "table", 1, 10000000); | ||
| 14 | + builder.addFunction("main", kSig_i_i) | ||
| 15 | + .addBody([ | ||
| 16 | + kExprI32Const, 0, | ||
| 17 | + kExprGetLocal, 0, | ||
| 18 | + kExprCallIndirect, 0, kTableZero]) | ||
| 19 | + .exportAs("main"); | ||
| 20 | + let module = new WebAssembly.Module(builder.toBuffer()); | ||
| 21 | + let table = new WebAssembly.Table({element: "anyfunc", | ||
| 22 | + initial: 1, maximum:1000000}); | ||
| 23 | + let instance = new WebAssembly.Instance(module, {x: {table:table}}); | ||
| 24 | + | ||
| 25 | + table.grow(0x40001); | ||
| 26 | + | ||
| 27 | + let instance2 = new WebAssembly.Instance(module, {x: {table:table}}); | ||
| 28 | + | ||
| 29 | + try { | ||
| 30 | + instance2.exports.main(402982); // should be OOB | ||
| 31 | + } catch (e) { | ||
| 32 | + print("Correctly caught: ", e); | ||
| 33 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments