Skip to content

Needs to specify set state to max #16

@arv

Description

@arv

There are a few alg steps like these:

Set _entry_.[[State]] to the max of _entry_.[[State]] and "translate".

We need to specify what this means.

How about:

GetStateValue(state)

  1. If state is the string "fetch" return 0.
  2. If state is the string "translate" return 1.
  3. If state is the string "instantiate" return 2.
  4. If state is the string "link" return 3.
  5. If state is the string "ready" return 4.

SetStateToMax(entry, newState)

  1. Let state be entry.[[State]].
  2. Let stateValue be GetStateValue(state).
  3. Let newStateValue be GetStateValue(newState).
  4. If newStateValue is larger than stateValue, set entry.[[State]] to newState.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions