<commit_before>//===--------------------------- Unwind-sjlj.c ----------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//
//  Implements setjump-longjump based C++ exceptions
//
//===----------------------------------------------------------------------===//

#include <unwind.h>

#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>

#include "config.h"
#include "unwind_ext.h"

//
// 32-bit iOS uses setjump/longjump based C++ exceptions.
// Other architectures use "zero cost" exceptions.
//
// With SJLJ based exceptions, any function that has a catch clause or needs to
// do any clean up when an exception propagates through it, needs to call 
// _Unwind_SjLj_Register() at the start of the function and 
// _Unwind_SjLj_Unregister() at the end.  The register function is called with 
// the address of a block of memory in the function's stack frame.  The runtime
// keeps a linked list (stack) of these blocks - one per thread.  The calling 
// function also sets the personality and lsda fields of the block.
//

#if defined(_LIBUNWIND_BUILD_SJLJ_APIS)

struct _Unwind_FunctionContext {
  // next function in stack of handlers
  struct _Unwind_FunctionContext *prev;

  // set by calling function before registering to be the landing pad
  uintptr_t                       resumeLocation;

  // set by personality handler to be parameters passed to landing pad function
  uintptr_t                       resumeParameters[4];

  // set by calling function before registering
  __personality_routine           personality; // arm offset=24
  uintptr_t                       lsda;        // arm offset=28

  // variable length array, contains registers to restore
  // 0 = r7, 1 = pc, 2 = sp
  void                           *jbuf[];
};

<commit_msg>Correct data types in the _Unwind_FunctionContext struct<commit_after>//===--------------------------- Unwind-sjlj.c ----------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//
//  Implements setjump-longjump based C++ exceptions
//
//===----------------------------------------------------------------------===//

#include <unwind.h>

#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>

#include "config.h"
#include "unwind_ext.h"

//
// 32-bit iOS uses setjump/longjump based C++ exceptions.
// Other architectures use "zero cost" exceptions.
//
// With SJLJ based exceptions, any function that has a catch clause or needs to
// do any clean up when an exception propagates through it, needs to call 
// _Unwind_SjLj_Register() at the start of the function and 
// _Unwind_SjLj_Unregister() at the end.  The register function is called with 
// the address of a block of memory in the function's stack frame.  The runtime
// keeps a linked list (stack) of these blocks - one per thread.  The calling 
// function also sets the personality and lsda fields of the block.
//

#if defined(_LIBUNWIND_BUILD_SJLJ_APIS)

struct _Unwind_FunctionContext {
  // next function in stack of handlers
  struct _Unwind_FunctionContext *prev;

  // set by calling function before registering to be the landing pad
  uint32_t                        resumeLocation;

  // set by personality handler to be parameters passed to landing pad function
  uint32_t                        resumeParameters[4];

  // set by calling function before registering
  __personality_routine           personality; // arm offset=24
  uintptr_t                       lsda;        // arm offset=28

  // variable length array, contains registers to restore
  // 0 = r7, 1 = pc, 2 = sp
  void                           *jbuf[];
};


{'fraction_non_alphanumeric': 0.14625415494758373, 'fraction_numerical': 0.006647916133981079, 'mean_word_length': 2.0876085240726123, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5786136', 'n_tokens_mistral': 1085, 'n_tokens_neox': 1026, 'n_words': 422}