<commit_before>#ifndef _OBJECT_H_
#define _OBJECT_H_

#include <string.h>
#include <vector>
#include <string>
#include "type.h"
#include "hash.h"
#include "general.h"
#include "constant.h"
#include "error.h"
#include "utf8.h"
#include "coroutine/coroutine.h"

namespace ink {

class Ink_Expression;
class Ink_ContextObject;
class Ink_ContextChain;
class IGC_CollectEngine;
class Ink_InterpreteEngine;

void IGC_addObject(Ink_InterpreteEngine *current_engine, Ink_Object *obj);

class Ink_Object {
public:
	IGC_MarkType mark;
	Ink_TypeTag type;

	Ink_HashTable *hash_table;
	Ink_HashTable *address;

	char *debug_name;

	Ink_InterpreteEngine *engine;

	Ink_HashTable *proto_hash;
	Ink_Object *base_p;

	Ink_Object(Ink_InterpreteEngine *engine)
	: engine(engine)
	{
		mark = MARK_WHITE; // IGC_Mark_White;
		type = INK_OBJECT;
		hash_table = NULL;
		address = NULL;
		debug_name = NULL;
		proto_hash = NULL;
		base_p = NULL;
		
		initProto(engine);

		if (engine)
			IGC_addObject(engine, this);
		// initMethod();
	}

	void setBase(Ink_Object *obj);

	inline Ink_Object *getBase()
	{
		return base_p;
	}

	static inline Ink_HashTable *traceHashBond(Ink_HashTable *begin, bool set_bondee = true)
	{
		// return begin;
#if 1
		Ink_HashTable *ret = NULL;

		if (!begin) return NULL;

		for (ret = begin; ret->getBonding(); ret = ret->getBonding()) ;
		if (set_bondee)
			ret->setBondee(begin);

		return ret;
#endif
	}

	void initProto(Ink_InterpreteEngine *engine);

	void setProto(Ink_Object *proto);

	inline Ink_HashTable *getProtoHash(bool set_bondee = true)
	{
		return traceHashBond(proto_hash, set_bondee);
	}

	Ink_Object *getProto();

	inline void setDebugName(const char *name)
	{<commit_msg>060416#03: remove a comment<commit_after>#ifndef _OBJECT_H_
#define _OBJECT_H_

#include <string.h>
#include <vector>
#include <string>
#include "type.h"
#include "hash.h"
#include "general.h"
#include "constant.h"
#include "error.h"
#include "utf8.h"
#include "coroutine/coroutine.h"

namespace ink {

class Ink_Expression;
class Ink_ContextObject;
class Ink_ContextChain;
class IGC_CollectEngine;
class Ink_InterpreteEngine;

void IGC_addObject(Ink_InterpreteEngine *current_engine, Ink_Object *obj);

class Ink_Object {
public:
	IGC_MarkType mark;
	Ink_TypeTag type;

	Ink_HashTable *hash_table;
	Ink_HashTable *address;

	char *debug_name;

	Ink_InterpreteEngine *engine;

	Ink_HashTable *proto_hash;
	Ink_Object *base_p;

	Ink_Object(Ink_InterpreteEngine *engine)
	: engine(engine)
	{
		mark = MARK_WHITE; // IGC_Mark_White;
		type = INK_OBJECT;
		hash_table = NULL;
		address = NULL;
		debug_name = NULL;
		proto_hash = NULL;
		base_p = NULL;
		
		initProto(engine);

		if (engine)
			IGC_addObject(engine, this);
		// initMethod();
	}

	void setBase(Ink_Object *obj);

	inline Ink_Object *getBase()
	{
		return base_p;
	}

	static inline Ink_HashTable *traceHashBond(Ink_HashTable *begin, bool set_bondee = true)
	{
		Ink_HashTable *ret = NULL;

		if (!begin) return NULL;

		for (ret = begin; ret->getBonding(); ret = ret->getBonding()) ;
		if (set_bondee)
			ret->setBondee(begin);

		return ret;
	}

	void initProto(Ink_InterpreteEngine *engine);

	void setProto(Ink_Object *proto);

	inline Ink_HashTable *getProtoHash(bool set_bondee = true)
	{
		return traceHashBond(proto_hash, set_bondee);
	}

	Ink_Object *getProto();

	inline void setDebugName(const char *name)
	{
{'fraction_non_alphanumeric': 0.11153846153846154, 'fraction_numerical': 0.003254437869822485, 'mean_word_length': 5.0375, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '4687252', 'n_tokens_mistral': 1406, 'n_tokens_neox': 1310, 'n_words': 286}