Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Prim.C File Reference

#include "Prim.H"
#include "Val.H"
#include "Expr.H"
#include "ApplyCache.H"
#include "Location.H"
#include "Err.H"
#include "Debug.H"
#include "VASTi.H"
#include "ThreadData.H"
#include <Table.H>
#include <VestaConfig.H>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <BufStream.H>

Go to the source code of this file.

Typedefs

typedef Sequence< EvalWorker * > Workers

Functions

void PrimError (const Text &msg, const Vals &args, SrcLoc *loc)
void PrimError (const Text &msg, Val arg, SrcLoc *loc)
void PrimError (const Text &msg, Val arg1, Val arg2, SrcLoc *loc)
void AddPrimitive (const Text &id, PrimExec exec)
PrimExec LookupPrim (const Text &id)
Val IsType (Val v, bool b)
Val IsBinding (ArgList exprs, const Context &c)
Val IsBool (ArgList exprs, const Context &c)
Val IsClosure (ArgList exprs, const Context &c)
Val IsErr (ArgList exprs, const Context &c)
Val IsInt (ArgList exprs, const Context &c)
Val IsList (ArgList exprs, const Context &c)
Val IsText (ArgList exprs, const Context &c)
Val TypeOfVal (Val v)
Val TypeOf (ArgList exprs, const Context &c)
Val SameTypeInner (Val v1, Val v2)
Val SameType (ArgList exprs, const Context &c)
Val BindingAppend (BindingVC *b1, BindingVC *b2)
Val ListAppend (ListVC *l1, ListVC *l2)
Val Append (ArgList exprs, const Context &c)
Val BindingMinus (BindingVC *b1, BindingVC *b2)
Val Minus (Expr e1, Expr e2, const Context &c)
Val Bind1 (ArgList exprs, const Context &c)
Val List1 (ArgList exprs, const Context &c)
Val Defined (ArgList exprs, const Context &c)
Val Div (ArgList exprs, const Context &ctxt)
Val Elem (ArgList exprs, const Context &c)
Val Assert (ArgList exprs, const Context &c)
Val Find (ArgList exprs, const Context &c)
Val FindR (ArgList exprs, const Context &c)
Val Head (ArgList exprs, const Context &c)
Val Tail (ArgList exprs, const Context &c)
Val Length (ArgList exprs, const Context &c)
Val Lookup (ArgList exprs, const Context &c)
Val Map (ArgList exprs, const Context &c)
Val ParMap (ArgList exprs, const Context &c)
Val Max (ArgList exprs, const Context &c)
Val Min (ArgList exprs, const Context &c)
Val Mod (ArgList exprs, const Context &ctxt)
Val GetName (ArgList exprs, const Context &c)
Val GetValue (ArgList exprs, const Context &c)
Val Sub (ArgList exprs, const Context &c)
Val Print (ArgList exprs, const Context &c)
Val ModelName (ArgList exprs, const Context &c)
Val GetFP (ArgList exprs, const Context &c)
void AddPrimitiveOp (const Text &name, PrimOp op)
PrimOp LookupOp (const Text &opid)
void AddPrimitiveUnOp (const Text &name, PrimUnOp op)
PrimUnOp LookupUnOp (const Text &opid)
Val Plus (Expr e1, Expr e2, const Context &c)
Val PlusPlus (Expr e1, Expr e2, const Context &c)
Val EqualVal (Val v1, Val v2, SrcLoc *loc)
Val Equal (Expr e1, Expr e2, const Context &c)
Val Not (Expr e, const Context &c)
Val Neg (Expr e, const Context &c)
Val And (Expr e1, Expr e2, const Context &c)
Val Or (Expr e1, Expr e2, const Context &c)
Val Implies (Expr e1, Expr e2, const Context &c)
Val NotEq (Expr e1, Expr e2, const Context &c)
Val GreaterEq (Expr e1, Expr e2, const Context &c)
Val LessEq (Expr e1, Expr e2, const Context &c)
Val Greater (Expr e1, Expr e2, const Context &c)
Val Less (Expr e1, Expr e2, const Context &c)
Val Star (Expr e1, Expr e2, const Context &c)
void PrimInit ()


Typedef Documentation

typedef Sequence<EvalWorker*> Workers
 

Definition at line 1117 of file Prim.C.


Function Documentation

void AddPrimitive const Text id,
PrimExec  exec
 

Definition at line 82 of file Prim.C.

References Error(), Basics::mutex::lock(), outputMu, and Basics::mutex::unlock().

Referenced by PrimInit().

void AddPrimitiveOp const Text name,
PrimOp  op
 

Definition at line 1951 of file Prim.C.

References Error(), Basics::mutex::lock(), outputMu, and Basics::mutex::unlock().

Referenced by PrimInit().

void AddPrimitiveUnOp const Text name,
PrimUnOp  op
 

Definition at line 1966 of file Prim.C.

References Error(), Basics::mutex::lock(), outputMu, and Basics::mutex::unlock().

Referenced by PrimInit().

Val And Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2222 of file Prim.C.

References BooleanVK, ValC::cacheit, ExprC::Eval(), IsValFalse(), ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val Append ArgList  exprs,
const Context c
 

Definition at line 296 of file Prim.C.

References BindingAppend(), BindingVK, ValC::cacheit, ErrorVK, EvalArgs(), ListT< Value >::First(), IsEmptyBinding(), IsEmptyList(), ListT< Value >::Length(), ListAppend(), ListVK, ValC::MergeAndLenDPS(), NEW, PrimError(), ListT< Value >::Second(), and ValC::vKind.

Referenced by PrimInit().

Val Assert ArgList  exprs,
const Context c
 

Definition at line 583 of file Prim.C.

References BooleanVK, diagnose, Error(), ErrorDetail(), ErrorVal(), EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), Basics::mutex::lock(), NEW, outputMu, PrimError(), PrintContext(), ListT< Value >::Second(), Basics::mutex::unlock(), and ValC::vKind.

Referenced by PrimInit().

Val Bind1 ArgList  exprs,
const Context c
 

Definition at line 410 of file Prim.C.

References Text::Empty(), EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), NEW, NEW_CONSTR, PrimError(), ListT< Value >::Second(), TextVK, and ValC::vKind.

Referenced by PrimInit().

Val BindingAppend BindingVC b1,
BindingVC b2
 

Definition at line 224 of file Prim.C.

References ListT< Value >::Append1D(), ValC::cacheit, BindingVC::Defined(), BindingVC::elems, ValC::Extend(), IsValTrue(), ValC::Merge(), ValC::MergeAndLenDPS(), AssocVC::name, NEW_CONSTR, NormPK, ListT< Value >::Null(), ListT< Value >::Pop(), test(), and AssocVC::val.

Referenced by Append().

Val BindingMinus BindingVC b1,
BindingVC b2
 

Definition at line 343 of file Prim.C.

References BindingVC::AddToLenDPS(), ListT< Value >::Append1D(), ValC::cacheit, BindingVC::DefinedNoDpnd(), ValC::MergeAndTypeDPS(), BindingVC::MergeToLenDPS(), AssocVC::name, NEW_CONSTR, NormPK, ListT< Value >::Null(), ListT< Value >::Pop(), and AssocVC::val.

Referenced by Minus().

Val Defined ArgList  exprs,
const Context c
 

Definition at line 446 of file Prim.C.

References BindingVK, Text::Empty(), EvalArgs(), ListT< Value >::First(), IsEmptyBinding(), ListT< Value >::Length(), ExprC::loc, NEW, NEW_CONSTR, PrimError(), ListT< Value >::Second(), and TextVK.

Referenced by PrimInit().

Val Div ArgList  exprs,
const Context ctxt
 

Definition at line 479 of file Prim.C.

References ValC::cacheit, EvalArgs(), ListT< Value >::First(), IntegerVK, ListT< Value >::Length(), NEW, NEW_CONSTR, PrimError(), ListT< Value >::Second(), and ValC::vKind.

Referenced by PrimInit().

Val Elem ArgList  exprs,
const Context c
 

Definition at line 519 of file Prim.C.

References BindingVK, ValC::cacheit, ValC::dps, BindingVC::elems, ListVC::elems, emptyText, EvalArgs(), ValC::Extend(), ListT< Value >::First(), ListVC::GetElem(), IntArc(), IntegerVK, ListT< Value >::Length(), ListVK, Text::MaxInt, AssocVC::name, NEW, NEW_CONSTR, NormPK, ListT< Value >::Nth(), PrimError(), ListT< Value >::Second(), Sub(), TextVK, AssocVC::val, and ValC::vKind.

Referenced by Sequence< Elem, elem_ptrfree >::expand(), Sequence< Elem, elem_ptrfree >::operator=(), PrimInit(), Sequence< Elem, elem_ptrfree >::remhi(), Sequence< Elem, elem_ptrfree >::remlo(), and Sequence< Elem, elem_ptrfree >::Sequence().

Val Equal Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2183 of file Prim.C.

References EqualVal(), and ExprC::Eval().

Referenced by PrimInit().

Val EqualVal Val  v1,
Val  v2,
SrcLoc loc
 

Definition at line 2072 of file Prim.C.

References BindingVK, BooleanVK, ValC::cacheit, BindingVC::elems, ErrorVK, ValC::Extend(), IntArc(), IntegerVK, IsEmptyBinding(), IsEmptyList(), IsValFalse(), ListT< Value >::Length(), ListVK, ValC::Merge(), ValC::MergeAndLenDPS(), ValC::MergeAndTypeDPS(), AssocVC::name, NEW, NEW_CONSTR, NormPK, ListT< Value >::Null(), ListT< Value >::Pop(), PrimError(), test(), TextVK, AssocVC::val, and ValC::vKind.

Referenced by Equal(), and NotEq().

Val Find ArgList  exprs,
const Context c
 

Definition at line 605 of file Prim.C.

References ValC::cacheit, EvalArgs(), ListT< Value >::First(), IntegerVK, Text::Length(), ListT< Value >::Length(), ExprC::loc, max(), Text::MaxInt, NEW, NEW_CONSTR, PrimError(), ListT< Value >::Second(), TextVK, ListT< Value >::Third(), valZero, and ValC::vKind.

Referenced by PrimInit().

Val FindR ArgList  exprs,
const Context c
 

Definition at line 662 of file Prim.C.

References ValC::cacheit, EvalArgs(), ListT< Value >::First(), IntegerVK, Text::Length(), ListT< Value >::Length(), max(), Text::MaxInt, NEW, NEW_CONSTR, PrimError(), ListT< Value >::Second(), TextVK, ListT< Value >::Third(), valZero, and ValC::vKind.

Referenced by PrimInit().

Val GetFP ArgList  exprs,
const Context c
 

Definition at line 1925 of file Prim.C.

References FP::ByteCnt, ValC::cacheit, EvalArgs(), ValC::FingerPrint(), ListT< Value >::First(), ListT< Value >::Length(), ValC::Merge(), NEW, NEW_CONSTR, PrimError(), and Basics::OBufStream::str().

Referenced by PrimInit().

Val GetName ArgList  exprs,
const Context c
 

Definition at line 1697 of file Prim.C.

References BindingVK, EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Val GetValue ArgList  exprs,
const Context c
 

Definition at line 1721 of file Prim.C.

References BindingVK, EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val Greater Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2330 of file Prim.C.

References ValC::cacheit, ExprC::Eval(), IntegerVK, ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val GreaterEq Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2294 of file Prim.C.

References ValC::cacheit, ExprC::Eval(), IntegerVK, ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val Head ArgList  exprs,
const Context c
 

Definition at line 719 of file Prim.C.

References BindingVK, EvalArgs(), ListT< Value >::First(), IntArc(), ListT< Value >::Length(), ListVK, AssocVC::name, NEW, NEW_CONSTR, NormPK, ListT< Value >::Null(), PrimError(), AssocVC::val, and ValC::vKind.

Referenced by PrimInit().

Val Implies Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2262 of file Prim.C.

References BooleanVK, ValC::cacheit, ExprC::Eval(), IsValFalse(), ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val IsBinding ArgList  exprs,
const Context c
 

Definition at line 106 of file Prim.C.

References BindingVK, EvalArgs(), ListT< Value >::First(), IsType(), ListT< Value >::Length(), NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val IsBool ArgList  exprs,
const Context c
 

Definition at line 117 of file Prim.C.

References BooleanVK, EvalArgs(), ListT< Value >::First(), IsType(), ListT< Value >::Length(), ExprC::loc, NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val IsClosure ArgList  exprs,
const Context c
 

Definition at line 128 of file Prim.C.

References ClosureVK, EvalArgs(), ListT< Value >::First(), IsType(), ListT< Value >::Length(), ExprC::loc, ModelVK, NEW, PrimError(), PrimitiveVK, and ValC::vKind.

Referenced by PrimInit().

Val IsErr ArgList  exprs,
const Context c
 

Definition at line 141 of file Prim.C.

References ErrorVK, EvalArgs(), ListT< Value >::First(), IsType(), ListT< Value >::Length(), ExprC::loc, NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val IsInt ArgList  exprs,
const Context c
 

Definition at line 152 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), IntegerVK, IsType(), ListT< Value >::Length(), ExprC::loc, NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val IsList ArgList  exprs,
const Context c
 

Definition at line 163 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), IsType(), ListT< Value >::Length(), ListVK, ExprC::loc, NEW, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val IsText ArgList  exprs,
const Context c
 

Definition at line 174 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), IsType(), ListT< Value >::Length(), ExprC::loc, NEW, PrimError(), TextVK, and ValC::vKind.

Referenced by PrimInit().

Val IsType Val  v,
bool  b
 

Definition at line 96 of file Prim.C.

References ValC::AddToDPS(), ValC::cacheit, ValC::dps, NEW_CONSTR, TypePK, and ValType().

Referenced by IsBinding(), IsBool(), IsClosure(), IsErr(), IsInt(), IsList(), and IsText().

Val Length ArgList  exprs,
const Context c
 

Definition at line 838 of file Prim.C.

References BindingVK, ValC::cacheit, EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), ListVK, NEW, NEW_CONSTR, PrimError(), TextVK, and ValC::vKind.

Referenced by Text::FindChar(), Text::FindCharR(), Text::FindText(), IsId(), PrimInit(), and Text::Sub().

Val Less Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2348 of file Prim.C.

References ValC::cacheit, ExprC::Eval(), IntegerVK, ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val LessEq Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2312 of file Prim.C.

References ValC::cacheit, ExprC::Eval(), IntegerVK, ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val List1 ArgList  exprs,
const Context c
 

Definition at line 435 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), NEW, NEW_CONSTR, and PrimError().

Referenced by PrimInit().

Val ListAppend ListVC l1,
ListVC l2
 

Definition at line 254 of file Prim.C.

References ValC::AddToDPS(), ListVC::AddToLenDPS(), ListT< Value >::Append1D(), ValC::cacheit, ValC::dps, ListVC::elems, ValC::Extend(), IntArc(), ListVC::lenDps, LLenPK, ValC::MergeDPS(), ValC::MergeLenDPS(), ListVC::MergeToLenDPS(), NEW_CONSTR, NormPK, ListT< Value >::Null(), ValC::path, and ListT< Value >::Pop().

Referenced by Append(), and Plus().

Val Lookup ArgList  exprs,
const Context c
 

Definition at line 861 of file Prim.C.

References ValC::AddToDPS(), BangPK, BindingVK, Text::Empty(), EvalArgs(), ListT< Value >::First(), IsEmptyBinding(), ListT< Value >::Length(), ValC::MergeDPS(), NEW, PrimError(), ListT< Value >::Second(), TextVK, UnbndVK, and valFalse.

PrimOp LookupOp const Text opid  ) 
 

Definition at line 1959 of file Prim.C.

Referenced by ApplyOpEC::Eval().

PrimExec LookupPrim const Text id  ) 
 

Definition at line 90 of file Prim.C.

Referenced by Primary(), PickleC::UnpickleExpr(), and PickleC::UnpickleVal().

PrimUnOp LookupUnOp const Text opid  ) 
 

Definition at line 1974 of file Prim.C.

Referenced by ApplyUnOpEC::Eval().

Val Map ArgList  exprs,
const Context c
 

Definition at line 900 of file Prim.C.

References ApplicationFromCache(), FuncEC::args, AssignEK, BindingVK, ValC::cacheit, ClosureVK, ValC::dps, ExprC::EError(), ArgListEC::elems, Error(), NameEC::Eval(), EvalArgs(), ValC::Extend(), SrcLoc::file, FindInContext(), ListT< Value >::First(), ExprC::freeVars, ClosureVC::func, ThreadData::funcCallDepth, Sequence< Elem, elem_ptrfree >::get(), Sequence< Elem, elem_ptrfree >::getlo(), IntArc(), ExprC::kind, ListT< Value >::Length(), ListVK, ExprC::loc, Basics::mutex::lock(), DepPathTbl::DPS::Merge(), ModelFromCache(), ModelVK, FuncEC::name, AssocVC::name, nameDot, NameEK, NEW, NEW_CONSTR, NormPK, ListT< Value >::Null(), nullAssoc, outputMu, ListT< Value >::Pop(), PrimError(), ListT< Value >::Push(), RestrictContext(), ListT< Value >::Second(), Sequence< Elem, elem_ptrfree >::size(), ThreadDataGet(), ThreadData::traceRes, Basics::mutex::unlock(), AssocVC::val, and ValC::vKind.

Referenced by ParMap(), and PrimInit().

Val Max ArgList  exprs,
const Context c
 

Definition at line 1612 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), IntegerVK, ListT< Value >::Length(), ExprC::loc, NEW, PrimError(), ListT< Value >::Second(), and ValC::vKind.

Referenced by PrimInit().

Val Min ArgList  exprs,
const Context c
 

Definition at line 1637 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), IntegerVK, ListT< Value >::Length(), ValC::Merge(), NEW, PrimError(), ListT< Value >::Second(), and ValC::vKind.

Referenced by PrimInit().

Val Minus Expr  e1,
Expr  e2,
const Context c
 

Definition at line 369 of file Prim.C.

References BindingMinus(), BindingVK, ValC::cacheit, ExprC::Eval(), IntegerVK, IsEmptyBinding(), ValC::Merge(), ValC::MergeAndLenDPS(), ValC::MergeAndTypeDPS(), Minus(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by Minus(), and PrimInit().

Val Mod ArgList  exprs,
const Context ctxt
 

Definition at line 1662 of file Prim.C.

References ValC::cacheit, EvalArgs(), ListT< Value >::First(), IntegerVK, ListT< Value >::Length(), NEW, NEW_CONSTR, PrimError(), ListT< Value >::Second(), and ValC::vKind.

Referenced by PrimInit().

Val ModelName ArgList  exprs,
const Context c
 

Definition at line 1908 of file Prim.C.

References ValC::cacheit, EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), ExprC::loc, ValC::Merge(), ModelVK, NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val Neg Expr  e,
const Context c
 

Definition at line 2202 of file Prim.C.

References ValC::cacheit, IntegerVK, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val Not Expr  e,
const Context c
 

Definition at line 2188 of file Prim.C.

References BooleanVK, ValC::cacheit, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val NotEq Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2284 of file Prim.C.

References BooleanVC::b, EqualVal(), ErrorVK, ExprC::Eval(), IsValFalse(), test(), and ValC::vKind.

Referenced by PrimInit().

Val Or Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2240 of file Prim.C.

References BooleanVK, ValC::cacheit, Error(), ExprC::Eval(), IsValTrue(), Basics::mutex::lock(), ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, outputMu, Basics::mutex::unlock(), and ValC::vKind.

Referenced by PrimInit().

Val ParMap ArgList  exprs,
const Context c
 

Definition at line 1340 of file Prim.C.

References ListT< Value >::Append1D(), FuncEC::args, AssignEK, BindingVK, ParWork::bwork, ValC::cacheit, ClosureVK, ValC::dps, ExprC::EError(), ArgListEC::elems, Error(), NameEC::Eval(), EvalArgs(), ValC::Extend(), FindInContext(), ListT< Value >::First(), ExprC::freeVars, ClosureVC::func, Sequence< Elem, elem_ptrfree >::get(), Sequence< Elem, elem_ptrfree >::getlo(), ParWork::index, IntArc(), ExprC::kind, ListT< Value >::Length(), ListVK, Basics::mutex::lock(), ParWork::lwork, Map(), maxThreads, DepPathTbl::DPS::Merge(), ModelVK, AssocVC::name, nameDot, NameEK, NEW, NEW_CONSTR, NormPK, ListT< Value >::Null(), nullAssoc, outputMu, ListT< Value >::Pop(), PrimError(), ListT< Value >::Push(), RestrictContext(), ListT< Value >::Second(), Sequence< Elem, elem_ptrfree >::size(), ThreadDataGet(), Basics::mutex::unlock(), AssocVC::val, ValC::vKind, and ParWork::workers.

Referenced by PrimInit().

Val Plus Expr  e1,
Expr  e2,
const Context c
 

Definition at line 1979 of file Prim.C.

References BindingVK, ValC::cacheit, ExprC::Eval(), FP::Tag::Extend(), BindingVC::FingerPrint(), IntegerVK, IsEmptyBinding(), IsEmptyList(), ListAppend(), ListVK, ValC::Merge(), ValC::MergeAndLenDPS(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, Plus(), PrimError(), TextVK, and ValC::vKind.

Referenced by Plus(), and PrimInit().

Val PlusPlus Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2046 of file Prim.C.

References BindingVK, ValC::cacheit, ExprC::Eval(), IsEmptyBinding(), ExprC::loc, ValC::MergeAndLenDPS(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

void PrimError const Text msg,
Val  arg1,
Val  arg2,
SrcLoc loc
 

Definition at line 70 of file Prim.C.

References Error(), ErrorDetail(), ErrorVal(), Basics::mutex::lock(), outputMu, and Basics::mutex::unlock().

void PrimError const Text msg,
Val  arg,
SrcLoc loc
 

Definition at line 62 of file Prim.C.

References Error(), ErrorDetail(), ErrorVal(), Basics::mutex::lock(), outputMu, and Basics::mutex::unlock().

void PrimError const Text msg,
const Vals args,
SrcLoc loc
 

Definition at line 54 of file Prim.C.

References Error(), ErrorArgs(), ErrorDetail(), Basics::mutex::lock(), outputMu, and Basics::mutex::unlock().

Referenced by And(), Append(), Assert(), Bind1(), Defined(), Div(), Elem(), EqualVal(), Find(), FindR(), GetFP(), GetName(), GetValue(), Greater(), GreaterEq(), Head(), Implies(), IsBinding(), IsBool(), IsClosure(), IsErr(), IsInt(), IsList(), IsText(), Length(), Less(), LessEq(), List1(), Lookup(), Map(), Max(), Min(), Minus(), Mod(), ModelName(), Neg(), Not(), ParMap(), Plus(), PlusPlus(), Print(), SameType(), Star(), Sub(), Tail(), and TypeOf().

void PrimInit  ) 
 

Definition at line 2402 of file Prim.C.

References AddPrimitive(), AddPrimitiveOp(), AddPrimitiveUnOp(), And(), Append(), ApplyRunTool(), Assert(), Bind1(), Defined(), Div(), Elem(), Equal(), Find(), FindR(), Basics::thread::fork(), VestaConfig::get_int(), GetFP(), GetName(), GetValue(), Greater(), GreaterEq(), Head(), Implies(), VestaConfig::is_set(), IsBinding(), IsBool(), IsClosure(), IsErr(), IsInt(), IsList(), IsText(), Length(), Less(), LessEq(), List1(), VestaSourceSRPC::Lookup, Map(), Max(), maxThreads, Min(), Minus(), Mod(), ModelName(), Neg(), NEW, Not(), NotEq(), Or(), ParMap(), Plus(), PlusPlus(), Print(), SameType(), Star(), Sub(), Tail(), and TypeOf().

Referenced by StartEval().

Val Print ArgList  exprs,
const Context c
 

Definition at line 1849 of file Prim.C.

References BooleanVK, EvalArgs(), ListT< Value >::First(), IntegerVK, ListT< Value >::Length(), ExprC::loc, Basics::mutex::lock(), NEW, outputMu, PrimError(), PrintAllDpnd(), ValC::PrintD(), PrintDpnd(), ListT< Value >::Second(), ListT< Value >::Third(), Basics::mutex::unlock(), verbose, and ValC::vKind.

Referenced by PrimInit().

Val SameType ArgList  exprs,
const Context c
 

Definition at line 212 of file Prim.C.

References ValC::cacheit, EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), NEW, PrimError(), SameTypeInner(), and ListT< Value >::Second().

Referenced by PrimInit().

Val SameTypeInner Val  v1,
Val  v2
 

Definition at line 204 of file Prim.C.

References ValC::dps, ValC::MergeAndTypeDPS(), NEW_CONSTR, TypeOfVal(), and ValC::vKind.

Referenced by SameType().

Val Star Expr  e1,
Expr  e2,
const Context c
 

Definition at line 2368 of file Prim.C.

References ValC::cacheit, ExprC::Eval(), IntegerVK, ExprC::loc, ValC::Merge(), ValC::MergeAndTypeDPS(), NEW, NEW_CONSTR, PrimError(), and ValC::vKind.

Referenced by PrimInit().

Val Sub ArgList  exprs,
const Context c
 

Definition at line 1743 of file Prim.C.

References ListT< Value >::Append1D(), BindingVK, ValC::cacheit, EvalArgs(), ValC::Extend(), FP::Tag::Extend(), ValC::FingerPrint(), ListT< Value >::First(), IntArc(), IntegerVK, ListT< Value >::Length(), ListVK, Text::MaxInt, AssocVC::name, NEW, NEW_CONSTR, NormPK, ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), PrimError(), ListT< Value >::Second(), Text::Sub(), TextVK, ListT< Value >::Third(), AssocVC::val, valZero, and ValC::vKind.

Referenced by Elem(), and PrimInit().

Val Tail ArgList  exprs,
const Context c
 

Definition at line 760 of file Prim.C.

References BindingVC::AddToLenDPS(), ListVC::AddToLenDPS(), ListT< Value >::Append1D(), BindingVK, ValC::cacheit, ValC::dps, BindingVC::elems, ListVC::elems, EvalArgs(), ValC::Extend(), ListT< Value >::First(), IntArc(), BindingVC::lenDps, ListVC::lenDps, ListT< Value >::Length(), ListVK, ValC::Merge(), ValC::MergeAndTypeDPS(), AssocVC::name, NEW, NEW_CONSTR, NormPK, ListT< Value >::Null(), ValC::path, ListT< Value >::Pop(), PrimError(), AssocVC::val, and ValC::vKind.

Referenced by PrimInit().

Val TypeOf ArgList  exprs,
const Context c
 

Definition at line 195 of file Prim.C.

References EvalArgs(), ListT< Value >::First(), ListT< Value >::Length(), NEW, PrimError(), and TypeOfVal().

Referenced by PrimInit().

Val TypeOfVal Val  v  ) 
 

Definition at line 185 of file Prim.C.

References ValC::AddToDPS(), ValC::Copy(), ValC::dps, ValC::path, TypePK, and ValType().

Referenced by SameTypeInner(), and TypeOf().


Generated on Mon May 8 00:49:02 2006 for Vesta by  doxygen 1.4.2