Merge ConstantExpressionEvaluator and CompileTimeConstantResolver

This commit is contained in:
Natalia Ukhorskaya
2013-11-22 16:13:26 +04:00
parent e6923ba29e
commit d63f6843c8
55 changed files with 296 additions and 355 deletions
@@ -244,10 +244,6 @@ public class ExpressionCodegen extends JetVisitor<StackValue, StackValue> implem
try {
if (selector instanceof JetExpression) {
JetExpression expression = (JetExpression) selector;
CompileTimeConstant<?> constant = bindingContext.get(BindingContext.COMPILE_TIME_VALUE, expression);
if (constant != null) {
return StackValue.constant(constant.getValue(), expressionType(expression));
}
JavaClassDescriptor samInterface = bindingContext.get(CodegenBinding.SAM_VALUE, expression);
if (samInterface != null) {
return genSamInterfaceValue(expression, samInterface, visitor);