root/trunk/ProjectFortress/src/com/sun/fortress/interpreter/evaluator/values/Dummy_fcn.java

Revision 4002, 2.5 KB (checked in by sukyoungryu, 4 months ago)

[copyright] Fixed copyright notices.

Line 
1/*******************************************************************************
2 Copyright 2009 Sun Microsystems, Inc.,
3 4150 Network Circle, Santa Clara, California 95054, U.S.A.
4 All rights reserved.
5
6 U.S. Government Rights - Commercial software.
7 Government users are subject to the Sun Microsystems, Inc. standard
8 license agreement and applicable provisions of the FAR and its supplements.
9
10 Use is subject to license terms.
11
12 This distribution may include materials developed by third parties.
13
14 Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15 trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 ******************************************************************************/
17
18package com.sun.fortress.interpreter.evaluator.values;
19
20import com.sun.fortress.interpreter.env.BetterEnv;
21import com.sun.fortress.interpreter.evaluator.types.FType;
22import com.sun.fortress.interpreter.evaluator.types.FTypeArrow;
23import com.sun.fortress.interpreter.evaluator.types.FTypeVoid;
24import com.sun.fortress.nodes.IdOrOpOrAnonymousName;
25import com.sun.fortress.nodes_util.NodeFactory;
26import com.sun.fortress.useful.NI;
27import com.sun.fortress.useful.Useful;
28
29import java.util.List;
30
31
32public class Dummy_fcn extends Simple_fcn {
33    private List<FType> domain;
34    private String allocationSite;
35    private IdOrOpOrAnonymousName fnName = NodeFactory.makeId(NodeFactory.interpreterSpan, "Dummy");
36
37    /* (non-Javadoc)
38     * @see com.sun.fortress.interpreter.evaluator.values.Fcn#getFnName()
39     */
40    @Override
41    public IdOrOpOrAnonymousName getFnName() {
42        return fnName;
43    }
44
45    public String stringName() {
46        return fnName.stringName();
47    }
48
49    public Dummy_fcn(List<FType> _params) {
50        super(BetterEnv.blessedEmpty());
51        allocationSite = Useful.backtrace(2, 3);
52        this.domain = _params;
53        setFtype(FTypeArrow.make(_params, FTypeVoid.ONLY));
54    }
55
56    public List<FType> getDomain() {
57        return domain;
58    }
59
60    public FValue applyInnerPossiblyGeneric(List<FValue> vals) {
61        return NI.nyi("Dummy_fcn.apply_inner");
62    }
63
64    public String toString() {
65        return "DummyFunc" + Useful.listInParens(domain);
66    }
67
68    /* (non-Javadoc)
69     * @see com.sun.fortress.interpreter.evaluator.values.Simple_fcn#at()
70     */
71    @Override
72    public String at() {
73        return allocationSite;
74    }
75
76    @Override
77    boolean getFinished() {
78        // TODO Auto-generated method stub
79        return true;
80    }
81
82    public boolean seqv(FValue v) {
83        return false;
84    }
85}
Note: See TracBrowser for help on using the browser.