1 /*
2     SuperCollider real time audio synthesis system
3     Copyright (c) 2002 James McCartney. All rights reserved.
4     http://www.audiosynth.com
5 
6     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15 
16     You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
19 */
20 
21 
22 #pragma once
23 
24 PyrClass* newClassObj(PyrClass* classObjSuperClass, PyrSymbol* className, PyrSymbol* superClassName, int numInstVars,
25                       int numClassVars, int numConsts, int numInstMethods, int instFormat, int instFlags);
26 
27 void reallocClassObj(PyrClass* classobj, int numInstVars, int numClassVars, int numConsts, int numMethods,
main(int argc,char * argv[])28                      int instFormat, int instFlags);
29 
30 int numInstVars(PyrClass* classobj);
31 int numClassVars(PyrClass* classobj);
32 int numSuperInstVars(PyrClass* superclassobj);
33 bool classFindInstVar(PyrClass* classobj, PyrSymbol* name, int* index);
34 bool classFindClassVar(PyrClass** classobj, PyrSymbol* name, int* index);
35 bool classFindConst(PyrClass** classobj, PyrSymbol* name, int* index);
36 
37 void buildClassTree();
38 void indexClassTree(PyrClass* classobj, int numSuperMethods);
39 void postClassTree(PyrClass* classobj, int level);
40 void setSelectorFlags();
41 void buildBigMethodMatrix();
42 
43 bool funcFindArg(PyrBlock* func, PyrSymbol* name, int* index);
44 bool funcFindVar(PyrBlock* func, PyrSymbol* name, int* index);
45 void addMethod(PyrClass* classobj, PyrMethod* method);
46 
47 
48 PyrMethod* classFindDirectMethod(PyrClass* classobj, PyrSymbol* name);
49 
50 PyrBlock* newPyrBlock(int flags);
51 PyrMethod* newPyrMethod();
52 PyrClass* makeIntrinsicClass(PyrSymbol* className, PyrSymbol* superClassName, int numInstVars, int numClassVars);
53 void addIntrinsicVar(PyrClass* classobj, const char* varName, PyrSlot* slot);
54