-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #1224 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
- Loading branch information
1 parent
9705a34
commit fe4434b
Showing
10 changed files
with
126 additions
and
66 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,7 @@ Jan de Mooij <[email protected]> | |
Jay Freeman <[email protected]> | ||
James Pike <[email protected]> | ||
Joel Stanley <[email protected]> | ||
Johan Bergström <[email protected]> | ||
John Jozwiak <[email protected]> | ||
Jonathan Liu <[email protected]> | ||
Kun Zhang <[email protected]> | ||
|
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,20 @@ | ||
// Copyright 2015 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. | ||
|
||
#ifndef V8_INCLUDE_VERSION_H_ // V8_VERSION_H_ conflicts with src/version.h | ||
#define V8_INCLUDE_VERSION_H_ | ||
|
||
// These macros define the version number for the current version. | ||
// NOTE these macros are used by some of the tool scripts and the build | ||
// system so their names cannot be changed without changing the scripts. | ||
#define V8_MAJOR_VERSION 4 | ||
#define V8_MINOR_VERSION 1 | ||
#define V8_BUILD_NUMBER 0 | ||
#define V8_PATCH_LEVEL 25 | ||
|
||
// Use 1 for candidates and 0 otherwise. | ||
// (Boolean macro values are not supported by all preprocessors.) | ||
#define V8_IS_CANDIDATE_VERSION 0 | ||
|
||
#endif // V8_INCLUDE_VERSION_H_ |
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
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,35 @@ | ||
// Copyright 2015 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. | ||
|
||
// Flags: --allow-natives-syntax | ||
|
||
function boom(a1, a2) { | ||
// Do something with a2 that needs a map check (for DOUBLE_ELEMENTS). | ||
var s = a2[0]; | ||
// Emit a load that transitions a1 to FAST_ELEMENTS. | ||
var t = a1[0]; | ||
// Emit a store to a2 that assumes DOUBLE_ELEMENTS. | ||
// The map check is considered redundant and will be eliminated. | ||
a2[0] = 0.3; | ||
} | ||
|
||
// Prepare type feedback for the "t = a1[0]" load: fast elements. | ||
var fast_elem = new Array(1); | ||
fast_elem[0] = "tagged"; | ||
boom(fast_elem, [1]); | ||
|
||
// Prepare type feedback for the "a2[0] = 0.3" store: double elements. | ||
var double_elem = new Array(1); | ||
double_elem[0] = 0.1; | ||
boom(double_elem, double_elem); | ||
|
||
// Reset |double_elem| and go have a party. | ||
double_elem = new Array(10); | ||
double_elem[0] = 0.1; | ||
|
||
%OptimizeFunctionOnNextCall(boom); | ||
boom(double_elem, double_elem); | ||
|
||
assertEquals(0.3, double_elem[0]); | ||
assertEquals(undefined, double_elem[1]); |
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,22 @@ | ||
// Copyright 2015 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. | ||
|
||
// Flags: --allow-natives-syntax | ||
|
||
function f(a1, a2) { | ||
var v7 = a2[0]; | ||
var v8 = a1[0]; | ||
a2[0] = 0.3; | ||
} | ||
v6 = new Array(1); | ||
v6[0] = "tagged"; | ||
f(v6, [1]); | ||
v5 = new Array(1); | ||
v5[0] = 0.1; | ||
f(v5, v5); | ||
v5 = new Array(10); | ||
f(v5, v5); | ||
%OptimizeFunctionOnNextCall(f); | ||
f(v5, v5); | ||
v5[0]; |