// File: menhits[P]phplus/src/AstNode.cpp
// Function: AstConstExpression::resolveConstant()
void AstConstExpression::resolveConstant()
{
	if (!inLeftType->isVoid() || !inRightType->isVoid())
	{
		throw PhplusError("AstConstExpression given non void input", INTERNAL_ERROR, getToken());
	}
	
	//leftIn->setInput(ns, Void, Void);
	rightIn->setInput(ns, false, Void, Void);
	
	//error.log("resolveAction called for "+getString(), JSYK);
	
	ns->addNode(move(rightIn->makeCopy(true)), center->token->getText());
	
	/*
	Action rightAction=rightIn->getAction();
	
	void * val=rightAction->execute(nullptr, nullptr);
	
	//center->setInput(ns, false, Void, rightIn->getReturnType());
	
	Action valAction=constGetAction(val, rightAction->getReturnType(), "const expression");
	
	ns->addAction(valAction, center->token->getText());*/
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0x100(%rsp)
movq 0x100(%rsp), %rdi
movq %rdi, 0x48(%rsp)
addq $0x28, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0x15474
jmp 0x15493
movq 0x48(%rsp), %rdi
addq $0x38, %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testb $0x1, %al
jne 0x155b7
movb $0x1, 0xb7(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq %rax, 0x38(%rsp)
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xb690
movq 0x40(%rsp), %rdx
leaq 0xbbd0f(%rip), %rsi     # 0xd11d7
leaq 0xe0(%rsp), %rdi
callq 0xb4c0
jmp 0x154d7
movq 0x48(%rsp), %rsi
movq (%rsi), %rax
movq 0x38(%rax), %rax
leaq 0xb8(%rsp), %rdi
callq *%rax
jmp 0x154ef
movq 0x38(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
movl $0x3, %edx
leaq 0xb8(%rsp), %rcx
callq 0x35600
jmp 0x15510
movq 0x38(%rsp), %rdi
movb $0x0, 0xb7(%rsp)
leaq 0x1000a4(%rip), %rsi    # 0x1155c8
leaq 0x5145(%rip), %rdx      # 0x1a670
callq 0xb640
jmp 0x157aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x1558f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x15582
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xfc00
leaq 0xe0(%rsp), %rdi
callq 0xb6e8
leaq 0xdf(%rsp), %rdi
callq 0xb3f0
testb $0x1, 0xb7(%rsp)
jne 0x155a8
jmp 0x155b2
movq 0x38(%rsp), %rdi
callq 0xb2d0
jmp 0x1579d
movq 0x48(%rsp), %rdi
addq $0x90, %rdi
callq 0x1a5f0
movq 0x48(%rsp), %rsi
movq %rax, 0x18(%rsp)
addq $0x70, %rsi
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1a8f0
leaq 0x102eb9(%rip), %rsi    # 0x1184a8
movq %rsi, 0x10(%rsp)
leaq 0x90(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x1a920
movq 0x10(%rsp), %rsi
leaq 0x80(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x1a920
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
xorl %edx, %edx
callq 0x1a6f0
jmp 0x1563a
leaq 0x80(%rsp), %rdi
callq 0x1a950
leaq 0x90(%rsp), %rdi
callq 0x1a950
leaq 0xa0(%rsp), %rdi
callq 0x1a6e0
movq 0x48(%rsp), %rdi
addq $0x70, %rdi
callq 0x1a6a0
movq 0x48(%rsp), %rdi
movq %rax, (%rsp)
addq $0x90, %rdi
callq 0x1a5f0
movq %rax, %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq 0x70(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl $0x1, %edx
callq *%rax
movq 0x8(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0x1b710
movq 0x48(%rsp), %rdi
addq $0x88, %rdi
callq 0x1bb60
movq %rax, %rdi
addq $0x88, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x1bb80
jmp 0x156dd
movq (%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x3b150
jmp 0x156f2
leaq 0x50(%rsp), %rdi
callq 0xb6e8
leaq 0x78(%rsp), %rdi
callq 0x1b3f0
leaq 0x70(%rsp), %rdi
callq 0x1b3f0
addq $0x108, %rsp            # imm = 0x108
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x1a950
leaq 0x90(%rsp), %rdi
callq 0x1a950
leaq 0xa0(%rsp), %rdi
callq 0x1a6e0
jmp 0x1579d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x15789
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xb6e8
leaq 0x78(%rsp), %rdi
callq 0x1b3f0
leaq 0x70(%rsp), %rdi
callq 0x1b3f0
movq 0xd0(%rsp), %rdi
callq 0xb680
nopw (%rax,%rax)