Package kilim.analysis

Examples of kilim.analysis.Value.merge()


import static kilim.Constants.*;

public class TestValue extends TestCase {
    public void testSameSiteMerge() {
        Value v = Value.make(10, D_STRING);
        v = v.merge(Value.make(20, D_OBJECT));
        Value oldV = v;
        for (int i = 0; i < 10; i++) {
            v = v.merge(Value.make(10, D_STRING));
        }
        assertSame(oldV, v);
View Full Code Here


    public void testDifferentSitesMerge() {
        Value v1 = Value.make(2, D_INT);
        Value v2 = Value.make(3, D_INT);
        Value v3 = Value.make(5, D_INT);
        Value v = v1.merge(v2);
        v = v.merge(v3);
        assertTrue(v.getNumSites() == 3);
        int[] sites = v.getCreationSites();
        int prod = 1;
        for (int i = 0; i < 3; i++) {
            prod *= sites[i];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.