Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8234001

[lworld] c1: missing null free array + null check for non flat null free array?

    XMLWordPrintable

Details

    Description

      In LIRGenerator::do_StoreIndexed():
          if (needs_flattened_array_store_check(x)) {
            // Check if we indeed have a flattened array
            index.load_item();
            slow_path = new StoreFlattenedArrayStub(array.result(), index.result(), value.result(), state_for(x));
            check_flattened_array(array.result(), value.result(), slow_path);
            set_in_conditional_code(true);
          } else if (needs_null_free_array_store_check(x)) {
            CodeEmitInfo* info = new CodeEmitInfo(range_check_info);
            check_null_free_array(array, value, info);
          }

      Shouldn't it be:
      if (needs_flattened_array_store_check(x)) {
      }
      if (needs_null_free_array_store_check(x)) {
      }

      If needs_flattened_array_store_check(x) is true then we emit a flattened array check. If the array is not flat at runtime then we fall thru and there's no check for a null free array.
      But the array could be not flat and null free.

      Attachments

        Activity

          People

            Unassigned Unassigned
            roland Roland Westrelin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: