view dmd/OrAssignExp.d @ 32:81796b717a39

A few bad cast fixed. TODO: either get rid of dyncast(), or derive all objects from intermediate supertype.
author korDen
date Tue, 18 May 2010 17:51:46 +0400
parents 10317f0c89a5
children cab4c37afb89
line wrap: on
line source

module dmd.OrAssignExp;

import dmd.BinExp;
import dmd.Loc;
import dmd.Expression;
import dmd.Scope;
import dmd.InterState;
import dmd.OutBuffer;
import dmd.ArrayTypes;
import dmd.Identifier;
import dmd.IRState;
import dmd.TOK;
import dmd.Id;

import dmd.backend.elem;
import dmd.backend.OPER;

class OrAssignExp : BinExp
{
    this(Loc loc, Expression e1, Expression e2)
	{
		super(loc, TOK.TOKorass, OrAssignExp.sizeof, e1, e2);
	}
	
    Expression semantic(Scope sc)
	{
		return commonSemanticAssignIntegral(sc);
	}
	
    Expression interpret(InterState* istate)
	{
		assert(false);
	}
	
    void buildArrayIdent(OutBuffer buf, Expressions arguments)
	{
		assert(false);
	}
	
    Expression buildArrayLoop(Arguments fparams)
	{
		assert(false);
	}

    Identifier opId()    /* For operator overloading */
	{
		return Id.orass;
	}

    elem* toElem(IRState* irs)
	{
		return toElemBin(irs, OPorass);
	}
}