void test() { if (__builtin_expect(aaa(), 0)) { bbb(); } }
void first() { n1(xnxt,ynxt,h,w1); fs(xnxt,ynxt); xnxt+=s/2; ppp(xnxt,ynxt,h,wp); rrr(xnxt,ynxt,h,wr); eee(xnxt,ynxt,h,we); sss(xnxt,ynxt,h,ws); sss(xnxt,ynxt,h,ws); xnxt+=s/2; www(xnxt,ynxt,3*h/4,3*ww/4); xnxt+=s/2; ttt(xnxt,ynxt,h,wt); ooo(xnxt,ynxt,h,wo); xnxt+=s/2; mmm(xnxt,ynxt,h,wm); ooo(xnxt,ynxt,h,wo); vvv(xnxt,ynxt,h,wv); eee(xnxt,ynxt,h,we); xnxt+=s/2; ttt(xnxt,ynxt,h,wt); hhh(xnxt,ynxt,h,wh); eee(xnxt,ynxt,h,we); xnxt+=s/2; bbb(xnxt,ynxt,h,wb); ooo(xnxt,ynxt,h,wo); www(xnxt,ynxt,h,ww); xnxt+=s/2; uuu(xnxt,ynxt,h,wu); ppp(xnxt,ynxt,h,wp); }
int main(){ puts( aaa() ); puts( bbb(Tony) ); puts( ccc(Tony) ); puts( ddd(zzz) ); return 0; }
second() { n2(xnxt,ynxt,h,w2); fs(xnxt,ynxt); xnxt+=s/2; ppp(xnxt,ynxt,h,wp); rrr(xnxt,ynxt,h,wr); eee(xnxt,ynxt,h,we); sss(xnxt,ynxt,h,ws); sss(xnxt,ynxt,h,ws); xnxt+=s/2; sss(xnxt,ynxt,3*h/4,3*ws/4); xnxt+=s/2; ttt(xnxt,ynxt,h,wt); ooo(xnxt,ynxt,h,wo); xnxt+=s/2; mmm(xnxt,ynxt,h,wm); ooo(xnxt,ynxt,h,wo); vvv(xnxt,ynxt,h,wv); eee(xnxt,ynxt,h,we); xnxt+=s/2; ttt(xnxt,ynxt,h,wt); hhh(xnxt,ynxt,h,wh); eee(xnxt,ynxt,h,we); xnxt+=s/2; bbb(xnxt,ynxt,h,wb); ooo(xnxt,ynxt,h,wo); www(xnxt,ynxt,h,ww); xnxt+=s/2; ddd(xnxt,ynxt,h,wd); ooo(xnxt,ynxt,h,wo); www(xnxt,ynxt,h,ww); nnn(xnxt,ynxt,h,wn); }
void test() { if (aaa() == 0) { bbb(); } }
void TerarkDbRecoveryUnit::appendGlobalStats(BSONObjBuilder& b) { BSONObjBuilder bb(b.subobjStart("concurrentTransactions")); { BSONObjBuilder bbb(bb.subobjStart("write")); bbb.append("out", openWriteTransaction.used()); bbb.append("available", openWriteTransaction.available()); bbb.append("totalTickets", openWriteTransaction.outof()); bbb.done(); } { BSONObjBuilder bbb(bb.subobjStart("read")); bbb.append("out", openReadTransaction.used()); bbb.append("available", openReadTransaction.available()); bbb.append("totalTickets", openReadTransaction.outof()); bbb.done(); } bb.done(); }
void balloon1() { bbb(xnxt,ynxt,h,wb); aaa(xnxt,ynxt,h,wa); lll(xnxt,ynxt,h,wl); lll(xnxt,ynxt,h,wl); ooo(xnxt,ynxt,h,wo); ooo(xnxt,ynxt,h,wo); nnn(xnxt,ynxt,h,wn); }
int main () { /* an int array with 5 elements */ int balance[5] = {1000, 2, 3, 17, 50}; double avg; char *s = "mera"; /* pass pointer to the array as an argument */ getAverage( balance, 5 ) ; //char *p= bbb(s); bbb(&s); /* output the returned value */ printf("Average value is: %d\n %s", balance[0],s ); return 0; }
void testMerge ( void ) { Vector3d a(1,2,3); Vector3d b(4,6,8); BoundingBox3d3f bba(a,b); Vector3d aB(0,1,2); Vector3d bB(3,4,5); BoundingBox3d3f bbb(aB,bB); BoundingBox3d3f bb=bba; bb.mergeIn(bbb); BoundingBox3d3f bbc=bbb; bbc.mergeIn(bba); TS_ASSERT_EQUALS(bb.min(),bbb.min()); TS_ASSERT_EQUALS(bb.max(),bba.max()); TS_ASSERT_EQUALS(bbc.min(),bbb.min()); TS_ASSERT_EQUALS(bbc.max(),bba.max()); }
fourth() { n4(xnxt,ynxt,h,w4); fs(xnxt,ynxt); xnxt+=s/2; ggg(xnxt,ynxt,h,wg); aaa(xnxt,ynxt,h,wa); mmm(xnxt,ynxt,h,wm); eee(xnxt,ynxt,h,we); xnxt+=s/2; ooo(xnxt,ynxt,h,wo); vvv(xnxt,ynxt,h,wv); eee(xnxt,ynxt,h,we); rrr(xnxt,ynxt,h,wr); xnxt+=s/2; iii(xnxt,ynxt,h,wi); fff(xnxt,ynxt,h,wf); xnxt+=s/2; yyy(xnxt,ynxt,h,wy); ooo(xnxt,ynxt,h,wo); uuu(xnxt,ynxt,h,wu); xnxt+=s/2; mmm(xnxt,ynxt,h,wm); iii(xnxt,ynxt,h,wi); sss(xnxt,ynxt,h,ws); sss(xnxt,ynxt,h,ws); xnxt+=s/2; n5(xnxt,ynxt,h,w5); xnxt+=s/2; bbb(xnxt,ynxt,h,wb); aaa(xnxt,ynxt,h,wa); lll(xnxt,ynxt,h,wl); lll(xnxt,ynxt,h,wl); ooo(xnxt,ynxt,h,wo); ooo(xnxt,ynxt,h,wo); nnn(xnxt,ynxt,h,wn); sss(xnxt,ynxt,h,ws); }
virtual bool run(const string& dbName, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool) { LastError *le = lastError.disableForCommand(); { assert( le ); if ( le->msg.size() && le->nPrev == 1 ){ le->appendSelf( result ); return true; } } ClientInfo * client = ClientInfo::get(); set<string> * shards = client->getPrev(); if ( shards->size() == 0 ){ result.appendNull( "err" ); return true; } //log() << "getlasterror enter: " << shards->size() << endl; vector<OID> writebacks; // handle single server if ( shards->size() == 1 ){ string theShard = *(shards->begin() ); result.append( "theshard" , theShard.c_str() ); ShardConnection conn( theShard , "" ); BSONObj res; bool ok = conn->runCommand( dbName , cmdObj , res ); //log() << "\t" << res << endl; result.appendElements( res ); conn.done(); result.append( "singleShard" , theShard ); addWriteBack( writebacks , res ); // hit other machines just to block for ( set<string>::const_iterator i=client->sinceLastGetError().begin(); i!=client->sinceLastGetError().end(); ++i ){ string temp = *i; if ( temp == theShard ) continue; ShardConnection conn( temp , "" ); addWriteBack( writebacks , conn->getLastErrorDetailed() ); conn.done(); } client->clearSinceLastGetError(); handleWriteBacks( writebacks ); return ok; } BSONArrayBuilder bbb( result.subarrayStart( "shards" ) ); long long n = 0; // hit each shard vector<string> errors; vector<BSONObj> errorObjects; for ( set<string>::iterator i = shards->begin(); i != shards->end(); i++ ){ string theShard = *i; bbb.append( theShard ); ShardConnection conn( theShard , "" ); BSONObj res; bool ok = conn->runCommand( dbName , cmdObj , res ); addWriteBack( writebacks, res ); string temp = DBClientWithCommands::getLastErrorString( res ); if ( ok == false || temp.size() ){ errors.push_back( temp ); errorObjects.push_back( res ); } n += res["n"].numberLong(); conn.done(); } bbb.done(); result.appendNumber( "n" , n ); // hit other machines just to block for ( set<string>::const_iterator i=client->sinceLastGetError().begin(); i!=client->sinceLastGetError().end(); ++i ){ string temp = *i; if ( shards->count( temp ) ) continue; ShardConnection conn( temp , "" ); addWriteBack( writebacks, conn->getLastErrorDetailed() ); conn.done(); } client->clearSinceLastGetError(); if ( errors.size() == 0 ){ result.appendNull( "err" ); handleWriteBacks( writebacks ); return true; } result.append( "err" , errors[0].c_str() ); { // errs BSONArrayBuilder all( result.subarrayStart( "errs" ) ); for ( unsigned i=0; i<errors.size(); i++ ){ all.append( errors[i].c_str() ); } all.done(); } { // errObjects BSONArrayBuilder all( result.subarrayStart( "errObjects" ) ); for ( unsigned i=0; i<errorObjects.size(); i++ ){ all.append( errorObjects[i] ); } all.done(); } handleWriteBacks( writebacks ); return true; }
void ccc() { bbb(); printf("Ccc\n"); }
void aaa ( void ) { bbb(); }
void by() { bbb(xnxt,ynxt,h,wb); yyy(xnxt,ynxt,h,wy); }
int main() { bbb()(); return 0; }
bool ClientInfo::getLastError( const BSONObj& options , BSONObjBuilder& result , bool fromWriteBackListener ) { set<string> * shards = getPrev(); if ( shards->size() == 0 ) { result.appendNull( "err" ); return true; } vector<WBInfo> writebacks; // handle single server if ( shards->size() == 1 ) { string theShard = *(shards->begin() ); ShardConnection conn( theShard , "", true ); BSONObj res; bool ok = false; try{ ok = conn->runCommand( "admin" , options , res ); } catch( std::exception &e ){ warning() << "could not get last error." << causedBy( e ) << endl; // Catch everything that happens here, since we need to ensure we return our connection when we're // finished. conn.done(); return false; } res = res.getOwned(); conn.done(); _addWriteBack( writebacks , res ); // hit other machines just to block for ( set<string>::const_iterator i=sinceLastGetError().begin(); i!=sinceLastGetError().end(); ++i ) { string temp = *i; if ( temp == theShard ) continue; ShardConnection conn( temp , "" ); _addWriteBack( writebacks , conn->getLastErrorDetailed() ); conn.done(); } clearSinceLastGetError(); if ( writebacks.size() ){ vector<BSONObj> v = _handleWriteBacks( writebacks , fromWriteBackListener ); if ( v.size() == 0 && fromWriteBackListener ) { // ok } else { assert( v.size() == 1 ); result.appendElements( v[0] ); result.appendElementsUnique( res ); result.append( "writebackGLE" , v[0] ); result.append( "initialGLEHost" , theShard ); } } else { result.append( "singleShard" , theShard ); result.appendElements( res ); } return ok; } BSONArrayBuilder bbb( result.subarrayStart( "shards" ) ); BSONObjBuilder shardRawGLE; long long n = 0; int updatedExistingStat = 0; // 0 is none, -1 has but false, 1 has true // hit each shard vector<string> errors; vector<BSONObj> errorObjects; for ( set<string>::iterator i = shards->begin(); i != shards->end(); i++ ) { string theShard = *i; bbb.append( theShard ); ShardConnection conn( theShard , "", true ); BSONObj res; bool ok = false; try { ok = conn->runCommand( "admin" , options , res ); shardRawGLE.append( theShard , res ); } catch( std::exception &e ){ // Safe to return here, since we haven't started any extra processing yet, just collecting // responses. warning() << "could not get last error." << causedBy( e ) << endl; conn.done(); return false; } _addWriteBack( writebacks, res ); string temp = DBClientWithCommands::getLastErrorString( res ); if ( conn->type() != ConnectionString::SYNC && ( ok == false || temp.size() ) ) { errors.push_back( temp ); errorObjects.push_back( res ); } n += res["n"].numberLong(); if ( res["updatedExisting"].type() ) { if ( res["updatedExisting"].trueValue() ) updatedExistingStat = 1; else if ( updatedExistingStat == 0 ) updatedExistingStat = -1; } conn.done(); } bbb.done(); result.append( "shardRawGLE" , shardRawGLE.obj() ); result.appendNumber( "n" , n ); if ( updatedExistingStat ) result.appendBool( "updatedExisting" , updatedExistingStat > 0 ); // hit other machines just to block for ( set<string>::const_iterator i=sinceLastGetError().begin(); i!=sinceLastGetError().end(); ++i ) { string temp = *i; if ( shards->count( temp ) ) continue; ShardConnection conn( temp , "" ); _addWriteBack( writebacks, conn->getLastErrorDetailed() ); conn.done(); } clearSinceLastGetError(); if ( errors.size() == 0 ) { result.appendNull( "err" ); _handleWriteBacks( writebacks , fromWriteBackListener ); return true; } result.append( "err" , errors[0].c_str() ); { // errs BSONArrayBuilder all( result.subarrayStart( "errs" ) ); for ( unsigned i=0; i<errors.size(); i++ ) { all.append( errors[i].c_str() ); } all.done(); } { // errObjects BSONArrayBuilder all( result.subarrayStart( "errObjects" ) ); for ( unsigned i=0; i<errorObjects.size(); i++ ) { all.append( errorObjects[i] ); } all.done(); } _handleWriteBacks( writebacks , fromWriteBackListener ); return true; }
void aaa (int arg) { bbb (456); }
bool ClientInfo::getLastError( const string& dbName, const BSONObj& options, BSONObjBuilder& result, string& errmsg, bool fromWriteBackListener) { set<string> * shards = getPrev(); if ( shards->size() == 0 ) { result.appendNull( "err" ); return true; } vector<WBInfo> writebacks; // // TODO: These branches should be collapsed into a single codepath // // handle single server if ( shards->size() == 1 ) { string theShard = *(shards->begin() ); BSONObj res; bool ok = false; { LOG(5) << "gathering response for gle from: " << theShard << endl; ShardConnection conn( theShard , "" ); try { ok = conn->runCommand( dbName , options , res ); } catch( std::exception &e ) { string message = str::stream() << "could not get last error from shard " << theShard << causedBy( e ); warning() << message << endl; errmsg = message; // Catch everything that happens here, since we need to ensure we return our connection when we're // finished. conn.done(); return false; } res = res.getOwned(); conn.done(); } _addWriteBack( writebacks , res ); LOG(4) << "gathering writebacks from " << sinceLastGetError().size() << " hosts for" << " gle (" << theShard << ")" << endl; // hit other machines just to block for ( set<string>::const_iterator i=sinceLastGetError().begin(); i!=sinceLastGetError().end(); ++i ) { string temp = *i; if ( temp == theShard ) continue; LOG(5) << "gathering writebacks for single-shard gle from: " << temp << endl; try { ShardConnection conn( temp , "" ); ON_BLOCK_EXIT_OBJ( conn, &ShardConnection::done ); _addWriteBack( writebacks , conn->getLastErrorDetailed() ); } catch( std::exception &e ){ warning() << "could not clear last error from shard " << temp << causedBy( e ) << endl; } } clearSinceLastGetError(); LOG(4) << "checking " << writebacks.size() << " writebacks for" << " gle (" << theShard << ")" << endl; if ( writebacks.size() ){ vector<BSONObj> v = _handleWriteBacks( writebacks , fromWriteBackListener ); if ( v.size() == 0 && fromWriteBackListener ) { // ok } else { // this will usually be 1 // it can be greater than 1 if a write to a different shard // than the last write op had a writeback // all we're going to report is the first // since that's the current write // but we block for all verify( v.size() >= 1 ); result.appendElements( v[0] ); result.appendElementsUnique( res ); result.append( "writebackGLE" , v[0] ); result.append( "initialGLEHost" , theShard ); } } else { result.append( "singleShard" , theShard ); result.appendElements( res ); } return ok; } BSONArrayBuilder bbb( result.subarrayStart( "shards" ) ); BSONObjBuilder shardRawGLE; long long n = 0; int updatedExistingStat = 0; // 0 is none, -1 has but false, 1 has true // hit each shard vector<string> errors; vector<BSONObj> errorObjects; for ( set<string>::iterator i = shards->begin(); i != shards->end(); i++ ) { string theShard = *i; bbb.append( theShard ); LOG(5) << "gathering a response for gle from: " << theShard << endl; boost::scoped_ptr<ShardConnection> conn; BSONObj res; bool ok = false; try { conn.reset( new ShardConnection( theShard , "" ) ); // constructor can throw if shard is down ok = (*conn)->runCommand( dbName , options , res ); shardRawGLE.append( theShard , res ); } catch( std::exception &e ){ // Safe to return here, since we haven't started any extra processing yet, just collecting // responses. string message = str::stream() << "could not get last error from a shard " << theShard << causedBy( e ); warning() << message << endl; errmsg = message; if (conn) conn->done(); return false; } _addWriteBack( writebacks, res ); string temp = DBClientWithCommands::getLastErrorString( res ); if ( (*conn)->type() != ConnectionString::SYNC && ( ok == false || temp.size() ) ) { errors.push_back( temp ); errorObjects.push_back( res ); } n += res["n"].numberLong(); if ( res["updatedExisting"].type() ) { if ( res["updatedExisting"].trueValue() ) updatedExistingStat = 1; else if ( updatedExistingStat == 0 ) updatedExistingStat = -1; } conn->done(); } bbb.done(); result.append( "shardRawGLE" , shardRawGLE.obj() ); result.appendNumber( "n" , n ); if ( updatedExistingStat ) result.appendBool( "updatedExisting" , updatedExistingStat > 0 ); LOG(4) << "gathering writebacks from " << sinceLastGetError().size() << " hosts for" << " gle (" << shards->size() << " shards)" << endl; // hit other machines just to block for ( set<string>::const_iterator i=sinceLastGetError().begin(); i!=sinceLastGetError().end(); ++i ) { string temp = *i; if ( shards->count( temp ) ) continue; LOG(5) << "gathering writebacks for multi-shard gle from: " << temp << endl; ShardConnection conn( temp , "" ); try { _addWriteBack( writebacks, conn->getLastErrorDetailed() ); } catch( std::exception &e ){ warning() << "could not clear last error from a shard " << temp << causedBy( e ) << endl; } conn.done(); } clearSinceLastGetError(); LOG(4) << "checking " << writebacks.size() << " writebacks for" << " gle (" << shards->size() << " shards)" << endl; if ( errors.size() == 0 ) { result.appendNull( "err" ); _handleWriteBacks( writebacks , fromWriteBackListener ); return true; } result.append( "err" , errors[0].c_str() ); { // errs BSONArrayBuilder all( result.subarrayStart( "errs" ) ); for ( unsigned i=0; i<errors.size(); i++ ) { all.append( errors[i].c_str() ); } all.done(); } { // errObjects BSONArrayBuilder all( result.subarrayStart( "errObjects" ) ); for ( unsigned i=0; i<errorObjects.size(); i++ ) { all.append( errorObjects[i] ); } all.done(); } _handleWriteBacks( writebacks , fromWriteBackListener ); return true; }
void ArrayAdapter::llvmThrowOutOfRangeException( BasicBlockBuilder &basicBlockBuilder, llvm::Value *itemDescRValue, llvm::Value *indexRValue, llvm::Value *sizeRValue, llvm::Value *errorDescRValue ) const { RC::Handle<Context> context = basicBlockBuilder.getContext(); RC::ConstHandle<SizeAdapter> sizeAdapter = basicBlockBuilder.getManager()->getSizeAdapter(); RC::ConstHandle<StringAdapter> stringAdapter = basicBlockBuilder.getManager()->getStringAdapter(); RC::ConstHandle<ConstStringAdapter> constStringAdapter = basicBlockBuilder.getManager()->getConstStringAdapter(); std::vector<llvm::Type const *> argTypes; argTypes.push_back( constStringAdapter->llvmRType( context ) ); argTypes.push_back( sizeAdapter->llvmRType( context ) ); argTypes.push_back( sizeAdapter->llvmRType( context ) ); argTypes.push_back( constStringAdapter->llvmRType( context ) ); llvm::FunctionType const *funcType = llvm::FunctionType::get( basicBlockBuilder->getVoidTy(), argTypes, false ); llvm::AttributeWithIndex AWI[1]; AWI[0] = llvm::AttributeWithIndex::get( ~0u, 0 /*llvm::Attribute::InlineHint | llvm::Attribute::NoUnwind*/ ); llvm::AttrListPtr attrListPtr = llvm::AttrListPtr::get( AWI, 1 ); std::string name = "__ThrowOutOfRangeException"; llvm::Function *func = llvm::cast<llvm::Function>( basicBlockBuilder.getModuleBuilder()->getFunction( name ) ); if ( !func ) { ModuleBuilder &mb = basicBlockBuilder.getModuleBuilder(); func = llvm::cast<llvm::Function>( mb->getOrInsertFunction( name, funcType, attrListPtr ) ); func->setLinkage( llvm::GlobalValue::PrivateLinkage ); FunctionBuilder fb( mb, funcType, func ); llvm::Argument *itemRValue = fb[0]; itemRValue->setName( "itemRValue" ); itemRValue->addAttr( llvm::Attribute::NoCapture ); llvm::Argument *indexRValue = fb[1]; indexRValue->setName( "indexRValue" ); llvm::Argument *sizeRValue = fb[2]; sizeRValue->setName( "sizeRValue" ); llvm::Argument *errorDescRValue = fb[3]; errorDescRValue->setName( "errorDescRValue" ); errorDescRValue->addAttr( llvm::Attribute::NoCapture ); BasicBlockBuilder bbb( fb ); llvm::BasicBlock *entryBB = fb.createBasicBlock( "entry" ); bbb->SetInsertPoint( entryBB ); llvm::Value *errorMsg1PlusIndexPlusErrorMsg2PlusSizePlusErrorMsg3LValue; { Scope subScope( bbb.getScope() ); BasicBlockBuilder subBasicBlockBuilder( bbb, subScope ); llvm::BasicBlock *haveErrorDescBB = fb.createBasicBlock( "haveErrorDescBB" ); llvm::BasicBlock *noErrorDescBB = fb.createBasicBlock( "noErrorDescBB" ); llvm::BasicBlock *goBB = fb.createBasicBlock( "goBB" ); subBasicBlockBuilder->CreateCondBr( subBasicBlockBuilder->CreateIsNotNull( errorDescRValue ), haveErrorDescBB, noErrorDescBB ); subBasicBlockBuilder->SetInsertPoint( haveErrorDescBB ); llvm::Value *haveErrorDescConstStringRValue = errorDescRValue; subBasicBlockBuilder->CreateBr( goBB ); subBasicBlockBuilder->SetInsertPoint( noErrorDescBB ); llvm::Value *noErrorDescConstStringRValue = constStringAdapter->llvmConst( subBasicBlockBuilder, "KL" ); subBasicBlockBuilder->CreateBr( goBB ); subBasicBlockBuilder->SetInsertPoint( goBB ); llvm::PHINode *errorDescConstStringRValue = subBasicBlockBuilder->CreatePHI( haveErrorDescConstStringRValue->getType(), "errorDescConstStringRValue" ); errorDescConstStringRValue->addIncoming( haveErrorDescConstStringRValue, haveErrorDescBB ); errorDescConstStringRValue->addIncoming( noErrorDescConstStringRValue, noErrorDescBB ); llvm::Value *errorMsg0RValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( constStringAdapter, USAGE_RVALUE, context, errorDescConstStringRValue ) ); llvm::Value *errorMsgARValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( constStringAdapter, USAGE_RVALUE, context, constStringAdapter->llvmConst( subBasicBlockBuilder, ": " ) ) ); llvm::Value *errorMsgALValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsgA" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsgALValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, errorMsg0RValue, errorMsgARValue, errorMsgALValue ); llvm::Value *errorMsgBRValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( constStringAdapter, USAGE_RVALUE, context, itemRValue ) ); llvm::Value *errorMsgBLValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsgB" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsgBLValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, stringAdapter->llvmLValueToRValue( subBasicBlockBuilder, errorMsgALValue ), errorMsgBRValue, errorMsgBLValue ); stringAdapter->llvmDispose( subBasicBlockBuilder, errorMsgALValue ); llvm::Value *errorMsgCRValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( constStringAdapter, USAGE_RVALUE, context, constStringAdapter->llvmConst( subBasicBlockBuilder, " (" ) ) ); llvm::Value *errorMsgCLValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsgC" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsgCLValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, stringAdapter->llvmLValueToRValue( subBasicBlockBuilder, errorMsgBLValue ), errorMsgCRValue, errorMsgCLValue ); stringAdapter->llvmDispose( subBasicBlockBuilder, errorMsgBLValue ); llvm::Value *indexStringRValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( sizeAdapter, USAGE_RVALUE, context, indexRValue ) ); llvm::Value *errorMsg1PlusIndexLValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsg1PlusIndex" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsg1PlusIndexLValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, stringAdapter->llvmLValueToRValue( subBasicBlockBuilder, errorMsgCLValue ), indexStringRValue, errorMsg1PlusIndexLValue ); stringAdapter->llvmDispose( subBasicBlockBuilder, errorMsgCLValue ); llvm::Value *errorMsg2RValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( constStringAdapter, USAGE_RVALUE, context, constStringAdapter->llvmConst( subBasicBlockBuilder, ") out of range (" ) ) ); llvm::Value *errorMsg1PlusIndexPlusErrorMsg2LValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsg1PlusIndexPlusErrorMsg2" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2LValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, stringAdapter->llvmLValueToRValue( subBasicBlockBuilder, errorMsg1PlusIndexLValue ), errorMsg2RValue, errorMsg1PlusIndexPlusErrorMsg2LValue ); stringAdapter->llvmDispose( subBasicBlockBuilder, errorMsg1PlusIndexLValue ); llvm::Value *sizeStringRValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( sizeAdapter, USAGE_RVALUE, context, sizeRValue ) ); llvm::Value *errorMsg1PlusIndexPlusErrorMsg2PlusSizeLValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsg1PlusIndexPlusErrorMsg2PlusSize" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2PlusSizeLValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, stringAdapter->llvmLValueToRValue( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2LValue ), sizeStringRValue, errorMsg1PlusIndexPlusErrorMsg2PlusSizeLValue ); stringAdapter->llvmDispose( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2LValue ); llvm::Value *errorMsg3RValue = stringAdapter->llvmCast( subBasicBlockBuilder, ExprValue( constStringAdapter, USAGE_RVALUE, context, constStringAdapter->llvmConst( subBasicBlockBuilder, ")" ) ) ); errorMsg1PlusIndexPlusErrorMsg2PlusSizePlusErrorMsg3LValue = stringAdapter->llvmAlloca( subBasicBlockBuilder, "errorMsg1PlusIndexPlusErrorMsg2PlusSizePlusErrorMsg3" ); stringAdapter->llvmInit( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2PlusSizePlusErrorMsg3LValue ); stringAdapter->llvmCallConcat( subBasicBlockBuilder, stringAdapter->llvmLValueToRValue( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2PlusSizeLValue ), errorMsg3RValue, errorMsg1PlusIndexPlusErrorMsg2PlusSizePlusErrorMsg3LValue ); stringAdapter->llvmDispose( subBasicBlockBuilder, errorMsg1PlusIndexPlusErrorMsg2PlusSizeLValue ); subScope.llvmUnwind( subBasicBlockBuilder ); } llvmThrowException( bbb, errorMsg1PlusIndexPlusErrorMsg2PlusSizePlusErrorMsg3LValue ); bbb->CreateRetVoid(); } std::vector<llvm::Value *> args; args.push_back( itemDescRValue ); args.push_back( indexRValue ); args.push_back( sizeRValue ); args.push_back( errorDescRValue ); basicBlockBuilder->CreateCall( func, args.begin(), args.end() ); }