mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-01 02:33:44 +00:00
s/Method/Function in variable and method names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5715 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2a7b6bab7a
commit
6e5a0e4e89
@ -102,9 +102,9 @@ void BytecodeParser::refineAbstractType(const DerivedType *OldType,
|
|||||||
if (OldType == NewType &&
|
if (OldType == NewType &&
|
||||||
OldType->isAbstract()) return; // Type is modified, but same
|
OldType->isAbstract()) return; // Type is modified, but same
|
||||||
|
|
||||||
TypeValuesListTy::iterator I = find(MethodTypeValues.begin(),
|
TypeValuesListTy::iterator I = find(FunctionTypeValues.begin(),
|
||||||
MethodTypeValues.end(), OldType);
|
FunctionTypeValues.end(), OldType);
|
||||||
if (I == MethodTypeValues.end()) {
|
if (I == FunctionTypeValues.end()) {
|
||||||
I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), OldType);
|
I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), OldType);
|
||||||
assert(I != ModuleTypeValues.end() &&
|
assert(I != ModuleTypeValues.end() &&
|
||||||
"Can't refine a type I don't know about!");
|
"Can't refine a type I don't know about!");
|
||||||
|
@ -29,11 +29,11 @@ bool BytecodeParser::getTypeSlot(const Type *Ty, unsigned &Slot) {
|
|||||||
Slot = Ty->getPrimitiveID();
|
Slot = Ty->getPrimitiveID();
|
||||||
} else {
|
} else {
|
||||||
// Check the function level types first...
|
// Check the function level types first...
|
||||||
TypeValuesListTy::iterator I = find(MethodTypeValues.begin(),
|
TypeValuesListTy::iterator I = find(FunctionTypeValues.begin(),
|
||||||
MethodTypeValues.end(), Ty);
|
FunctionTypeValues.end(), Ty);
|
||||||
if (I != MethodTypeValues.end()) {
|
if (I != FunctionTypeValues.end()) {
|
||||||
Slot = FirstDerivedTyID+ModuleTypeValues.size()+
|
Slot = FirstDerivedTyID+ModuleTypeValues.size()+
|
||||||
(&*I - &MethodTypeValues[0]);
|
(&*I - &FunctionTypeValues[0]);
|
||||||
} else {
|
} else {
|
||||||
I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), Ty);
|
I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), Ty);
|
||||||
if (I == ModuleTypeValues.end()) return true; // Didn't find type!
|
if (I == ModuleTypeValues.end()) return true; // Didn't find type!
|
||||||
@ -92,8 +92,8 @@ Value *BytecodeParser::getValue(const Type *Ty, unsigned oNum, bool Create) {
|
|||||||
|
|
||||||
// Nope, is it a function level type?
|
// Nope, is it a function level type?
|
||||||
Num -= ModuleTypeValues.size();
|
Num -= ModuleTypeValues.size();
|
||||||
if (Num < MethodTypeValues.size())
|
if (Num < FunctionTypeValues.size())
|
||||||
return (Value*)MethodTypeValues[Num].get();
|
return (Value*)FunctionTypeValues[Num].get();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ void BytecodeParser::ResolveReferencesToValue(Value *NewV, unsigned Slot) {
|
|||||||
GlobalRefs.erase(I); // Remove the map entry for it
|
GlobalRefs.erase(I); // Remove the map entry for it
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf) {
|
bool BytecodeParser::ParseFunction(const uchar *&Buf, const uchar *EndBuf) {
|
||||||
// Clear out the local values table...
|
// Clear out the local values table...
|
||||||
Values.clear();
|
Values.clear();
|
||||||
if (FunctionSignatureList.empty()) {
|
if (FunctionSignatureList.empty()) {
|
||||||
@ -316,7 +316,7 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf) {
|
|||||||
switch (Type) {
|
switch (Type) {
|
||||||
case BytecodeFormat::ConstantPool:
|
case BytecodeFormat::ConstantPool:
|
||||||
BCR_TRACE(2, "BLOCK BytecodeFormat::ConstantPool: {\n");
|
BCR_TRACE(2, "BLOCK BytecodeFormat::ConstantPool: {\n");
|
||||||
if (ParseConstantPool(Buf, Buf+Size, Values, MethodTypeValues)) {
|
if (ParseConstantPool(Buf, Buf+Size, Values, FunctionTypeValues)) {
|
||||||
delete M; return true;
|
delete M; return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -362,7 +362,7 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Value *FunctionPHolder = getValue(PMTy, MethSlot, false);
|
Value *FunctionPHolder = getValue(PMTy, MethSlot, false);
|
||||||
assert(FunctionPHolder && "Something is broken no placeholder found!");
|
assert(FunctionPHolder && "Something is broken, no placeholder found!");
|
||||||
assert(isa<Function>(FunctionPHolder) && "Not a function?");
|
assert(isa<Function>(FunctionPHolder) && "Not a function?");
|
||||||
|
|
||||||
unsigned type; // Type slot
|
unsigned type; // Type slot
|
||||||
@ -375,7 +375,7 @@ bool BytecodeParser::ParseMethod(const uchar *&Buf, const uchar *EndBuf) {
|
|||||||
ModuleValues[type][MethSlot] = M;
|
ModuleValues[type][MethSlot] = M;
|
||||||
|
|
||||||
// Clear out function level types...
|
// Clear out function level types...
|
||||||
MethodTypeValues.clear();
|
FunctionTypeValues.clear();
|
||||||
|
|
||||||
// If anyone is using the placeholder make them use the real function instead
|
// If anyone is using the placeholder make them use the real function instead
|
||||||
FunctionPHolder->replaceAllUsesWith(M);
|
FunctionPHolder->replaceAllUsesWith(M);
|
||||||
@ -523,7 +523,7 @@ bool BytecodeParser::ParseModule(const uchar *Buf, const uchar *EndBuf) {
|
|||||||
|
|
||||||
case BytecodeFormat::Function: {
|
case BytecodeFormat::Function: {
|
||||||
BCR_TRACE(1, "BLOCK BytecodeFormat::Function: {\n");
|
BCR_TRACE(1, "BLOCK BytecodeFormat::Function: {\n");
|
||||||
if (ParseMethod(Buf, Buf+Size)) return true; // Error parsing function
|
if (ParseFunction(Buf, Buf+Size)) return true; // Error parsing function
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ private: // All of this data is transient across calls to ParseBytecode
|
|||||||
//
|
//
|
||||||
typedef std::vector<PATypeHandle<Type> > TypeValuesListTy;
|
typedef std::vector<PATypeHandle<Type> > TypeValuesListTy;
|
||||||
TypeValuesListTy ModuleTypeValues;
|
TypeValuesListTy ModuleTypeValues;
|
||||||
TypeValuesListTy MethodTypeValues;
|
TypeValuesListTy FunctionTypeValues;
|
||||||
|
|
||||||
// Information read from the ModuleGlobalInfo section of the file...
|
// Information read from the ModuleGlobalInfo section of the file...
|
||||||
unsigned FirstDerivedTyID;
|
unsigned FirstDerivedTyID;
|
||||||
@ -92,7 +92,7 @@ private:
|
|||||||
bool ParseModule (const uchar * Buf, const uchar *End);
|
bool ParseModule (const uchar * Buf, const uchar *End);
|
||||||
bool ParseModuleGlobalInfo(const uchar *&Buf, const uchar *End);
|
bool ParseModuleGlobalInfo(const uchar *&Buf, const uchar *End);
|
||||||
bool ParseSymbolTable (const uchar *&Buf, const uchar *End, SymbolTable *);
|
bool ParseSymbolTable (const uchar *&Buf, const uchar *End, SymbolTable *);
|
||||||
bool ParseMethod (const uchar *&Buf, const uchar *End);
|
bool ParseFunction (const uchar *&Buf, const uchar *End);
|
||||||
bool ParseBasicBlock (const uchar *&Buf, const uchar *End, BasicBlock *&);
|
bool ParseBasicBlock (const uchar *&Buf, const uchar *End, BasicBlock *&);
|
||||||
bool ParseInstruction (const uchar *&Buf, const uchar *End, Instruction *&,
|
bool ParseInstruction (const uchar *&Buf, const uchar *End, Instruction *&,
|
||||||
BasicBlock *BB /*HACK*/);
|
BasicBlock *BB /*HACK*/);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user