nashorn/test/script/basic/JDK-8134569.js
author hannesw
Fri, 03 Feb 2017 13:28:00 +0100
changeset 43555 1bb10bccf057
parent 32695 9b708b92c695
permissions -rw-r--r--
8173888: Test for JDK-8169481 causes stack overflows in parser tests Reviewed-by: jlaskey, sundar
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     1
/*
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     4
 * 
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     7
 * published by the Free Software Foundation.
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     8
 * 
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    13
 * accompanied this code).
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    14
 * 
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    18
 * 
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    21
 * questions.
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    22
 */
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    23
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    24
/**
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    25
 * JDK-8134569: Add tests for prototype callsites
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    26
 *
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    27
 * @test
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    28
 * @run
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    29
 */
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    30
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    31
function create() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    32
    function C() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    33
        this.i1 = 1;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    34
        this.i2 = 2;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    35
        this.i3 = 3;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    36
        return this;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    37
    }
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    38
    return new C();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    39
}
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    40
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    41
function createEmpty() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    42
    function C() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    43
        return this;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    44
    }
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    45
    return new C();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    46
}
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    47
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    48
function createDeep() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    49
    function C() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    50
        this.i1 = 1;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    51
        this.i2 = 2;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    52
        this.i3 = 3;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    53
        return this;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    54
    }
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    55
    function D() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    56
        this.p1 = 1;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    57
        this.p2 = 2;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    58
        this.p3 = 3;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    59
        return this;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    60
    }
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    61
    C.prototype = new D();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    62
    return new C();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    63
}
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    64
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    65
function createDeeper() {
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    66
    function C() {
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    67
        this.i1 = 1;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    68
        this.i2 = 2;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    69
        this.i3 = 3;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    70
        return this;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    71
    }
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    72
    function D() {
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    73
        this.p1 = 1;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    74
        this.p2 = 2;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    75
        this.p3 = 3;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    76
        return this;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    77
    }
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    78
    function E() {
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    79
        this.e1 = 1;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    80
        this.e2 = 2;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    81
        this.e3 = 3;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    82
        return this;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    83
    }
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    84
    D.prototype = new E();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    85
    C.prototype = new D();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    86
    return new C();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    87
}
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    88
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    89
function createEval() {
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    90
    return eval("Object.create({})");
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    91
}
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    92
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    93
function p(o) { print(o.x) }
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    94
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    95
function e(o) { print(o.e1) }
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    96
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
    97
var a, b, c;
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    98
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
    99
create();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   100
a = create();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   101
b = create();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   102
c = create();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   103
a.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   104
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   105
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   106
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   107
p(c);
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   108
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   109
a = create();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   110
b = create();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   111
c = create();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   112
b.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   113
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   114
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   115
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   116
p(c);
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   117
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   118
a = createEmpty();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   119
b = createEmpty();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   120
c = createEmpty();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   121
a.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   122
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   123
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   124
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   125
p(c);
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   126
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   127
a = createEmpty();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   128
b = createEmpty();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   129
c = createEmpty();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   130
b.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   131
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   132
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   133
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   134
p(c);
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   135
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   136
a = createDeep();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   137
b = createDeep();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   138
c = createDeep();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   139
a.__proto__.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   140
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   141
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   142
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   143
p(c);
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   144
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   145
a = createDeep();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   146
b = createDeep();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   147
c = createDeep();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   148
b.__proto__.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   149
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   150
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   151
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   152
p(c);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   153
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   154
a = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   155
b = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   156
c = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   157
a.__proto__.__proto__.__proto__.x = 123;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   158
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   159
p(a);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   160
p(b);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   161
p(c);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   162
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   163
a = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   164
b = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   165
c = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   166
b.__proto__.__proto__.__proto__.x = 123;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   167
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   168
p(a);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   169
p(b);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   170
p(c);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   171
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   172
a = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   173
b = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   174
c = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   175
a.__proto__.__proto__ = null;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   176
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   177
e(a);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   178
e(b);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   179
e(c);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   180
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   181
a = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   182
b = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   183
c = createDeeper();
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   184
b.__proto__.__proto__ = null;
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   185
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   186
e(a);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   187
e(b);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   188
e(c);
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   189
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   190
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   191
a = createEval();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   192
b = createEval();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   193
c = createEval();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   194
a.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   195
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   196
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   197
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   198
p(c);
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   199
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   200
a = createEval();
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   201
b = createEval();
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   202
c = createEval();
32529
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   203
b.__proto__.x = 123;
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   204
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   205
p(a);
5dbfbb64eab7 8134569: Add tests for prototype callsites
hannesw
parents:
diff changeset
   206
p(b);
32695
9b708b92c695 8134609: Allow constructors with same prototoype map to share the allocator map
hannesw
parents: 32529
diff changeset
   207
p(c);