jdk/test/java/lang/invoke/ClassValueTest.java
author henryjen
Mon, 12 Aug 2013 12:11:04 -0700
changeset 19388 188246066dbb
parent 14342 8435a30053c1
child 21596 0e3a39f29dbc
permissions -rw-r--r--
8022749: Convert junit tests to testng in test/java/lang/invoke Reviewed-by: mduigou, alanb Contributed-by: Mani Sarkar <sadhak001@gmail.com>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     1
/*
14342
8435a30053c1 7197491: update copyright year to match last edit in jdk8 jdk repository
alanb
parents: 11536
diff changeset
     2
 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     4
 *
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    10
 *
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    15
 * accompanied this code).
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    16
 *
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    20
 *
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    23
 * questions.
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    24
 */
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    25
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    26
/* @test
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    27
 * @summary tests for class-specific values
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    28
 * @compile ClassValueTest.java
19388
188246066dbb 8022749: Convert junit tests to testng in test/java/lang/invoke
henryjen
parents: 14342
diff changeset
    29
 * @run testng/othervm test.java.lang.invoke.ClassValueTest
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    30
 */
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    31
8822
8145ab9f5f86 7012648: move JSR 292 to package java.lang.invoke and adjust names
jrose
parents: 7562
diff changeset
    32
package test.java.lang.invoke;
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    33
19388
188246066dbb 8022749: Convert junit tests to testng in test/java/lang/invoke
henryjen
parents: 14342
diff changeset
    34
import org.testng.*;
188246066dbb 8022749: Convert junit tests to testng in test/java/lang/invoke
henryjen
parents: 14342
diff changeset
    35
import static org.testng.AssertJUnit.*;
188246066dbb 8022749: Convert junit tests to testng in test/java/lang/invoke
henryjen
parents: 14342
diff changeset
    36
import org.testng.annotations.*;
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    37
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    38
/**
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    39
 * @author jrose
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    40
 */
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    41
public class ClassValueTest {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    42
    static String nameForCV1(Class<?> type) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    43
        return "CV1:" + type.getName();
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    44
    }
9146
8f574b2bae87 7019529: JSR292: java/dyn/ClassValueTest.java depends on sub-test execution order
jrose
parents: 8822
diff changeset
    45
    int countForCV1;
8f574b2bae87 7019529: JSR292: java/dyn/ClassValueTest.java depends on sub-test execution order
jrose
parents: 8822
diff changeset
    46
    final ClassValue<String> CV1 = new CV1();
8f574b2bae87 7019529: JSR292: java/dyn/ClassValueTest.java depends on sub-test execution order
jrose
parents: 8822
diff changeset
    47
    private class CV1 extends ClassValue<String> {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    48
        protected String computeValue(Class<?> type) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    49
            countForCV1++;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    50
            return nameForCV1(type);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    51
        }
7562
a0ad195efe2c 7001424: implement JSR 292 EG adjustments, November 2010
jrose
parents: 7054
diff changeset
    52
    }
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    53
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
    54
    static final Class<?>[] CLASSES = {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    55
        String.class,
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    56
        Integer.class,
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    57
        int.class,
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    58
        boolean[].class,
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    59
        char[][].class,
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    60
        ClassValueTest.class
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    61
    };
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    62
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    63
    @Test
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    64
    public void testGet() {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    65
        countForCV1 = 0;
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
    66
        for (Class<?> c : CLASSES) {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    67
            assertEquals(nameForCV1(c), CV1.get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    68
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    69
        assertEquals(CLASSES.length, countForCV1);
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
    70
        for (Class<?> c : CLASSES) {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    71
            assertEquals(nameForCV1(c), CV1.get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    72
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    73
        assertEquals(CLASSES.length, countForCV1);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    74
    }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    75
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    76
    @Test
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    77
    public void testRemove() {
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
    78
        for (Class<?> c : CLASSES) {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    79
            CV1.get(c);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    80
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    81
        countForCV1 = 0;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    82
        int REMCOUNT = 3;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    83
        for (int i = 0; i < REMCOUNT; i++) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    84
            CV1.remove(CLASSES[i]);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    85
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    86
        assertEquals(0, countForCV1);  // no change
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
    87
        for (Class<?> c : CLASSES) {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    88
            assertEquals(nameForCV1(c), CV1.get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    89
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    90
        assertEquals(REMCOUNT, countForCV1);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    91
    }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    92
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    93
    static String nameForCVN(Class<?> type, int n) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    94
        return "CV[" + n + "]" + type.getName();
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    95
    }
9146
8f574b2bae87 7019529: JSR292: java/dyn/ClassValueTest.java depends on sub-test execution order
jrose
parents: 8822
diff changeset
    96
    int countForCVN;
8f574b2bae87 7019529: JSR292: java/dyn/ClassValueTest.java depends on sub-test execution order
jrose
parents: 8822
diff changeset
    97
    class CVN extends ClassValue<String> {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    98
        final int n;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
    99
        CVN(int n) { this.n = n; }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   100
        protected String computeValue(Class<?> type) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   101
            countForCVN++;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   102
            return nameForCVN(type, n);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   103
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   104
    };
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   105
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   106
    @Test
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   107
    public void testGetMany() {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   108
        int CVN_COUNT1 = 100, CVN_COUNT2 = 100;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   109
        CVN cvns[] = new CVN[CVN_COUNT1 * CVN_COUNT2];
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   110
        for (int n = 0; n < cvns.length; n++) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   111
            cvns[n] = new CVN(n);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   112
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   113
        countForCVN = 0;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   114
        for (int pass = 0; pass <= 2; pass++) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   115
            for (int i1 = 0; i1 < CVN_COUNT1; i1++) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   116
                eachClass:
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
   117
                for (Class<?> c : CLASSES) {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   118
                    for (int i2 = 0; i2 < CVN_COUNT2; i2++) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   119
                        int n = i1*CVN_COUNT2 + i2;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   120
                        assertEquals(0, countForCVN);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   121
                        assertEquals(nameForCVN(c, n), cvns[n].get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   122
                        cvns[n].get(c);  //get it again
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   123
                        //System.out.println("getting "+n+":"+cvns[n].get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   124
                        boolean doremove = (((i1 + i2) & 3) == 0);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   125
                        switch (pass) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   126
                        case 0:
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   127
                            assertEquals(1, countForCVN);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   128
                            break;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   129
                        case 1:
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   130
                            // remove on middle pass
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   131
                            assertEquals(0, countForCVN);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   132
                            if (doremove) {
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   133
                                //System.out.println("removing "+n+":"+cvns[n].get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   134
                                cvns[n].remove(c);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   135
                                assertEquals(0, countForCVN);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   136
                            }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   137
                            break;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   138
                        case 2:
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   139
                            assertEquals(doremove ? 1 : 0, countForCVN);
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   140
                            break;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   141
                        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   142
                        countForCVN = 0;
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   143
                        if (i1 > i2 && i1 < i2+5)  continue eachClass;  // leave diagonal gap
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   144
                    }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   145
                }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   146
            }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   147
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   148
        assertEquals(countForCVN, 0);
11536
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
   149
        System.out.println("[rechecking values]");
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
   150
        for (int i = 0; i < cvns.length * 10; i++) {
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
   151
            int n = i % cvns.length;
5be4f16d98bc 7030453: JSR 292 ClassValue.get method is too slow
jrose
parents: 11534
diff changeset
   152
            for (Class<?> c : CLASSES) {
7054
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   153
                assertEquals(nameForCVN(c, n), cvns[n].get(c));
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   154
            }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   155
        }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   156
    }
fee2fbaf3293 6982752: dynamic languages need to decorate types with runtime information
jrose
parents:
diff changeset
   157
}