Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 30 lines (23 sloc) 0.464 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#ifndef RBX_UNWIND_INFO_HPP
#define RBX_UNWIND_INFO_HPP

#include <stdint.h>

namespace rubinius {
  // TODO figure out if this is a good number
  const int kMaxUnwindInfos = 20;

  enum UnwindType {
    cRescue = 0,
    cEnsure = 1
  };

  struct UnwindInfo {
    uint32_t target_ip;
    int stack_depth;
    UnwindType type;

    bool for_ensure() {
      return type == cEnsure;
    }

    bool for_rescue() {
      return type == cRescue;
    }
  };
}

#endif
Something went wrong with that request. Please try again.