     @jclass_obj_pool[type]
 
   # Returns a ClassFile object. Loads the underlying class, but does not
-  # initialize it.
+  # initialize it. :dyn should be set if the class may not have been present at
+  # compile time, e.g. if we are loading a class as a result of a
+  # Class.forName() call.
   load_class: (type, dyn) ->
     unless @loaded_classes[type]?
       if type instanceof types.ArrayType

  # 5.5 of the SE7 spec.
  class_lookup: (type, dyn) ->
    UNSAFE? || throw new Error "class_lookup needs a type object, got #{typeof type}: #{type}" unless type instanceof types.Type
    return '<primitive>' if type instanceof types.PrimitiveType
    class_file = @load_class type, dyn
    cls = type.toClassString?() ? type.toString()
    unless @class_states[type].fields?
      trace "initializing class: #{cls}"
      @class_states[type].fields = Object.create null
      if type instanceof types.ArrayType
        component = type.component_type

      else if type instanceof types.PrimitiveType
        @loaded_classes[type] = '<primitive>'
      else
        # a class gets loaded with the loader of the class that is triggering
        # this class resolution
        defining_class_state = @class_states[@curr_frame().method.class_type]
        if loader = defining_class_state.loader?
          rs.push loader
