<commit_before>%%%
%%% Authors:
%%%   <NAME> (<EMAIL>)
%%%
%%% Copyright:
%%%   <NAME>, 1997
%%%
%%% Last change:
%%%   $Date$ by $Author$
%%%   $Revision$
%%%
%%% This file is part of Mozart, an implementation
%%% of Oz 3
%%%    $MOZARTURL$
%%%
%%% See the file "LICENSE" or
%%%    $LICENSEURL$
%%% for information on usage and redistribution
%%% of this file, and for a DISCLAIMER OF ALL
%%% WARRANTIES.
%%%

declare
   Exception Raise
   `RaiseDebugCheck` `RaiseDebugExtend`
in


Raise = `Raise`

local
   GetProp = {`Builtin` 'GetProperty' 2}
in
   fun {`RaiseDebugCheck` T1}
      {GetProp 'errors.debug'} andthen
      {IsDet T1} andthen
      {IsRecord T1} andthen
      {HasFeature T1 debug} andthen
      {IsDet T1.debug} andthen
      {IsRecord T1.debug}
   end
end

local
   GetProp         = {`Builtin` 'GetProperty' 2}
   ThreadThis      = {`Builtin` 'Thread.this' 1}
   ThreadTaskStack = {`Builtin` 'Thread.taskStack' 4}
   ThreadLocation  = {`Builtin` 'Thread.location' 2}
in
   proc {`RaiseDebugExtend` T1 T2}
      L        = {Label T1.debug}
      This     = {ThreadThis}
      N        = {GetProp 'errors.thread'}
      Stack    = {ThreadTaskStack This N false}
      Location = {ThreadLocation This}
   in
      {`Raise` {AdjoinAt
                T1
                debug
                {Adjoin T1.debug
                 L(stack:Stack loc:Location info:T2)}}}
   end<commit_msg>Standard should be completely non-native now<commit_after>%%%
%%% Authors:
%%%   <NAME> (<EMAIL>)
%%%
%%% Copyright:
%%%   <NAME>, 1997
%%%
%%% Last change:
%%%   $Date$ by $Author$
%%%   $Revision$
%%%
%%% This file is part of Mozart, an implementation
%%% of Oz 3
%%%    $MOZARTURL$
%%%
%%% See the file "LICENSE" or
%%%    $LICENSEURL$
%%% for information on usage and redistribution
%%% of this file, and for a DISCLAIMER OF ALL
%%% WARRANTIES.
%%%

declare
   Exception Raise

   `RaiseDebugCheck`
   `RaiseDebugExtend`
in


Raise = `Raise`

`RaiseDebugCheck` = {`Builtin` 'Exception.raiseDebugCheck' 2}

local
   ThreadThis      = {`Builtin` 'Thread.this'           1}
   ThreadTaskStack = {`Builtin` 'Thread.taskStackError' 3}
   ThreadLocation  = {`Builtin` 'Thread.location'       2}
in
   proc {`RaiseDebugExtend` T1 T2}
      L        = {Label T1.debug}
      This     = {ThreadThis}
      Stack    = {ThreadTaskStack This false}
      Location = {ThreadLocation This}
   in
      {`Raise` {AdjoinAt
                T1
                debug
                {Adjoin T1.debug
                 L(stack:Stack loc:Location info:T2)}}}
   end
{'fraction_non_alphanumeric': 0.14218381775333858, 'fraction_numerical': 0.014532600157109192, 'mean_word_length': 2.5375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2853636', 'n_tokens_mistral': 919, 'n_tokens_neox': 878, 'n_words': 237}