<commit_before>#ifndef _IV_LV5_RAILGUN_CORE_DATA_H_
#define _IV_LV5_RAILGUN_CORE_DATA_H_
#include "lv5/railgun/vm_fwd.h"
#include "lv5/railgun/core_data_fwd.h"
#include "lv5/railgun/instruction.h"
namespace iv {
namespace lv5 {
namespace railgun {

GC_ms_entry* CoreData::MarkChildren(GC_word* top,
                                    GC_ms_entry* entry,
                                    GC_ms_entry* mark_sp_limit,
                                    GC_word env) {
  entry = GC_MARK_AND_PUSH(data_,
                           entry, mark_sp_limit, reinterpret_cast<void**>(this));
  entry = GC_MARK_AND_PUSH(targets_,
                           entry, mark_sp_limit, reinterpret_cast<void**>(this));
  if (targets_) {
    for (InstTargets::const_iterator it = targets_->begin(),
         last = targets_->end(); it != last; ++it) {
      // loop and search Map pointer operations
      // check global opcodes
      if (VM::IsOP<OP::LOAD_GLOBAL>(**it) ||
          VM::IsOP<OP::STORE_GLOBAL>(**it) ||
          VM::IsOP<OP::DELETE_GLOBAL>(**it) ||
          VM::IsOP<OP::CALL_GLOBAL>(**it) ||
          VM::IsOP<OP::INCREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::DECREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::POSTFIX_INCREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::POSTFIX_DECREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::TYPEOF_GLOBAL>(**it)) {
        // OPCODE | SYM | MAP
        entry = GC_MARK_AND_PUSH(
            (*it)[2].map,
            entry, mark_sp_limit, reinterpret_cast<void**>(this));
      }
      std::advance(it, (*it)->GetLength());
    }
  }
  return entry;
}

} } }  // namespace iv::lv5::railgun
#endif  // _IV_LV5_RAILGUN_CORE_DATA_H_<commit_msg>fix GC bug in Instruction<commit_after>#ifndef _IV_LV5_RAILGUN_CORE_DATA_H_
#define _IV_LV5_RAILGUN_CORE_DATA_H_
#include "lv5/railgun/vm_fwd.h"
#include "lv5/railgun/core_data_fwd.h"
#include "lv5/railgun/instruction.h"
namespace iv {
namespace lv5 {
namespace railgun {

GC_ms_entry* CoreData::MarkChildren(GC_word* top,
                                    GC_ms_entry* entry,
                                    GC_ms_entry* mark_sp_limit,
                                    GC_word env) {
  entry = GC_MARK_AND_PUSH(data_,
                           entry, mark_sp_limit, reinterpret_cast<void**>(this));
  entry = GC_MARK_AND_PUSH(targets_,
                           entry, mark_sp_limit, reinterpret_cast<void**>(this));
  if (targets_) {
    for (InstTargets::const_iterator it = targets_->begin(),
         last = targets_->end(); it != last; ++it) {
      // loop and search Map pointer operations
      // check global opcodes
      if (VM::IsOP<OP::LOAD_GLOBAL>(**it) ||
          VM::IsOP<OP::STORE_GLOBAL>(**it) ||
          VM::IsOP<OP::DELETE_GLOBAL>(**it) ||
          VM::IsOP<OP::CALL_GLOBAL>(**it) ||
          VM::IsOP<OP::INCREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::DECREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::POSTFIX_INCREMENT_GLOBAL>(**it) ||
          VM::IsOP<OP::POSTFIX_DECREMENT_GLOBAL>(**it)) {
        // OPCODE | SYM | MAP
        entry = GC_MARK_AND_PUSH(
            (*it)[2].map,
            entry, mark_sp_limit, reinterpret_cast<void**>(this));
      }
      std::advance(it, (*it)->GetLength());
    }
  }
  return entry;
}

} } }  // namespace iv::lv5::railgun
#endif  // _IV_LV5_RAILGUN_CORE_DATA_H_
{'fraction_non_alphanumeric': 0.14914645103324348, 'fraction_numerical': 0.005390835579514825, 'mean_word_length': 2.490073145245559, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6315902', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1179, 'n_words': 166}