Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1942)

Unified Diff: test/mjsunit/regress/regress-crbug-282736.js

Issue 23431029: Properly load transition target descriptor info (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.19
Patch Set: Readding test file Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-crbug-282736.js
diff --git a/test/mjsunit/regress/regress-grow-store-smi-check.js b/test/mjsunit/regress/regress-crbug-282736.js
similarity index 69%
copy from test/mjsunit/regress/regress-grow-store-smi-check.js
copy to test/mjsunit/regress/regress-crbug-282736.js
index 381141d52317c22cf19547a3626280fa2cb1ba9b..afd9f75be42b50c0a2ff5c4158439390b548bd61 100644
--- a/test/mjsunit/regress/regress-grow-store-smi-check.js
+++ b/test/mjsunit/regress/regress-crbug-282736.js
@@ -25,29 +25,35 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
-
-// The below test function was generated from part of a WebKit layout
-// test library setup routine: fast/canvas/webgl/resources/pnglib.js
-
-function test(crc32) {
- for (var i = 0; i < 256; i++) {
- var c = i;
- for (var j = 0; j < 8; j++) {
- if (c & 1) {
- c = -306674912 ^ ((c >> 1) & 0x7fffffff);
- } else {
- c = (c >> 1) & 0x7fffffff;
- }
+function funcify(obj) {
+ var type = typeof obj;
+ if (type === "object") {
+ var funcified = {}, foo = {};
+ for (var prop in obj) {
+ funcified[prop] = funcify(obj[prop]);
+ foo[prop] = true;
}
- crc32[i] = c;
+ return funcified;
+ } else if (type === "function") {
+ return obj;
+ } else {
+ return function () { return obj; };
}
}
-var a = [0.5];
-for (var i = 0; i < 256; ++i) a[i] = i;
+var obj = {};
+
+obj.A = 1;
+obj.B = function () { return 2; };
+obj.C = 3;
+obj.D = 4;
+
+var funcified = funcify(obj);
-test([0.5]);
-test(a);
-%OptimizeFunctionOnNextCall(test);
-test(a);
+assertEquals("function", typeof funcified.A);
+assertEquals(1, funcified.A());
+assertEquals("function", typeof funcified.B);
+assertEquals(2, funcified.B());
+assertEquals("function", typeof funcified.C);
+assertEquals("function", typeof funcified.D);
+assertEquals(4, funcified.D());
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698