engine_spidermonkey.h   engine_spidermonkey.h 
skipping to change at line 45 skipping to change at line 45
#ifdef WIN32 #ifdef WIN32
#include "jstypes.h" #include "jstypes.h"
#undef JS_PUBLIC_API #undef JS_PUBLIC_API
#undef JS_PUBLIC_DATA #undef JS_PUBLIC_DATA
#define JS_PUBLIC_API(t) t #define JS_PUBLIC_API(t) t
#define JS_PUBLIC_DATA(t) t #define JS_PUBLIC_DATA(t) t
#endif #endif
#include "jsapi.h" #include "jsapi.h"
#include "jsobj.h"
#include "jsdate.h" #include "jsdate.h"
#include "jsregexp.h" #include "jsregexp.h"
#else #else
#include "js/jsapi.h" #include "js/jsapi.h"
#include "js/jsobj.h" #include "js/jsobj.h"
#include "js/jsdate.h" #include "js/jsdate.h"
#include "js/jsregexp.h" #include "js/jsregexp.h"
 End of changes. 1 change blocks. 
0 lines changed or deleted 1 lines changed or added


 update.h   update.h 
skipping to change at line 329 skipping to change at line 329
}; };
/** /**
* stores any information about a single Mod operating on a single Obje ct * stores any information about a single Mod operating on a single Obje ct
*/ */
class ModState { class ModState {
public: public:
const Mod * m; const Mod * m;
BSONElement old; BSONElement old;
const char * fixedName; const char * fixedOpName;
BSONElement * fixed; BSONElement * fixed;
int pushStartSize; int pushStartSize;
BSONType incType; BSONType incType;
int incint; int incint;
double incdouble; double incdouble;
long long inclong; long long inclong;
ModState(){ ModState(){
fixedName = 0; fixedOpName = 0;
fixed = 0; fixed = 0;
pushStartSize = -1; pushStartSize = -1;
incType = EOO; incType = EOO;
} }
Mod::Op op() const { Mod::Op op() const {
return m->op; return m->op;
} }
const char * fieldName() const { const char * fieldName() const {
return m->fieldName; return m->fieldName;
} }
bool needOpLogRewrite() const { bool needOpLogRewrite() const {
if ( fixed || fixedName || incType ) if ( fixed || fixedOpName || incType )
return true; return true;
switch( op() ){ switch( op() ){
case Mod::BIT: case Mod::BIT:
case Mod::BITAND: case Mod::BITAND:
case Mod::BITOR: case Mod::BITOR:
// TODO: should we convert this to $set? // TODO: should we convert this to $set?
return false; return false;
default: default:
return false; return false;
skipping to change at line 376 skipping to change at line 376
} }
void appendForOpLog( BSONObjBuilder& b ) const { void appendForOpLog( BSONObjBuilder& b ) const {
if ( incType ){ if ( incType ){
BSONObjBuilder bb( b.subobjStart( "$set" ) ); BSONObjBuilder bb( b.subobjStart( "$set" ) );
appendIncValue( bb ); appendIncValue( bb );
bb.done(); bb.done();
return; return;
} }
const char * name = fixedName ? fixedName : Mod::modNames[op()] ; const char * name = fixedOpName ? fixedOpName : Mod::modNames[o p()];
BSONObjBuilder bb( b.subobjStart( name ) ); BSONObjBuilder bb( b.subobjStart( name ) );
if ( fixed ) if ( fixed )
bb.appendAs( *fixed , m->fieldName ); bb.appendAs( *fixed , m->fieldName );
else else
bb.append( m->elt ); bb.appendAs( m->elt , m->fieldName );
bb.done(); bb.done();
} }
template< class Builder > template< class Builder >
void apply( Builder& b , BSONElement in ){ void apply( Builder& b , BSONElement in ){
m->apply( b , in , *this ); m->apply( b , in , *this );
} }
template< class Builder > template< class Builder >
void appendIncValue( Builder& b ) const { void appendIncValue( Builder& b ) const {
skipping to change at line 472 skipping to change at line 472
break; break;
} }
case Mod::UNSET: case Mod::UNSET:
case Mod::PULL: case Mod::PULL:
case Mod::PULL_ALL: case Mod::PULL_ALL:
// no-op b/c unset/pull of nothing does nothing // no-op b/c unset/pull of nothing does nothing
break; break;
case Mod::INC: case Mod::INC:
ms.fixedName = "$set"; ms.fixedOpName = "$set";
case Mod::SET: { case Mod::SET: {
m._checkForAppending( m.elt ); m._checkForAppending( m.elt );
b.appendAs( m.elt, m.shortFieldName ); b.appendAs( m.elt, m.shortFieldName );
break; break;
} }
default: default:
stringstream ss; stringstream ss;
ss << "unknown mod in appendNewFromMod: " << m.op; ss << "unknown mod in appendNewFromMod: " << m.op;
throw UserException( 9015, ss.str() ); throw UserException( 9015, ss.str() );
} }
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/