@@ -320,38 +320,6 @@ function inplace_lookup!(ex, i, frame)
320320 return ex
321321end
322322
323- function evaluate_structtype (@nospecialize (recurse), frame, node)
324- grsvec! (ex:: Expr ) = (ex. args[1 ] = GlobalRef (Core, :svec ); return ex)
325-
326- name, mod = structname (frame, node)
327- supertype = lookup_or_eval (recurse, frame, node. args[4 ]):: Type
328- ismutable = node. args[6 ]:: Bool
329- ninit = node. args[7 ]:: Int
330- newstructexpr = Expr (:struct_type , name, nothing , nothing , supertype, nothing , ismutable, ninit)
331- for idx in (2 , 3 , 5 )
332- ex = newstructexpr. args[idx] = grsvec! (copy (node. args[idx]:: Expr ))
333- for i = 2 : length (ex. args)
334- inplace_lookup! (ex, i, frame)
335- end
336- end
337- Core. eval (mod, newstructexpr)
338- end
339-
340- function evaluate_abstracttype (@nospecialize (recurse), frame, node)
341- name, mod = structname (frame, node)
342- params = lookup_or_eval (recurse, frame, node. args[2 ]):: SimpleVector
343- supertype = lookup_or_eval (recurse, frame, node. args[3 ]):: Type
344- Core. eval (mod, Expr (:abstract_type , name, params, supertype))
345- end
346-
347- function evaluate_primitivetype (@nospecialize (recurse), frame, node)
348- name, mod = structname (frame, node)
349- params = lookup_or_eval (recurse, frame, node. args[2 ]):: SimpleVector
350- nbits = node. args[3 ]:: Int
351- supertype = lookup_or_eval (recurse, frame, node. args[4 ]):: Type
352- Core. eval (mod, Expr (:primitive_type , name, params, nbits, supertype))
353- end
354-
355323function do_assignment! (frame, @nospecialize (lhs), @nospecialize (rhs))
356324 code, data = frame. framecode, frame. framedata
357325 if isa (lhs, SSAValue)
@@ -503,12 +471,6 @@ function step_expr!(@nospecialize(recurse), frame, @nospecialize(node), istoplev
503471 elseif istoplevel
504472 if node. head === :method && length (node. args) > 1
505473 evaluate_methoddef (frame, node)
506- elseif node. head === :struct_type
507- evaluate_structtype (recurse, frame, node)
508- elseif node. head === :abstract_type
509- evaluate_abstracttype (recurse, frame, node)
510- elseif node. head === :primitive_type
511- evaluate_primitivetype (recurse, frame, node)
512474 elseif node. head === :module
513475 error (" this should have been handled by split_expressions" )
514476 elseif node. head === :using || node. head === :import || node. head === :export
0 commit comments