Package org.teavm.debugging.javascript

Examples of org.teavm.debugging.javascript.JavaScriptVariable


        if (backingMap.get() != null) {
            return;
        }
        Map<String, Variable> vars = new HashMap<>();
        for (Map.Entry<String, JavaScriptVariable> entry : jsVariables.entrySet()) {
            JavaScriptVariable jsVar = entry.getValue();
            String name;
            if (className.endsWith("[]")) {
                if (entry.getKey().equals("data")) {
                    name = entry.getKey();
                } else {
                    continue;
                }
            } else if (isNumeric(entry.getKey())) {
                name = entry.getKey();
            } else {
                name = debugger.mapField(className, entry.getKey());
                if (name == null) {
                    continue;
                }
            }
            Value value = new Value(debugger, jsVar.getValue());
            vars.put(entry.getKey(), new Variable(name, value));
        }
        backingMap.compareAndSet(null, vars);
    }
View Full Code Here


        if (backingMap.get() != null) {
            return;
        }
        Map<String, Variable> vars = new HashMap<>();
        for (Map.Entry<String, JavaScriptVariable> entry : jsVariables.entrySet()) {
            JavaScriptVariable jsVar = entry.getValue();
            String[] names = debugger.mapVariable(entry.getKey(), location);
            Value value = new Value(debugger, jsVar.getValue());
            for (String name : names) {
                vars.put(name, new Variable(name, value));
            }
        }
        backingMap.compareAndSet(null, vars);
View Full Code Here

            @Override String getName(JavaScriptVariable value) {
                return value.getName();
            }
        });
        for (int i = 0; i < teavmVarList.size(); ++i) {
            JavaScriptVariable var = teavmVarList.get(i);
            variables.add(new TeaVMJSVariable(idPrefix + "." + var.getName(), debugTarget, var));
        }
        return variables.toArray(new TeaVMVariable[0]);
    }
View Full Code Here

TOP

Related Classes of org.teavm.debugging.javascript.JavaScriptVariable

Copyright © 2018 www.massapicom. 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.