<commit_before>package uhx.compiletime;
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Type;
import uhx.compiletime.types.*;
import uhx.meta.MetaDef;

using Lambda;
using uhx.compiletime.tools.MacroHelpers;
using haxe.macro.Tools;

class NeedsGlueBuild
{
  static var checkedVersion = false;
  public static function build():Array<Field>
  {
    #if bake_externs
    return null;
    #end
    var localClass = Context.getLocalClass(),
        cls:ClassType = localClass.get();
    if (Context.defined('UHX_DISPLAY')) {
      if (cls.isInterface || cls.isExtern) {
        return null;
      }
      var displayPos = haxe.macro.Compiler.getDisplayPos();
      if (displayPos == null ||
          sys.FileSystem.fullPath(displayPos.file).toLowerCase() != sys.FileSystem.fullPath(Context.getPosInfos(cls.pos).file).toLowerCase()
         )
      {
        return null;
      }

      var fields:Array<Field> = Context.getBuildFields(),
          needsUpdate = false;
      for (field in fields) {
        switch (field.kind) {
        case FFun(fn):
          if (fn.expr == null) {
            fn.expr = macro {throw "Not Implemented";};
            needsUpdate = true;
          }
        case _:
        }
      }
      if (needsUpdate) {
        return fields;
      } else {
        return null;
      }
    }

    // check version level
    if (!checkedVersion) {
      Globals.cur.checkBuildVersionLevel();
      checkedVersion = true;
    }
    var thisType = TypeRef.fromBaseType(cls, cls.pos);

    if (Globals.registeredNumPath == null) {
      trace('Internal error: Registered num path is null (compilation server related?)');
    } else {
      Context.registerModuleDependency(cls.module, Globals.registeredNumPath);
    }

    var disableUObject = Context.defined('UHX_NO_UOBJECT');
    if (disableUObject) {
      var cur = cls;
      while (cur != null) {
        if (cur.name == 'UObject') {
          switch(localClass.toString()) {<commit_msg>[CL-34420] Update to latest perforce change Change 34420 by waneck@wnkdows on 2019/05/16 17:09:54<commit_after>package uhx.compiletime;
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Type;
import uhx.compiletime.types.*;
import uhx.meta.MetaDef;

using Lambda;
using uhx.compiletime.tools.MacroHelpers;
using haxe.macro.Tools;

class NeedsGlueBuild
{
  static var checkedVersion = false;
  public static function build():Array<Field>
  {
    #if bake_externs
    return null;
    #end
    var localClass = Context.getLocalClass(),
        cls:ClassType = localClass.get();
    if (Context.defined('UHX_DISPLAY')) {
      if (cls.isInterface || cls.isExtern) {
        return null;
      }
      var displayPos = haxe.macro.Compiler.getDisplayPos();
      if (displayPos == null ||
          sys.FileSystem.fullPath(displayPos.file).toLowerCase() != sys.FileSystem.fullPath(Context.getPosInfos(cls.pos).file).toLowerCase()
         )
      {
        return null;
      }

      var fields:Array<Field> = Context.getBuildFields(),
          needsUpdate = false;
      for (field in fields) {
        switch (field.kind) {
        case FFun(fn):
          if (fn.expr == null) {
            fn.expr = macro {throw "Not Implemented";};
            needsUpdate = true;
          }
        case _:
        }
      }
      if (needsUpdate) {
        return fields;
      } else {
        return null;
      }
    }

    // check version level
    if (!checkedVersion) {
      Globals.cur.checkBuildVersionLevel();
      checkedVersion = true;
    }
    var thisType = TypeRef.fromBaseType(cls, cls.pos);

    if (Globals.registeredNumPath == null) {
      trace('Internal error: Registered num path is null (compilation server related?)');
    }

    var disableUObject = Context.defined('UHX_NO_UOBJECT');
    if (disableUObject) {
      var cur = cls;
      while (cur != null) {
        if (cur.name == 'UObject') {
          switch(localClass.toString()) {
{'fraction_non_alphanumeric': 0.117988883274381, 'fraction_numerical': 0.00606366851945427, 'mean_word_length': 2.4546247818499127, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7650228', 'n_tokens_mistral': 1268, 'n_tokens_neox': 1216, 'n_words': 267}