Changeset 860f19f


Ignore:
Timestamp:
Mar 9, 2018, 2:28:09 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
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
Message:

Clean up code edits

Location:
doc/papers/general
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/Paper.tex

    re84382b r860f19f  
    26372637                                                                        & \CT{C}        & \CT{\CFA}     & \CT{\CC}      & \CT{\CCV}             \\ \hline
    26382638maximum memory usage (MB)                       & 10,001        & 2,502         & 2,503         & 11,253                \\
    2639 source code size (lines)                        & 197           & 186           & 125           & 293                   \\
     2639source code size (lines)                        & 196           & 186           & 125           & 290                   \\
    26402640redundant type annotations (lines)      & 27            & 0                     & 2                     & 16                    \\
    26412641binary size (KB)                                        & 14            & 257           & 14            & 37                    \\
     
    28432843}
    28442844_Bool stack_empty( const struct stack * s ) { return s->head == NULL; }
    2845 void push_stack( struct stack * s, void * value ) {
     2845void push_stack( struct stack * s, void * v ) {
    28462846        struct stack_node * n = malloc( sizeof(struct stack_node) ); /***/
    2847         *n = (struct stack_node){ value, s->head }; /***/
     2847        *n = (struct stack_node){ v, s->head }; /***/
    28482848        s->head = n;
    28492849}
     
    29682968        node * head;
    29692969        stack() : head( nullptr ) {}
    2970         stack( const stack<T> & o) { copy( o ); }
    2971         stack( stack<T> && o ) : head( o.head ) { o.head = nullptr; }
     2970        stack( const stack<T> & o ) { copy( o ); }
    29722971        void clear() {
    29732972                for ( node * next = head; next; ) {
  • doc/papers/general/evaluation/c-stack.c

    re84382b r860f19f  
    3838_Bool stack_empty( const struct stack * s ) { return s->head == NULL; }
    3939
    40 void push_stack( struct stack * s, void * value ) {
     40void push_stack( struct stack * s, void * v ) {
    4141        struct stack_node * n = malloc( sizeof(struct stack_node) ); /***/
    42         *n = (struct stack_node){ value, s->head }; /***/
     42        *n = (struct stack_node){ v, s->head }; /***/
    4343        s->head = n;
    4444}
  • doc/papers/general/evaluation/cpp-stack.hpp

    re84382b r860f19f  
    1212        stack() : head( nullptr ) {}
    1313        stack( const stack<T> & o ) { copy( o ); }
    14         stack( stack<T> && o ) : head( o.head ) { o.head = nullptr; }
    1514
    1615        void clear() {
  • doc/papers/general/evaluation/cpp-vstack.cpp

    re84382b r860f19f  
    2424stack::stack() : head( nullptr ) {}
    2525stack::stack( const stack & o ) { copy( o ); }
    26 stack::stack( stack && o ) : head( o.head ) { o.head = nullptr; }
    2726stack::~stack() { clear(); }
    2827
     
    3130        clear();
    3231        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;
    4032        return *this;
    4133}
  • doc/papers/general/evaluation/cpp-vstack.hpp

    re84382b r860f19f  
    1515        stack();
    1616        stack( const stack & o );
    17         stack( stack && o );
    1817        ~stack();
    1918        stack & operator=( const stack& o );
    20         stack & operator=( stack && o );
    2119        bool empty() const;
    2220        void push( const object & value );
Note: See TracChangeset for help on using the changeset viewer.