Changeset 860f19f for doc/papers/general/evaluation
- Timestamp:
- Mar 9, 2018, 2:28:09 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 200b2b5, e2c70ab
- Parents:
- e84382b
- Location:
- doc/papers/general/evaluation
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/papers/general/evaluation/c-stack.c
re84382b r860f19f 38 38 _Bool stack_empty( const struct stack * s ) { return s->head == NULL; } 39 39 40 void push_stack( struct stack * s, void * v alue) {40 void push_stack( struct stack * s, void * v ) { 41 41 struct stack_node * n = malloc( sizeof(struct stack_node) ); /***/ 42 *n = (struct stack_node){ v alue, s->head }; /***/42 *n = (struct stack_node){ v, s->head }; /***/ 43 43 s->head = n; 44 44 } -
doc/papers/general/evaluation/cpp-stack.hpp
re84382b r860f19f 12 12 stack() : head( nullptr ) {} 13 13 stack( const stack<T> & o ) { copy( o ); } 14 stack( stack<T> && o ) : head( o.head ) { o.head = nullptr; }15 14 16 15 void clear() { -
doc/papers/general/evaluation/cpp-vstack.cpp
re84382b r860f19f 24 24 stack::stack() : head( nullptr ) {} 25 25 stack::stack( const stack & o ) { copy( o ); } 26 stack::stack( stack && o ) : head( o.head ) { o.head = nullptr; }27 26 stack::~stack() { clear(); } 28 27 … … 31 30 clear(); 32 31 copy( o ); 33 return *this;34 }35 36 stack & stack::operator=( stack && o ) {37 if ( this == &o ) return *this;38 head = o.head;39 o.head = nullptr;40 32 return *this; 41 33 } -
doc/papers/general/evaluation/cpp-vstack.hpp
re84382b r860f19f 15 15 stack(); 16 16 stack( const stack & o ); 17 stack( stack && o );18 17 ~stack(); 19 18 stack & operator=( const stack& o ); 20 stack & operator=( stack && o );21 19 bool empty() const; 22 20 void push( const object & value );
Note: See TracChangeset
for help on using the changeset viewer.