| 1 |
/******************************************************************************* |
|---|
| 2 |
Copyright 2008 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 |
|
|---|
| 18 |
package com.sun.fortress.interpreter.evaluator.values; |
|---|
| 19 |
|
|---|
| 20 |
import java.util.List; |
|---|
| 21 |
|
|---|
| 22 |
import com.sun.fortress.interpreter.env.BetterEnv; |
|---|
| 23 |
import com.sun.fortress.interpreter.evaluator.Environment; |
|---|
| 24 |
import com.sun.fortress.interpreter.evaluator.types.FType; |
|---|
| 25 |
import com.sun.fortress.interpreter.evaluator.types.FTypeArrow; |
|---|
| 26 |
import com.sun.fortress.interpreter.evaluator.types.FTypeVoid; |
|---|
| 27 |
import com.sun.fortress.nodes.IdOrOpOrAnonymousName; |
|---|
| 28 |
import com.sun.fortress.nodes_util.NodeFactory; |
|---|
| 29 |
import com.sun.fortress.useful.HasAt; |
|---|
| 30 |
import com.sun.fortress.useful.NI; |
|---|
| 31 |
import com.sun.fortress.useful.Useful; |
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
public class Dummy_fcn extends Simple_fcn { |
|---|
| 35 |
private List<FType> domain; |
|---|
| 36 |
private String allocationSite; |
|---|
| 37 |
private IdOrOpOrAnonymousName fnName = NodeFactory.makeId("Dummy"); |
|---|
| 38 |
|
|---|
| 39 |
/* (non-Javadoc) |
|---|
| 40 |
* @see com.sun.fortress.interpreter.evaluator.values.Fcn#getFnName() |
|---|
| 41 |
*/ |
|---|
| 42 |
@Override |
|---|
| 43 |
public IdOrOpOrAnonymousName getFnName() { |
|---|
| 44 |
return fnName; |
|---|
| 45 |
} |
|---|
| 46 |
|
|---|
| 47 |
public String stringName() { |
|---|
| 48 |
return fnName.stringName(); |
|---|
| 49 |
} |
|---|
| 50 |
|
|---|
| 51 |
public Dummy_fcn(List<FType> _params) { |
|---|
| 52 |
super(BetterEnv.blessedEmpty()); |
|---|
| 53 |
allocationSite = Useful.backtrace(2, 3); |
|---|
| 54 |
this.domain = _params; |
|---|
| 55 |
setFtype(FTypeArrow.make(_params, FTypeVoid.ONLY)); |
|---|
| 56 |
} |
|---|
| 57 |
|
|---|
| 58 |
public List<FType> getDomain() {return domain;} |
|---|
| 59 |
|
|---|
| 60 |
public FValue applyInner(List<FValue> vals, HasAt loc, Environment envForInference) { |
|---|
| 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 |
} |
|---|