File: exprstmnt.cc

package info (click to toggle)
icmake 13.05.01-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,132 kB
  • sloc: cpp: 11,595; fortran: 883; makefile: 853; sh: 546; pascal: 342
file content (26 lines) | stat: -rw-r--r-- 664 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#define XERR
#include "semval.ih"

    // called by Parser::exprStmnt

SemVal SemVal::exprStmnt()
{
    bool2int();

    if (d_code.size())
    {
            // current semval: last value on the stack: pop it instead of
            // adding 1 to the SP
        if (d_lastOpcode == Opcode::copy_var)
            d_code[d_code.size() - sizeof(int16_t) - 1] = d_lastOpcode = 
                                                            Opcode::pop_var;
        else if ( 
            (d_type & e_stack) 
            and 
            not (d_type & (e_prefix | e_postfix))
        )
            *this << Opcode::asp << as<uint8_t>(1);
    }

    return move(*this);
}