void LIR_Assembler::emit_code(BlockList* hir) {
  if (PrintLIR) {
    print_LIR(hir);
  }

  int n = hir->length();
  for (int i = 0; i < n; i++) {
    emit_block(hir->at(i));
    CHECK_BAILOUT();
  }
}
Exemplo n.º 2
0
    void scan(std::istream& stream, std::function<void (const std::string &, int, size_t)> fun) {
      auto line_number = 0;
      for (std::string line; std::getline(stream, line);) {
	line_number++;
	metrics.lines_scanned++;
	if (line.length() > 0) {
	  buffer.push_back(line);
	  if (buffer.full()) {
	    emit_block(line_number, fun);
	  }
	} 
      }
    }
void LIR_Assembler::emit_code(BlockList* hir) {
    if (PrintLIR) {
        print_LIR(hir);
    }

    int n = hir->length();
    for (int i = 0; i < n; i++) {
        emit_block(hir->at(i));
        CHECK_BAILOUT();
    }

    flush_debug_info(code_offset());

    DEBUG_ONLY(check_no_unbound_labels());
}