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 | e8fdde179d610ad4452b0cbed67d17b78ace4e38 (patch) | |
tree | 9d1a9aa711ecf3cd9e1f2736f02e407854a07f93 /lib/Bytecode/Writer/ConstantWriter.cpp | |
parent | 1d670cc40299cb51198c58f9c0c97a9b54248760 (diff) |
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Writer/ConstantWriter.cpp')
-rw-r--r-- | lib/Bytecode/Writer/ConstantWriter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Bytecode/Writer/ConstantWriter.cpp b/lib/Bytecode/Writer/ConstantWriter.cpp index bac5a4c050..4940ea671b 100644 --- a/lib/Bytecode/Writer/ConstantWriter.cpp +++ b/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); } |