diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:39:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:39:41 +0000 |
commit | b97ef9f4cf07d2092b7ca0fe5860d375fb29954a (patch) | |
tree | 872f3a54a08a1117c9c9ddc20d7de7cc3b04aee7 /llvm/lib/Bytecode/Writer/ConstantWriter.cpp | |
parent | 1f043cd1ba8c4d15b512692f5874aee9976bd89e (diff) | |
download | bcm5719-llvm-b97ef9f4cf07d2092b7ca0fe5860d375fb29954a.tar.gz bcm5719-llvm-b97ef9f4cf07d2092b7ca0fe5860d375fb29954a.zip |
* Emit bytecode using a deque instead of a vector to be faster
* Internal rep no longer has a constant pool
* Support emission of recursive types
* Don't output a constant pool for an external method
* The bytecode writer is no longer a module analyzer
llvm-svn: 449
Diffstat (limited to 'llvm/lib/Bytecode/Writer/ConstantWriter.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Writer/ConstantWriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp index bac5a4c0502..4940ea671be 100644 --- a/llvm/lib/Bytecode/Writer/ConstantWriter.cpp +++ b/llvm/lib/Bytecode/Writer/ConstantWriter.cpp @@ -81,10 +81,10 @@ void BytecodeWriter::outputType(const Type *T) { } case Type::ModuleTyID: - case Type::PackedTyID: + //case Type::PackedTyID: default: cerr << __FILE__ << ":" << __LINE__ << ": Don't know how to serialize" - << " Type '" << T->getName() << "'\n"; + << " Type '" << T->getDescription() << "'\n"; break; } } @@ -113,7 +113,7 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) { break; case Type::TypeTyID: // Serialize type type - outputType(((const ConstPoolType*)CPV)->getValue()); + assert(0 && "Types should not be in the ConstPool!"); break; case Type::ArrayTyID: { @@ -123,7 +123,7 @@ bool BytecodeWriter::outputConstant(const ConstPoolVal *CPV) { output_vbr(size, Out); // Not for sized arrays!!! for (unsigned i = 0; i < size; i++) { - int Slot = Table.getValSlot(CPA->getValues()[i]); + int Slot = Table.getValSlot(CPA->getOperand(i)); assert(Slot != -1 && "Constant used but not available!!"); output_vbr((unsigned)Slot, Out); } |