repo_id
stringclasses
927 values
file_path
stringlengths
99
214
content
stringlengths
2
4.15M
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/universe.objc.m.golden
// Objective-C API for talking to Go package. // gobind -lang=objc // // File is generated by gobind. Do not edit. #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" #include "Universe.objc.h" @implementation Universeerror { } - (nonnull instancetype)initWithRef:(id)ref { if (self) { __ref = ref; self = [super initWithDomain:@"go" code:1 userInfo:@{NSLocalizedDescriptionKey: [self error]}]; } return self; } - (NSString* _Nonnull)error { int32_t refnum = go_seq_go_to_refnum(self._ref); nstring r0 = proxy_error_Error(refnum); NSString *_ret0_ = go_seq_to_objc_string(r0); return _ret0_; } @end nstring cproxy_error_Error(int32_t refnum) { @autoreleasepool { Universeerror* o = go_seq_objc_from_refnum(refnum); NSString* _Nonnull ret0_; ret0_ = [o localizedDescription]; nstring _ret0_ = go_seq_from_objc_string(ret0_); return _ret0_; } } __attribute__((constructor)) static void init() { init_seq(); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/vars.objc.h.golden
// Objective-C API for talking to vars Go package. // gobind -lang=objc vars // // File is generated by gobind. Do not edit. #ifndef __Vars_H__ #define __Vars_H__ @import Foundation; #include "ref.h" #include "Universe.objc.h" @class VarsS; @protocol VarsI; @class VarsI; @protocol VarsI <NSObject> @end @interface VarsS : NSObject <goSeqRefInterface, VarsI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; - (nonnull instancetype)init; @end @interface Vars : NSObject + (BOOL) aBool; + (void) setABool:(BOOL)v; + (double) aFloat; + (void) setAFloat:(double)v; + (float) aFloat32; + (void) setAFloat32:(float)v; + (double) aFloat64; + (void) setAFloat64:(double)v; + (NSString* _Nonnull) aString; + (void) setAString:(NSString* _Nonnull)v; + (VarsS* _Nullable) aStructPtr; + (void) setAStructPtr:(VarsS* _Nullable)v; + (long) anInt; + (void) setAnInt:(long)v; + (int16_t) anInt16; + (void) setAnInt16:(int16_t)v; + (int32_t) anInt32; + (void) setAnInt32:(int32_t)v; + (int64_t) anInt64; + (void) setAnInt64:(int64_t)v; + (int8_t) anInt8; + (void) setAnInt8:(int8_t)v; + (id<VarsI> _Nullable) anInterface; + (void) setAnInterface:(id<VarsI> _Nullable)v; @end @class VarsI; @interface VarsI : NSObject <goSeqRefInterface, VarsI> { } @property(strong, readonly) _Nonnull id _ref; - (nonnull instancetype)initWithRef:(_Nonnull id)ref; @end #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java structs #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "structs.h" jclass proxy_class_structs_I; jmethodID proxy_class_structs_I_cons; static jmethodID mid_I_M; jclass proxy_class_structs_S; jmethodID proxy_class_structs_S_cons; jclass proxy_class_structs_S2; jmethodID proxy_class_structs_S2_cons; jclass proxy_class_structs_Structs; jmethodID proxy_class_structs_Structs_cons; JNIEXPORT void JNICALL Java_structs_Structs__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "structs/S"); proxy_class_structs_S = (*env)->NewGlobalRef(env, clazz); proxy_class_structs_S_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "structs/S2"); proxy_class_structs_S2 = (*env)->NewGlobalRef(env, clazz); proxy_class_structs_S2_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "structs/Structs_"); proxy_class_structs_Structs = (*env)->NewGlobalRef(env, clazz); proxy_class_structs_Structs_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "structs/Structs$proxyI"); proxy_class_structs_I = (*env)->NewGlobalRef(env, clazz); proxy_class_structs_I_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "structs/I"); mid_I_M = (*env)->GetMethodID(env, clazz, "m", "()V"); } JNIEXPORT jobject JNICALL Java_structs_Structs_identity(JNIEnv* env, jclass _clazz, jobject s) { int32_t _s = go_seq_to_refnum(env, s); int32_t r0 = proxystructs__Identity(_s); jobject _r0 = go_seq_from_refnum(env, r0, proxy_class_structs_S, proxy_class_structs_S_cons); return _r0; } JNIEXPORT jobject JNICALL Java_structs_Structs_identityWithError(JNIEnv* env, jclass _clazz, jobject s) { int32_t _s = go_seq_to_refnum(env, s); struct proxystructs__IdentityWithError_return res = proxystructs__IdentityWithError(_s); jobject _r0 = go_seq_from_refnum(env, res.r0, proxy_class_structs_S, proxy_class_structs_S_cons); jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } JNIEXPORT jint JNICALL Java_structs_S__1_1New(JNIEnv *env, jclass clazz) { return new_structs_S(); } JNIEXPORT jobject JNICALL Java_structs_S_identity(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); struct proxystructs_S_Identity_return res = proxystructs_S_Identity(o); jobject _r0 = go_seq_from_refnum(env, res.r0, proxy_class_structs_S, proxy_class_structs_S_cons); jobject _r1 = go_seq_from_refnum(env, res.r1, proxy_class__error, proxy_class__error_cons); go_seq_maybe_throw_exception(env, _r1); return _r0; } JNIEXPORT jdouble JNICALL Java_structs_S_sum(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); double r0 = proxystructs_S_Sum(o); jdouble _r0 = (jdouble)r0; return _r0; } JNIEXPORT void JNICALL Java_structs_S_setX(JNIEnv *env, jobject this, jdouble v) { int32_t o = go_seq_to_refnum_go(env, this); double _v = (double)v; proxystructs_S_X_Set(o, _v); } JNIEXPORT jdouble JNICALL Java_structs_S_getX(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); double r0 = proxystructs_S_X_Get(o); jdouble _r0 = (jdouble)r0; return _r0; } JNIEXPORT void JNICALL Java_structs_S_setY(JNIEnv *env, jobject this, jdouble v) { int32_t o = go_seq_to_refnum_go(env, this); double _v = (double)v; proxystructs_S_Y_Set(o, _v); } JNIEXPORT jdouble JNICALL Java_structs_S_getY(JNIEnv *env, jobject this) { int32_t o = go_seq_to_refnum_go(env, this); double r0 = proxystructs_S_Y_Get(o); jdouble _r0 = (jdouble)r0; return _r0; } JNIEXPORT jint JNICALL Java_structs_S2__1_1New(JNIEnv *env, jclass clazz) { return new_structs_S2(); } JNIEXPORT void JNICALL Java_structs_S2_m(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxystructs_S2_M(o); } JNIEXPORT jstring JNICALL Java_structs_S2_string(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); nstring r0 = proxystructs_S2_String(o); jstring _r0 = go_seq_to_java_string(env, r0); return _r0; } JNIEXPORT jint JNICALL Java_structs_Structs_1__1_1New(JNIEnv *env, jclass clazz) { return new_structs_Structs(); } JNIEXPORT void JNICALL Java_structs_Structs_1_m(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxystructs_Structs_M(o); } JNIEXPORT void JNICALL Java_structs_Structs_00024proxyI_m(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxystructs_I_M(o); } void cproxystructs_I_M(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_structs_I, proxy_class_structs_I_cons); (*env)->CallVoidMethod(env, o, mid_I_M); go_seq_pop_local_frame(env); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12403.objc.go.h.golden
// Objective-C API for talking to issue12403 Go package. // gobind -lang=objc issue12403 // // File is generated by gobind. Do not edit. #ifndef __GO_issue12403_H__ #define __GO_issue12403_H__ #include <stdint.h> #include <objc/objc.h> nstring cproxyissue12403_Parsable_FromJSON(int32_t refnum, nstring jstr); typedef struct cproxyissue12403_Parsable_ToJSON_return { nstring r0; int32_t r1; } cproxyissue12403_Parsable_ToJSON_return; struct cproxyissue12403_Parsable_ToJSON_return cproxyissue12403_Parsable_ToJSON(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.java.c.golden
// Code generated by gobind. DO NOT EDIT. // JNI functions for the Go <=> Java bridge. // // autogenerated by gobind -lang=java keywords #include <android/log.h> #include <stdint.h> #include "seq.h" #include "_cgo_export.h" #include "keywords.h" jclass proxy_class_keywords_KeywordCaller; jmethodID proxy_class_keywords_KeywordCaller_cons; static jmethodID mid_KeywordCaller_Abstract; static jmethodID mid_KeywordCaller_Assert; static jmethodID mid_KeywordCaller_Bool; static jmethodID mid_KeywordCaller_Boolean; static jmethodID mid_KeywordCaller_Break; static jmethodID mid_KeywordCaller_Byte; static jmethodID mid_KeywordCaller_Case; static jmethodID mid_KeywordCaller_Catch; static jmethodID mid_KeywordCaller_Char; static jmethodID mid_KeywordCaller_Class; static jmethodID mid_KeywordCaller_Const; static jmethodID mid_KeywordCaller_Continue; static jmethodID mid_KeywordCaller_Default; static jmethodID mid_KeywordCaller_Do; static jmethodID mid_KeywordCaller_Double; static jmethodID mid_KeywordCaller_Else; static jmethodID mid_KeywordCaller_Enum; static jmethodID mid_KeywordCaller_Extends; static jmethodID mid_KeywordCaller_False; static jmethodID mid_KeywordCaller_Final; static jmethodID mid_KeywordCaller_Finally; static jmethodID mid_KeywordCaller_Float; static jmethodID mid_KeywordCaller_For; static jmethodID mid_KeywordCaller_Goto; static jmethodID mid_KeywordCaller_If; static jmethodID mid_KeywordCaller_Implements; static jmethodID mid_KeywordCaller_Import; static jmethodID mid_KeywordCaller_Instanceof; static jmethodID mid_KeywordCaller_Int; static jmethodID mid_KeywordCaller_Interface; static jmethodID mid_KeywordCaller_Long; static jmethodID mid_KeywordCaller_Native; static jmethodID mid_KeywordCaller_New; static jmethodID mid_KeywordCaller_Nil; static jmethodID mid_KeywordCaller_Null; static jmethodID mid_KeywordCaller_Package; static jmethodID mid_KeywordCaller_Private; static jmethodID mid_KeywordCaller_Protected; static jmethodID mid_KeywordCaller_Public; static jmethodID mid_KeywordCaller_Return; static jmethodID mid_KeywordCaller_Short; static jmethodID mid_KeywordCaller_Static; static jmethodID mid_KeywordCaller_Strictfp; static jmethodID mid_KeywordCaller_Super; static jmethodID mid_KeywordCaller_Switch; static jmethodID mid_KeywordCaller_Synchronized; static jmethodID mid_KeywordCaller_This; static jmethodID mid_KeywordCaller_Throw; static jmethodID mid_KeywordCaller_Throws; static jmethodID mid_KeywordCaller_Transient; static jmethodID mid_KeywordCaller_True; static jmethodID mid_KeywordCaller_Try; static jmethodID mid_KeywordCaller_Void; static jmethodID mid_KeywordCaller_Volatile; static jmethodID mid_KeywordCaller_While; JNIEXPORT void JNICALL Java_keywords_Keywords__1init(JNIEnv *env, jclass _unused) { jclass clazz; clazz = (*env)->FindClass(env, "keywords/Keywords$proxyKeywordCaller"); proxy_class_keywords_KeywordCaller = (*env)->NewGlobalRef(env, clazz); proxy_class_keywords_KeywordCaller_cons = (*env)->GetMethodID(env, clazz, "<init>", "(I)V"); clazz = (*env)->FindClass(env, "keywords/KeywordCaller"); mid_KeywordCaller_Abstract = (*env)->GetMethodID(env, clazz, "abstract_", "()V"); mid_KeywordCaller_Assert = (*env)->GetMethodID(env, clazz, "assert_", "()V"); mid_KeywordCaller_Bool = (*env)->GetMethodID(env, clazz, "bool", "()V"); mid_KeywordCaller_Boolean = (*env)->GetMethodID(env, clazz, "boolean_", "()V"); mid_KeywordCaller_Break = (*env)->GetMethodID(env, clazz, "break_", "()V"); mid_KeywordCaller_Byte = (*env)->GetMethodID(env, clazz, "byte_", "()V"); mid_KeywordCaller_Case = (*env)->GetMethodID(env, clazz, "case_", "()V"); mid_KeywordCaller_Catch = (*env)->GetMethodID(env, clazz, "catch_", "()V"); mid_KeywordCaller_Char = (*env)->GetMethodID(env, clazz, "char_", "()V"); mid_KeywordCaller_Class = (*env)->GetMethodID(env, clazz, "class_", "()V"); mid_KeywordCaller_Const = (*env)->GetMethodID(env, clazz, "const_", "()V"); mid_KeywordCaller_Continue = (*env)->GetMethodID(env, clazz, "continue_", "()V"); mid_KeywordCaller_Default = (*env)->GetMethodID(env, clazz, "default_", "()V"); mid_KeywordCaller_Do = (*env)->GetMethodID(env, clazz, "do_", "()V"); mid_KeywordCaller_Double = (*env)->GetMethodID(env, clazz, "double_", "()V"); mid_KeywordCaller_Else = (*env)->GetMethodID(env, clazz, "else_", "()V"); mid_KeywordCaller_Enum = (*env)->GetMethodID(env, clazz, "enum_", "()V"); mid_KeywordCaller_Extends = (*env)->GetMethodID(env, clazz, "extends_", "()V"); mid_KeywordCaller_False = (*env)->GetMethodID(env, clazz, "false_", "()V"); mid_KeywordCaller_Final = (*env)->GetMethodID(env, clazz, "final_", "()V"); mid_KeywordCaller_Finally = (*env)->GetMethodID(env, clazz, "finally_", "()V"); mid_KeywordCaller_Float = (*env)->GetMethodID(env, clazz, "float_", "()V"); mid_KeywordCaller_For = (*env)->GetMethodID(env, clazz, "for_", "()V"); mid_KeywordCaller_Goto = (*env)->GetMethodID(env, clazz, "goto_", "()V"); mid_KeywordCaller_If = (*env)->GetMethodID(env, clazz, "if_", "()V"); mid_KeywordCaller_Implements = (*env)->GetMethodID(env, clazz, "implements_", "()V"); mid_KeywordCaller_Import = (*env)->GetMethodID(env, clazz, "import_", "()V"); mid_KeywordCaller_Instanceof = (*env)->GetMethodID(env, clazz, "instanceof_", "()V"); mid_KeywordCaller_Int = (*env)->GetMethodID(env, clazz, "int_", "()V"); mid_KeywordCaller_Interface = (*env)->GetMethodID(env, clazz, "interface_", "()V"); mid_KeywordCaller_Long = (*env)->GetMethodID(env, clazz, "long_", "()V"); mid_KeywordCaller_Native = (*env)->GetMethodID(env, clazz, "native_", "()V"); mid_KeywordCaller_New = (*env)->GetMethodID(env, clazz, "new_", "()V"); mid_KeywordCaller_Nil = (*env)->GetMethodID(env, clazz, "nil", "()V"); mid_KeywordCaller_Null = (*env)->GetMethodID(env, clazz, "null_", "()V"); mid_KeywordCaller_Package = (*env)->GetMethodID(env, clazz, "package_", "()V"); mid_KeywordCaller_Private = (*env)->GetMethodID(env, clazz, "private_", "()V"); mid_KeywordCaller_Protected = (*env)->GetMethodID(env, clazz, "protected_", "()V"); mid_KeywordCaller_Public = (*env)->GetMethodID(env, clazz, "public_", "()V"); mid_KeywordCaller_Return = (*env)->GetMethodID(env, clazz, "return_", "()V"); mid_KeywordCaller_Short = (*env)->GetMethodID(env, clazz, "short_", "()V"); mid_KeywordCaller_Static = (*env)->GetMethodID(env, clazz, "static_", "()V"); mid_KeywordCaller_Strictfp = (*env)->GetMethodID(env, clazz, "strictfp_", "()V"); mid_KeywordCaller_Super = (*env)->GetMethodID(env, clazz, "super_", "()V"); mid_KeywordCaller_Switch = (*env)->GetMethodID(env, clazz, "switch_", "()V"); mid_KeywordCaller_Synchronized = (*env)->GetMethodID(env, clazz, "synchronized_", "()V"); mid_KeywordCaller_This = (*env)->GetMethodID(env, clazz, "this_", "()V"); mid_KeywordCaller_Throw = (*env)->GetMethodID(env, clazz, "throw_", "()V"); mid_KeywordCaller_Throws = (*env)->GetMethodID(env, clazz, "throws_", "()V"); mid_KeywordCaller_Transient = (*env)->GetMethodID(env, clazz, "transient_", "()V"); mid_KeywordCaller_True = (*env)->GetMethodID(env, clazz, "true_", "()V"); mid_KeywordCaller_Try = (*env)->GetMethodID(env, clazz, "try_", "()V"); mid_KeywordCaller_Void = (*env)->GetMethodID(env, clazz, "void_", "()V"); mid_KeywordCaller_Volatile = (*env)->GetMethodID(env, clazz, "volatile_", "()V"); mid_KeywordCaller_While = (*env)->GetMethodID(env, clazz, "while_", "()V"); } JNIEXPORT void JNICALL Java_keywords_Keywords_const_1(JNIEnv* env, jclass _clazz, jstring id) { nstring _id = go_seq_from_java_string(env, id); proxykeywords__Const(_id); } JNIEXPORT void JNICALL Java_keywords_Keywords_static_1(JNIEnv* env, jclass _clazz, jstring strictfp_) { nstring _strictfp_ = go_seq_from_java_string(env, strictfp_); proxykeywords__Static(_strictfp_); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_abstract_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Abstract(o); } void cproxykeywords_KeywordCaller_Abstract(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Abstract); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_assert_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Assert(o); } void cproxykeywords_KeywordCaller_Assert(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Assert); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_bool(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Bool(o); } void cproxykeywords_KeywordCaller_Bool(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Bool); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_boolean_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Boolean(o); } void cproxykeywords_KeywordCaller_Boolean(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Boolean); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_break_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Break(o); } void cproxykeywords_KeywordCaller_Break(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Break); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_byte_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Byte(o); } void cproxykeywords_KeywordCaller_Byte(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Byte); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_case_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Case(o); } void cproxykeywords_KeywordCaller_Case(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Case); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_catch_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Catch(o); } void cproxykeywords_KeywordCaller_Catch(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Catch); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_char_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Char(o); } void cproxykeywords_KeywordCaller_Char(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Char); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_class_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Class(o); } void cproxykeywords_KeywordCaller_Class(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Class); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_const_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Const(o); } void cproxykeywords_KeywordCaller_Const(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Const); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_continue_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Continue(o); } void cproxykeywords_KeywordCaller_Continue(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Continue); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_default_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Default(o); } void cproxykeywords_KeywordCaller_Default(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Default); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_do_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Do(o); } void cproxykeywords_KeywordCaller_Do(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Do); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_double_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Double(o); } void cproxykeywords_KeywordCaller_Double(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Double); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_else_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Else(o); } void cproxykeywords_KeywordCaller_Else(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Else); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_enum_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Enum(o); } void cproxykeywords_KeywordCaller_Enum(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Enum); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_extends_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Extends(o); } void cproxykeywords_KeywordCaller_Extends(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Extends); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_false_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_False(o); } void cproxykeywords_KeywordCaller_False(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_False); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_final_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Final(o); } void cproxykeywords_KeywordCaller_Final(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Final); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_finally_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Finally(o); } void cproxykeywords_KeywordCaller_Finally(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Finally); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_float_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Float(o); } void cproxykeywords_KeywordCaller_Float(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Float); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_for_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_For(o); } void cproxykeywords_KeywordCaller_For(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_For); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_goto_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Goto(o); } void cproxykeywords_KeywordCaller_Goto(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Goto); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_if_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_If(o); } void cproxykeywords_KeywordCaller_If(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_If); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_implements_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Implements(o); } void cproxykeywords_KeywordCaller_Implements(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Implements); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_import_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Import(o); } void cproxykeywords_KeywordCaller_Import(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Import); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_instanceof_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Instanceof(o); } void cproxykeywords_KeywordCaller_Instanceof(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Instanceof); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_int_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Int(o); } void cproxykeywords_KeywordCaller_Int(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Int); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_interface_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Interface(o); } void cproxykeywords_KeywordCaller_Interface(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Interface); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_long_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Long(o); } void cproxykeywords_KeywordCaller_Long(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Long); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_native_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Native(o); } void cproxykeywords_KeywordCaller_Native(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Native); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_new_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_New(o); } void cproxykeywords_KeywordCaller_New(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_New); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_nil(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Nil(o); } void cproxykeywords_KeywordCaller_Nil(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Nil); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_null_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Null(o); } void cproxykeywords_KeywordCaller_Null(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Null); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_package_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Package(o); } void cproxykeywords_KeywordCaller_Package(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Package); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_private_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Private(o); } void cproxykeywords_KeywordCaller_Private(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Private); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_protected_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Protected(o); } void cproxykeywords_KeywordCaller_Protected(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Protected); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_public_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Public(o); } void cproxykeywords_KeywordCaller_Public(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Public); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_return_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Return(o); } void cproxykeywords_KeywordCaller_Return(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Return); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_short_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Short(o); } void cproxykeywords_KeywordCaller_Short(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Short); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_static_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Static(o); } void cproxykeywords_KeywordCaller_Static(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Static); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_strictfp_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Strictfp(o); } void cproxykeywords_KeywordCaller_Strictfp(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Strictfp); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_super_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Super(o); } void cproxykeywords_KeywordCaller_Super(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Super); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_switch_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Switch(o); } void cproxykeywords_KeywordCaller_Switch(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Switch); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_synchronized_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Synchronized(o); } void cproxykeywords_KeywordCaller_Synchronized(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Synchronized); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_this_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_This(o); } void cproxykeywords_KeywordCaller_This(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_This); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_throw_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Throw(o); } void cproxykeywords_KeywordCaller_Throw(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Throw); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_throws_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Throws(o); } void cproxykeywords_KeywordCaller_Throws(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Throws); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_transient_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Transient(o); } void cproxykeywords_KeywordCaller_Transient(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Transient); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_true_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_True(o); } void cproxykeywords_KeywordCaller_True(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_True); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_try_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Try(o); } void cproxykeywords_KeywordCaller_Try(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Try); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_void_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Void(o); } void cproxykeywords_KeywordCaller_Void(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Void); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_volatile_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_Volatile(o); } void cproxykeywords_KeywordCaller_Volatile(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_Volatile); go_seq_pop_local_frame(env); } JNIEXPORT void JNICALL Java_keywords_Keywords_00024proxyKeywordCaller_while_1(JNIEnv* env, jobject __this__) { int32_t o = go_seq_to_refnum_go(env, __this__); proxykeywords_KeywordCaller_While(o); } void cproxykeywords_KeywordCaller_While(int32_t refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject o = go_seq_from_refnum(env, refnum, proxy_class_keywords_KeywordCaller, proxy_class_keywords_KeywordCaller_cons); (*env)->CallVoidMethod(env, o, mid_KeywordCaller_While); go_seq_pop_local_frame(env); }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package try has a name that is a Java keyword. // Gobind has to translate it usefully. See Issue #12273. package try func This() string { return "This" }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/universe.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java #ifndef __Universe_H__ #define __Universe_H__ #include <jni.h> extern jclass proxy_class__error; extern jmethodID proxy_class__error_cons; nstring cproxy_error_Error(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/keywords.objc.go.h.golden
// Objective-C API for talking to keywords Go package. // gobind -lang=objc keywords // // File is generated by gobind. Do not edit. #ifndef __GO_keywords_H__ #define __GO_keywords_H__ #include <stdint.h> #include <objc/objc.h> void cproxykeywords_KeywordCaller_Abstract(int32_t refnum); void cproxykeywords_KeywordCaller_Assert(int32_t refnum); void cproxykeywords_KeywordCaller_Bool(int32_t refnum); void cproxykeywords_KeywordCaller_Boolean(int32_t refnum); void cproxykeywords_KeywordCaller_Break(int32_t refnum); void cproxykeywords_KeywordCaller_Byte(int32_t refnum); void cproxykeywords_KeywordCaller_Case(int32_t refnum); void cproxykeywords_KeywordCaller_Catch(int32_t refnum); void cproxykeywords_KeywordCaller_Char(int32_t refnum); void cproxykeywords_KeywordCaller_Class(int32_t refnum); void cproxykeywords_KeywordCaller_Const(int32_t refnum); void cproxykeywords_KeywordCaller_Continue(int32_t refnum); void cproxykeywords_KeywordCaller_Default(int32_t refnum); void cproxykeywords_KeywordCaller_Do(int32_t refnum); void cproxykeywords_KeywordCaller_Double(int32_t refnum); void cproxykeywords_KeywordCaller_Else(int32_t refnum); void cproxykeywords_KeywordCaller_Enum(int32_t refnum); void cproxykeywords_KeywordCaller_Extends(int32_t refnum); void cproxykeywords_KeywordCaller_False(int32_t refnum); void cproxykeywords_KeywordCaller_Final(int32_t refnum); void cproxykeywords_KeywordCaller_Finally(int32_t refnum); void cproxykeywords_KeywordCaller_Float(int32_t refnum); void cproxykeywords_KeywordCaller_For(int32_t refnum); void cproxykeywords_KeywordCaller_Goto(int32_t refnum); void cproxykeywords_KeywordCaller_If(int32_t refnum); void cproxykeywords_KeywordCaller_Implements(int32_t refnum); void cproxykeywords_KeywordCaller_Import(int32_t refnum); void cproxykeywords_KeywordCaller_Instanceof(int32_t refnum); void cproxykeywords_KeywordCaller_Int(int32_t refnum); void cproxykeywords_KeywordCaller_Interface(int32_t refnum); void cproxykeywords_KeywordCaller_Long(int32_t refnum); void cproxykeywords_KeywordCaller_Native(int32_t refnum); void cproxykeywords_KeywordCaller_New(int32_t refnum); void cproxykeywords_KeywordCaller_Nil(int32_t refnum); void cproxykeywords_KeywordCaller_Null(int32_t refnum); void cproxykeywords_KeywordCaller_Package(int32_t refnum); void cproxykeywords_KeywordCaller_Private(int32_t refnum); void cproxykeywords_KeywordCaller_Protected(int32_t refnum); void cproxykeywords_KeywordCaller_Public(int32_t refnum); void cproxykeywords_KeywordCaller_Return(int32_t refnum); void cproxykeywords_KeywordCaller_Short(int32_t refnum); void cproxykeywords_KeywordCaller_Static(int32_t refnum); void cproxykeywords_KeywordCaller_Strictfp(int32_t refnum); void cproxykeywords_KeywordCaller_Super(int32_t refnum); void cproxykeywords_KeywordCaller_Switch(int32_t refnum); void cproxykeywords_KeywordCaller_Synchronized(int32_t refnum); void cproxykeywords_KeywordCaller_This(int32_t refnum); void cproxykeywords_KeywordCaller_Throw(int32_t refnum); void cproxykeywords_KeywordCaller_Throws(int32_t refnum); void cproxykeywords_KeywordCaller_Transient(int32_t refnum); void cproxykeywords_KeywordCaller_True(int32_t refnum); void cproxykeywords_KeywordCaller_Try(int32_t refnum); void cproxykeywords_KeywordCaller_Void(int32_t refnum); void cproxykeywords_KeywordCaller_Volatile(int32_t refnum); void cproxykeywords_KeywordCaller_While(int32_t refnum); #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue10788.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java issue10788 #ifndef __Issue10788_H__ #define __Issue10788_H__ #include <jni.h> extern jclass proxy_class_issue10788_TestInterface; extern jmethodID proxy_class_issue10788_TestInterface_cons; void cproxyissue10788_TestInterface_DoSomeWork(int32_t refnum, int32_t s); void cproxyissue10788_TestInterface_MultipleUnnamedParams(int32_t refnum, nint p0, nstring p1, int64_t p2); extern jclass proxy_class_issue10788_TestStruct; extern jmethodID proxy_class_issue10788_TestStruct_cons; #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/structs.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package structs type S struct { X, Y float64 unexported bool } func (s *S) Sum() float64 { return s.X + s.Y } func (s *S) Identity() (*S, error) { return s, nil } func Identity(s *S) *S { return s } func IdentityWithError(s *S) (*S, error) { return s, nil } type ( S2 struct{} I interface { M() } ) func (s *S2) M() { } func (_ *S2) String() string { return "" } // Structs is a struct with the same name as its package. type Structs struct{} func (_ *Structs) M() { }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/try.java.h.golden
// Code generated by gobind. DO NOT EDIT. // JNI function headers for the Go <=> Java bridge. // // autogenerated by gobind -lang=java try #ifndef __Try_H__ #define __Try_H__ #include <jni.h> #endif
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/java.go.golden
// Code generated by gobind. DO NOT EDIT. package Float import "Java" const _ = Java.Dummy const ( MAX_VALUE = 3.4028235E38 MIN_NORMAL = 1.17549435E-38 MIN_VALUE = 1.4E-45 MAX_EXPONENT = 127 MIN_EXPONENT = -126 SIZE = 32 BYTES = 4 ) var ( // Cast takes a proxy for a Java object and converts it to a java.lang.Float proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.Float. Cast func(v interface{}) Java.Java_lang_Float ) // Code generated by gobind. DO NOT EDIT. package lang import "Java" const _ = Java.Dummy type Float Java.Java_lang_Float type Long Java.Java_lang_Long type Object Java.Java_lang_Object type Runnable Java.Java_lang_Runnable // Code generated by gobind. DO NOT EDIT. package Long import "Java" const _ = Java.Dummy const ( MIN_VALUE = -9223372036854775808 MAX_VALUE = 9223372036854775807 SIZE = 64 BYTES = 8 ) var ( // Cast takes a proxy for a Java object and converts it to a java.lang.Long proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.Long. Cast func(v interface{}) Java.Java_lang_Long ) // Code generated by gobind. DO NOT EDIT. package Object import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.lang.Object proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.Object. Cast func(v interface{}) Java.Java_lang_Object ) // Code generated by gobind. DO NOT EDIT. package Runnable import "Java" const _ = Java.Dummy const () var ( // Cast takes a proxy for a Java object and converts it to a java.lang.Runnable proxy. // Cast panics if the argument is not a proxy or if the underlying object does // not extend or implement java.lang.Runnable. Cast func(v interface{}) Java.Java_lang_Runnable ) // Code generated by gobind. DO NOT EDIT. package Java // Used to silence this package not used errors const Dummy = 0 type Java_lang_Float interface { ToString() string } type Java_lang_Long interface { ToString() string } type Java_lang_Object interface { ToString() string } type Java_lang_Runnable interface { } // Code generated by gobind. DO NOT EDIT. package main /* #include <stdlib.h> // for free() #include <jni.h> #include "seq.h" #include "classes.h" */ import "C" import ( "Java" _seq "golang.org/x/mobile/bind/seq" ) import "Java/java/lang/Float" import "Java/java/lang/Long" import "Java/java/lang/Object" import "Java/java/lang/Runnable" import "unsafe" import "reflect" import "fmt" type proxy interface{ Bind_proxy_refnum__() int32 } // Suppress unused package error var _ = _seq.FromRefNum const _ = Java.Dummy //export initClasses func initClasses() { C.init_proxies() init_java_lang_Float() init_java_lang_Long() init_java_lang_Object() init_java_lang_Runnable() } var class_java_lang_Float C.jclass func init_java_lang_Float() { cls := C.CString("java/lang/Float") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_Float = clazz Float.Cast = func(v interface{}) Java.Java_lang_Float { t := reflect.TypeOf((*proxy_class_java_lang_Float)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Float) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_Float) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Float")) } return cv } } type proxy_class_java_lang_Float _seq.Ref func (p *proxy_class_java_lang_Float) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_lang_Float) ToString() string { res := C.cproxy_java_lang_Float_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_lang_Long C.jclass func init_java_lang_Long() { cls := C.CString("java/lang/Long") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_Long = clazz Long.Cast = func(v interface{}) Java.Java_lang_Long { t := reflect.TypeOf((*proxy_class_java_lang_Long)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Long) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_Long) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Long")) } return cv } } type proxy_class_java_lang_Long _seq.Ref func (p *proxy_class_java_lang_Long) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_lang_Long) ToString() string { res := C.cproxy_java_lang_Long_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_lang_Object C.jclass func init_java_lang_Object() { cls := C.CString("java/lang/Object") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_Object = clazz Object.Cast = func(v interface{}) Java.Java_lang_Object { t := reflect.TypeOf((*proxy_class_java_lang_Object)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Object) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_Object) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Object")) } return cv } } type proxy_class_java_lang_Object _seq.Ref func (p *proxy_class_java_lang_Object) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxy_class_java_lang_Object) ToString() string { res := C.cproxy_java_lang_Object_toString(C.jint(p.Bind_proxy_refnum__())) _res := decodeString(res.res) var _exc error _exc_ref := _seq.FromRefNum(int32(res.exc)) if _exc_ref != nil { if res.exc < 0 { // go object _exc = _exc_ref.Get().(error) } else { // foreign object _exc = (*proxy_error)(_exc_ref) } } if _exc != nil { panic(_exc) } return _res } var class_java_lang_Runnable C.jclass func init_java_lang_Runnable() { cls := C.CString("java/lang/Runnable") clazz := C.go_seq_find_class(cls) C.free(unsafe.Pointer(cls)) if uintptr(clazz) == 0 { return } class_java_lang_Runnable = clazz Runnable.Cast = func(v interface{}) Java.Java_lang_Runnable { t := reflect.TypeOf((*proxy_class_java_lang_Runnable)(nil)) cv := reflect.ValueOf(v).Convert(t).Interface().(*proxy_class_java_lang_Runnable) ref := C.jint(_seq.ToRefNum(cv)) if C.go_seq_isinstanceof(ref, class_java_lang_Runnable) != 1 { panic(fmt.Errorf("%T is not an instance of %s", v, "java.lang.Runnable")) } return cv } } type proxy_class_java_lang_Runnable _seq.Ref func (p *proxy_class_java_lang_Runnable) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } // Code generated by gobind. DO NOT EDIT. // Package main is an autogenerated binder stub for package java. // // autogenerated by gobind -lang=go java package main /* #include <stdlib.h> #include <stdint.h> #include "seq.h" #include "java.h" */ import "C" import ( _seq "golang.org/x/mobile/bind/seq" "java" ) // suppress the error if seq ends up unused var _ = _seq.FromRefNum //export proxyjava_F_ToString func proxyjava_F_ToString(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(java.F) res_0 := v.ToString() _res_0 := encodeString(res_0) return _res_0 } type proxyjava_F _seq.Ref func (p *proxyjava_F) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyjava_F) ToString() string { res := C.cproxyjava_F_ToString(C.int32_t(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } //export proxyjava_L_ToString func proxyjava_L_ToString(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(java.L) res_0 := v.ToString() _res_0 := encodeString(res_0) return _res_0 } type proxyjava_L _seq.Ref func (p *proxyjava_L) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyjava_L) ToString() string { res := C.cproxyjava_L_ToString(C.int32_t(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } //export proxyjava_O_ToString func proxyjava_O_ToString(refnum C.int32_t) C.nstring { ref := _seq.FromRefNum(int32(refnum)) v := ref.Get().(java.O) res_0 := v.ToString() _res_0 := encodeString(res_0) return _res_0 } type proxyjava_O _seq.Ref func (p *proxyjava_O) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() } func (p *proxyjava_O) ToString() string { res := C.cproxyjava_O_ToString(C.int32_t(p.Bind_proxy_refnum__())) _res := decodeString(res) return _res } type proxyjava_R _seq.Ref func (p *proxyjava_R) Bind_proxy_refnum__() int32 { return (*_seq.Ref)(p).Bind_IncNum() }
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/java.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package java import ( "Java/java/lang" ) type ( F lang.Float L lang.Long O lang.Object R lang.Runnable )
testdata
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/issue12328.java.golden
// Code generated by gobind. DO NOT EDIT. // Java class issue12328.T is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue12328 package issue12328; import go.Seq; public final class T implements Seq.Proxy { static { Issue12328.touch(); } private final int refnum; @Override public final int incRefnum() { Seq.incGoRef(refnum, this); return refnum; } T(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); } public T() { this.refnum = __New(); Seq.trackGoRef(refnum, this); } private static native int __New(); public final native java.lang.Exception getErr(); public final native void setErr(java.lang.Exception v); @Override public boolean equals(Object o) { if (o == null || !(o instanceof T)) { return false; } T that = (T)o; java.lang.Exception thisErr = getErr(); java.lang.Exception thatErr = that.getErr(); if (thisErr == null) { if (thatErr != null) { return false; } } else if (!thisErr.equals(thatErr)) { return false; } return true; } @Override public int hashCode() { return java.util.Arrays.hashCode(new Object[] {getErr()}); } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("T").append("{"); b.append("Err:").append(getErr()).append(","); return b.append("}").toString(); } } // Code generated by gobind. DO NOT EDIT. // Java class issue12328.Issue12328 is a proxy for talking to a Go program. // // autogenerated by gobind -lang=java issue12328 package issue12328; import go.Seq; public abstract class Issue12328 { static { Seq.touch(); // for loading the native library _init(); } private Issue12328() {} // uninstantiable // touch is called from other bound packages to initialize this package public static void touch() {} private static native void _init(); }
cgopkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/cgopkg/cgopkg.go
package cgopkg import "C" import ( _ "golang.org/x/mobile/gl" ) func Dummy() {}
testpkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/testpkg.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package testpkg contains bound functions for testing the cgo-JNI interface. // This is used in tests of golang.org/x/mobile/bind/java. package testpkg //go:generate gobind -lang=go -outdir=go_testpkg . //go:generate gobind -lang=java -outdir=. . import ( "context" "errors" "fmt" "io/ioutil" "log" "math" "os" "runtime" "syscall" "time" "golang.org/x/mobile/asset" "golang.org/x/mobile/bind/testdata/testpkg/secondpkg" "golang.org/x/mobile/bind/testdata/testpkg/simplepkg" "golang.org/x/mobile/bind/testdata/testpkg/unboundpkg" ) const ( AString = "a string" AnInt = 7 ABool = true AFloat = 0.12345 MinInt32 int32 = math.MinInt32 MaxInt32 int32 = math.MaxInt32 MinInt64 = math.MinInt64 MaxInt64 = math.MaxInt64 SmallestNonzeroFloat64 = math.SmallestNonzeroFloat64 MaxFloat64 = math.MaxFloat64 SmallestNonzeroFloat32 float32 = math.SmallestNonzeroFloat64 MaxFloat32 float32 = math.MaxFloat32 Log2E = math.Log2E ) var ( StringVar = "a string var" IntVar = 77 StructVar = &S{name: "a struct var"} InterfaceVar I InterfaceVar2 I2 NodeVar = &Node{V: "a struct var"} ) type Nummer interface { Num() } type I interface { F() E() error V() int VE() (int, error) I() I S() *S StoString(seq *S) string String() string } func CallF(i I) { i.F() } func CallE(i I) error { return i.E() } func CallV(i I) int { return i.V() } func CallVE(i I) (int, error) { return i.VE() } func CallI(i I) I { return i } func CallS(i I) *S { return &S{} } var keep []I func Keep(i I) { keep = append(keep, i) } var numSCollected int type S struct { // *S already has a finalizer, so we need another object // to count successful collections. innerObj *int name string } func (s *S) F() { fmt.Printf("called F on *S{%s}\n", s.name) } func (s *S) String() string { return s.name } func finalizeInner(a *int) { numSCollected++ } var seq = 0 func New() *S { s := &S{innerObj: new(int), name: fmt.Sprintf("new%d", seq)} runtime.SetFinalizer(s.innerObj, finalizeInner) return s } func GC() { runtime.GC() time.Sleep(10 * time.Millisecond) runtime.GC() } func Add(x, y int) int { return x + y } func NumSCollected() int { return numSCollected } func I2Dup(i I2) I2 { return i } func IDup(i I) I { return i } func StrDup(s string) string { return s } func Negate(x bool) bool { return !x } func Err(s string) error { if s != "" { return errors.New(s) } return nil } func BytesAppend(a []byte, b []byte) []byte { return append(a, b...) } func AppendToString(str string, someBytes []byte) []byte { a := []byte(str) fmt.Printf("str=%q (len=%d), someBytes=%v (len=%d)\n", str, len(str), someBytes, len(someBytes)) return append(a, someBytes...) } func UnnamedParams(_, _ int, p0 string) int { return len(p0) } type Node struct { V string Next *Node Err error } func NewNode(name string) *Node { return &Node{V: name} } func (a *Node) String() string { if a == nil { return "<end>" } return a.V + ":" + a.Next.String() } type Receiver interface { Hello(message string) } func Hello(r Receiver, name string) { r.Hello(fmt.Sprintf("Hello, %s!\n", name)) } func GarbageCollect() { runtime.GC() } type ( Concrete struct{} Interface interface { F() } ) func (_ *Concrete) F() { } func NewConcrete() *Concrete { return new(Concrete) } func ReadAsset() string { rc, err := asset.Open("hello.txt") if err != nil { log.Fatal(err) } defer rc.Close() b, err := ioutil.ReadAll(rc) if err != nil { log.Fatal(err) } return string(b) } type GoCallback interface { VarUpdate() } func CallWithCallback(gcb GoCallback) { for i := 0; i < 1000; i++ { gcb.VarUpdate() } } type NullTest interface { Null() NullTest } func NewNullInterface() I { return nil } func NewNullStruct() *S { return nil } func CallWithNull(_null NullTest, nuller NullTest) bool { return _null == nil && nuller.Null() == nil } type Issue20330 struct{} func NewIssue20330() *Issue20330 { return new(Issue20330) } func (i *Issue20330) CallWithNull(_null *Issue20330) bool { return _null == nil } type Issue14168 interface { F(seq int32) } func ReadIntoByteArray(s []byte) (int, error) { if len(s) != cap(s) { return 0, fmt.Errorf("cap %d != len %d", cap(s), len(s)) } for i := 0; i < len(s); i++ { s[i] = byte(i) } return len(s), nil } type B interface { B(b []byte) } func PassByteArray(b B) { b.B([]byte{1, 2, 3, 4}) } func GoroutineCallback(r Receiver) { done := make(chan struct{}) go func() { // Run it multiple times to increase the chance that the goroutine // will use different threads for the call. Use a long argument string to // make sure the JNI calls take more time. for i := 0; i < 100000; i++ { r.Hello("HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello") } close(done) }() <-done } func Hi() { fmt.Println("Hi") } func Int(x int32) { fmt.Println("Received int32", x) } type I2 interface { Times(v int32) int64 Error(triggerError bool) error StringError(s string) (string, error) } type myI2 struct{} func (_ *myI2) Times(v int32) int64 { return int64(v) * 10 } func (_ *myI2) Error(e bool) error { if e { return errors.New("some error") } return nil } func (_ *myI2) StringError(s string) (string, error) { return s, nil } func CallIError(i I2, triggerError bool) error { return i.Error(triggerError) } func CallIStringError(i I2, s string) (string, error) { return i.StringError(s) } func NewI() I2 { return &myI2{} } var pinnedI = make(map[int32]I2) func RegisterI(idx int32, i I2) { pinnedI[idx] = i } func UnregisterI(idx int32) { delete(pinnedI, idx) } func Multiply(idx int32, val int32) int64 { i, ok := pinnedI[idx] if !ok { panic(fmt.Sprintf("unknown I2 with index %d", idx)) } return i.Times(val) } func AppendHello(s string) string { return fmt.Sprintf("Hello, %s!", s) } func ReturnsError(b bool) (string, error) { if b { return "", errors.New("Error") } return "OK", nil } var collectS2 = make(chan struct{}, 100) func finalizeS(a *S2) { collectS2 <- struct{}{} } func CollectS2(want, timeoutSec int) int { runtime.GC() tick := time.NewTicker(time.Duration(timeoutSec) * time.Second) defer tick.Stop() for i := 0; i < want; i++ { select { case <-collectS2: case <-tick.C: fmt.Println("CollectS: timed out") return i } } return want } type S2 struct { X, Y float64 unexported bool } func NewS2(x, y float64) *S2 { s := &S2{X: x, Y: y} runtime.SetFinalizer(s, finalizeS) return s } func (_ *S2) TryTwoStrings(first, second string) string { return first + second } func (s *S2) Sum() float64 { return s.X + s.Y } func CallSSum(s *S2) float64 { return s.Sum() } // Issue #13033 type NullFieldStruct struct { F *S } func NewNullFieldStruct() *NullFieldStruct { return &NullFieldStruct{} } var ( ImportedVarI secondpkg.I = NewImportedI() ImportedVarS *secondpkg.S = NewImportedS() ) type ( ImportedFields struct { I secondpkg.I S *secondpkg.S } ImportedI interface { F(_ secondpkg.I) } AnSer struct{} ) func (_ *AnSer) S(_ *secondpkg.S) { } func NewImportedFields() *ImportedFields { return &ImportedFields{ I: NewImportedI(), S: NewImportedS(), } } func NewImportedI() secondpkg.I { return NewImportedS() } func NewImportedS() *secondpkg.S { return new(secondpkg.S) } func WithImportedI(i secondpkg.I) secondpkg.I { return i } func WithImportedS(s *secondpkg.S) *secondpkg.S { return s } func CallImportedI(i secondpkg.I) { i.F(0) } func NewSer() *AnSer { return nil } func NewSimpleS() *simplepkg.S { return nil } func UnboundS(_ *unboundpkg.S) { } func UnboundI(_ unboundpkg.I) { } type ( InterfaceDupper interface { IDup(i Interface) Interface } ConcreteDupper interface { CDup(c *Concrete) *Concrete } ) func CallIDupper(d InterfaceDupper) bool { var want Interface = new(Concrete) got := d.IDup(want) return got == want } func CallCDupper(d ConcreteDupper) bool { want := new(Concrete) got := d.CDup(want) return got == want } type EmptyErrorer interface { EmptyError() error } func EmptyError() error { return errors.New("") } func CallEmptyError(c EmptyErrorer) error { return c.EmptyError() } func Init() {} type InitCaller struct{} func NewInitCaller() *InitCaller { return new(InitCaller) } func (ic *InitCaller) Init() {} type Issue17073 interface { OnError(err error) } func ErrorMessage(err error) string { return err.Error() } var GlobalErr error = errors.New("global err") func IsGlobalErr(err error) bool { return GlobalErr == err } type S3 struct { } type S4 struct { I int } func NewS4WithInt(i int) *S4 { return &S4{i} } func NewS4WithFloat(f float64) *S4 { return &S4{int(f)} } func NewS4WithBoolAndError(b bool) (*S4, error) { if b { return nil, errors.New("some error") } return new(S4), nil } // Lifted from TestEPIPE in package os. func TestSIGPIPE() { r, w, err := os.Pipe() if err != nil { panic(err) } if err := r.Close(); err != nil { panic(err) } _, err = w.Write([]byte("hi")) if err == nil { panic("unexpected success of Write to broken pipe") } if pe, ok := err.(*os.PathError); ok { err = pe.Err } if se, ok := err.(*os.SyscallError); ok { err = se.Err } if err != syscall.EPIPE { panic(fmt.Errorf("got %v, expected EPIPE", err)) } } // Testpkg is an empty interface with the same name as its package. type Testpkg interface{} func ClashingParameterFromOtherPackage(_ *secondpkg.Secondpkg) {} type MyStruct struct { } // Test that constructors with incompatible signatures are ignored. func NewMyStruct(ctx context.Context) *MyStruct { return nil } type Int32Constructed struct{} // Test that constuctors that clash with the internal proxy constructor // are skipped. func NewInt32Constructed(i int32) *Int32Constructed { return nil }
testpkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/tagged.go
// Copyright 2017 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build aaa && bbb // This file tests that tags work with gomobile. package testpkg const TaggedConst = 42
objcpkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/objcpkg/objc.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package objcpkg import ( "ObjC/Foundation/NSDate" "ObjC/Foundation/NSString" "ObjC/QuartzCore/CAMediaTimingFunction" ) func Func() { NSDate.Date() CAMediaTimingFunction.FunctionWithControlPoints(0, 0, 0, 0) } func Method() string { d := NSDate.Date() return d.Description() } func New() { NSDate.New() CAMediaTimingFunction.NewWithControlPoints(0, 0, 0, 0) } func Error() { str, err := NSString.StringWithContentsOfFileEncodingError("<non-existent>", 0) if err == nil { panic("no error from stringWithContentsOfFile") } // Assert err is an error err = err.(error) if str != "" { panic("non-empty string from stringWithContentsOfFile") } str, err = NSString.NewWithContentsOfFileEncodingError("<non-existent>", 0) if err == nil { panic("no error from stringWithContentsOfFile") } // Assert err is an error err = err.(error) if str != "" { panic("non-empty string from initWithContentsOfFile") } }
objcpkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/objcpkg/classes.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package objcpkg import ( "ObjC/Foundation" gopkg "ObjC/Objcpkg" "ObjC/UIKit" ) const ( DescriptionStr = "Descriptrion from Go" Hash = 42 ) type GoNSDate struct { Foundation.NSDate } func (d *GoNSDate) Hash(self gopkg.GoNSDate) int { return Hash } func (d *GoNSDate) Description(self gopkg.GoNSDate) string { // Test self call if h := self.Hash(); h != Hash { panic("hash mismatch") } return DescriptionStr } func (d *GoNSDate) GetSelf(self gopkg.GoNSDate) Foundation.NSDate { return self } func NewGoNSDate() *GoNSDate { return new(GoNSDate) } type GoNSObject struct { C Foundation.NSObjectC // The class P Foundation.NSObjectP // The protocol UseSelf bool } func (o *GoNSObject) Description(self gopkg.GoNSObject) string { if o.UseSelf { return DescriptionStr } else { return self.Super().Description() } } func DupNSDate(date Foundation.NSDate) Foundation.NSDate { return date } type GoUIResponder struct { UIKit.UIResponder Called bool } func (r *GoUIResponder) PressesBegan(_ Foundation.NSSet, _ UIKit.UIPressesEvent) { r.Called = true } // Check that implicitly referenced types are wrapped. func implicitType(r UIKit.UIResponder) { r.MotionBegan(0, nil) }
javapkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/javapkg/classes.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package javapkg import ( "Java/java/beans" "Java/java/io" "Java/java/io/IOException" "Java/java/lang" "Java/java/lang/Character" "Java/java/lang/Integer" "Java/java/lang/Object" "Java/java/lang/Runnable" "Java/java/net" "Java/java/nio" "Java/java/util" "Java/java/util/concurrent" gopkg "Java/javapkg" xnet "Java/javax/net" ) const ( ToStringPrefix = "Go toString: " IOExceptionMessage = "GoInputStream IOException" ) type GoRunnable struct { lang.Object lang.Runnable this lang.Runnable Field string } func (r *GoRunnable) ToString(this gopkg.GoRunnable) string { return ToStringPrefix } func (r *GoRunnable) Run(this gopkg.GoRunnable) { } func (r *GoRunnable) GetThis(this gopkg.GoRunnable) lang.Runnable { return this } type GoInputStream struct { io.InputStream } func (_ *GoInputStream) Read() (int32, error) { return 0, IOException.New(IOExceptionMessage) } func NewGoInputStream() *GoInputStream { return new(GoInputStream) } type GoFuture struct { concurrent.Future } func (_ *GoFuture) Cancel(_ bool) bool { return false } func (_ *GoFuture) Get() (lang.Object, error) { return nil, nil } // Use a trailing underscore to override multiple overloaded methods. func (_ *GoFuture) Get_(_ int64, _ concurrent.TimeUnit) (lang.Object, error) { return nil, nil } func (_ *GoFuture) IsCancelled() bool { return false } func (_ *GoFuture) IsDone() bool { return false } type GoObject struct { lang.Object this lang.Object } func (o *GoObject) ToString(this gopkg.GoObject) string { o.this = this return ToStringPrefix + this.Super().ToString() } func (_ *GoObject) HashCode() int32 { return 42 } func RunRunnable(r lang.Runnable) { r.Run() } func RunnableRoundtrip(r lang.Runnable) lang.Runnable { return r } // Test constructing and returning Go instances of GoObject and GoRunnable // outside a constructor func ConstructGoRunnable() *GoRunnable { return new(GoRunnable) } func ConstructGoObject() *GoObject { return new(GoObject) } // java.beans.PropertyChangeEvent is a class a with no default constructors. type GoPCE struct { beans.PropertyChangeEvent } func NewGoPCE(_ lang.Object, _ string, _ lang.Object, _ lang.Object) *GoPCE { return new(GoPCE) } // java.util.ArrayList is a class with multiple constructors type GoArrayList struct { util.ArrayList } func NewGoArrayList() *GoArrayList { return new(GoArrayList) } func NewGoArrayListWithCap(_ int32) *GoArrayList { return new(GoArrayList) } func UnwrapGoArrayList(l gopkg.GoArrayList) { _ = l.Unwrap().(*GoArrayList) } func CallSubset(s Character.Subset) { s.ToString() } type GoSubset struct { Character.Subset } func NewGoSubset(_ string) *GoSubset { return new(GoSubset) } func NewJavaObject() lang.Object { return Object.New() } func NewJavaInteger() lang.Integer { i, _ := Integer.New(int32(42)) return i } type NoargConstructor struct { util.BitSet // An otherwise unused class with a no-arg constructor } type GoRand struct { util.Random } func (_ *GoRand) Next(this gopkg.GoRand, i int32) int32 { return this.Super().Next(i) } type I interface{} func CastInterface(intf I) lang.Runnable { var r lang.Runnable = Runnable.Cast(intf) r.Run() return r } func CastRunnable(o lang.Object) lang.Runnable { defer func() { recover() // swallow the panic }() var r lang.Runnable = Runnable.Cast(o) r.Run() return r } // Test that extending classes from Java packages // with the same last component (in this case "net") // works. func NameClashingPackages(_ net.Socket, _ xnet.SocketFactory) { } func testReferenceToUnsupportedParameters() { var ib nio.IntBuffer ib.Put(nil) }
javapkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/javapkg/java.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package javapkg import ( "Java/java/lang/Float" "Java/java/lang/Integer" "Java/java/lang/System" "Java/java/util/Collections" "Java/java/util/jar/JarFile" "fmt" ) func SystemCurrentTimeMillis() int64 { return System.CurrentTimeMillis() } func FloatMin() float32 { return Float.MIN_VALUE } func ManifestName() string { return JarFile.MANIFEST_NAME } func IntegerBytes() int { return Integer.SIZE } func IntegerValueOf(v int32) int32 { i, _ := Integer.ValueOf(v) return i.IntValue() } func IntegerDecode(v string) (int32, error) { i, err := Integer.Decode(v) if err != nil { return 0, fmt.Errorf("wrapped error: %v", err) } // Call methods from super class i.HashCode() return i.IntValue(), nil } func IntegerParseInt(v string, radix int32) (int32, error) { return Integer.ParseInt(v, radix) } func ProvokeRuntimeException() (err error) { defer func() { err = recover().(error) }() Collections.Copy(nil, nil) return }
simplepkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/simplepkg/simplepkg.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package simplepkg is imported from testpkg and tests two // corner cases. // First: simplepkg itself contains no (exported) functions // or methods and so its generated Go package must not import // it. // // Second: even though testpkg imports simplepkg, testpkg's // generated Go package ends up not referencing simplepkg and // must not import it. package simplepkg type S struct{}
unboundpkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/unboundpkg/unboundpkg.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package simplepkg is imported from testpkg and tests // that references to other, unbound packages, are ignored. package unboundpkg type ( S struct{} I interface{} )
assets
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/assets/hello.txt
Hello, Assets.
secondpkg
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/testpkg/secondpkg/secondpkg.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package secondpkg is imported by bind tests that verify // that a bound package can reference another bound package. package secondpkg type ( Ser interface { S(_ *S) } IF interface { F() } I interface { F(i int) int } S struct{} ) func (_ *S) F(i int) int { return i } const HelloString = "secondpkg string" func Hello() string { return HelloString } type Secondpkg struct { V string } func (_ *Secondpkg) M() { } func NewSecondpkg() *Secondpkg { return new(Secondpkg) }
benchmark
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/testdata/benchmark/benchmark.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package benchmark contains benchmarking bound functions for internal use. package benchmark import ( "log" "time" ) type Benchmarks interface { // It seems to be much faster to call a native function from Java // when there is already a native call earlier in the stack. // Run runs a named benchmark from a different thread, with // no native call prior in the stack. Run(name string, n int) // RunDirect runs a named benchmark directly, with the native // context from the call itself. RunDirect(name string, n int) // Callbacks for Go benchmarks NewI() I Noargs() Onearg(_ int) Oneret() int Ref(_ I) Manyargs(_, _, _, _, _, _, _, _, _, _ int) String(_ string) StringRetShort() string StringRetLong() string Slice(_ []byte) } type ( I interface { F() } AnI struct { } ) func (_ *AnI) F() { } func NewI() I { return new(AnI) } func runBenchmark(name string, f func(n int)) { // Run once for warmup f(1) n := 1000 var dt time.Duration minDuration := 1 * time.Second for dt < minDuration { n *= 2 t0 := time.Now() f(n) dt = time.Since(t0) } log.Printf("Benchmark%s %d %d ns/op\n", name, n, dt.Nanoseconds()/int64(n)) } func runGoBenchmark(name string, f func()) { runBenchmark("Go"+name, func(n int) { for i := 0; i < n; i++ { f() } }) runBenchmark("Go"+name+"Direct", func(n int) { done := make(chan struct{}) go func() { for i := 0; i < n; i++ { f() } close(done) }() <-done }) } func RunBenchmarks(b Benchmarks) { names := []string{ "Empty", "Noargs", "Onearg", "Oneret", "Manyargs", "Refforeign", "Refgo", "StringShort", "StringLong", "StringShortUnicode", "StringLongUnicode", "StringRetShort", "StringRetLong", "SliceShort", "SliceLong", } for _, name := range names { runBenchmark("Foreign"+name, func(n int) { b.Run(name, n) }) runBenchmark("Foreign"+name+"Direct", func(n int) { b.RunDirect(name, n) }) } runGoBenchmark("Empty", func() {}) runGoBenchmark("Noarg", func() { b.Noargs() }) runGoBenchmark("Onearg", func() { b.Onearg(0) }) runGoBenchmark("Oneret", func() { b.Oneret() }) foreignRef := b.NewI() runGoBenchmark("Refforeign", func() { b.Ref(foreignRef) }) goRef := NewI() runGoBenchmark("Refgo", func() { b.Ref(goRef) }) runGoBenchmark("Manyargs", func() { b.Manyargs(0, 0, 0, 0, 0, 0, 0, 0, 0, 0) }) runGoBenchmark("StringShort", func() { b.String(ShortString) }) runGoBenchmark("StringLong", func() { b.String(LongString) }) runGoBenchmark("StringShortUnicode", func() { b.String(ShortStringUnicode) }) runGoBenchmark("StringLongUnicode", func() { b.String(LongStringUnicode) }) runGoBenchmark("StringRetShort", func() { b.StringRetShort() }) runGoBenchmark("StringRetLong", func() { b.StringRetLong() }) runGoBenchmark("SliceShort", func() { b.Slice(ShortSlice) }) runGoBenchmark("SliceLong", func() { b.Slice(LongSlice) }) } func Noargs() { } func Onearg(_ int) { } func Manyargs(_, _, _, _, _, _, _, _, _, _ int) { } func Oneret() int { return 0 } func String(_ string) { } func StringRetShort() string { return ShortString } func StringRetLong() string { return LongString } func Slice(_ []byte) { } func Ref(_ I) { } var ( ShortSlice = make([]byte, 10) LongSlice = make([]byte, 100000) ) const ( ShortString = "Hello, World!" LongString = "Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World! Hello, World!, World!" ShortStringUnicode = "Hello, 世界!" LongStringUnicode = "Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界! Hello, 世界!, 世界!" )
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/SeqCustom.m
// Copyright 2018 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore // +build ignore #import <Foundation/Foundation.h> #import <XCTest/XCTest.h> @import Testpkg; @interface tests : XCTestCase @end @implementation tests - (void)testBasics { CustomTestpkgHi(); } @end
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/SeqTest.m
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore // +build ignore #import <Foundation/Foundation.h> #import <XCTest/XCTest.h> #import "testpkg/Testpkg.h" // Objective-C implementation of testpkg.I2. @interface Number : NSObject <TestpkgI2> { } @property int32_t value; // TODO(hyangah): error:error is not good. - (BOOL)error:(BOOL)e error:(NSError **)error; - (int64_t)times:(int32_t)v; @end // numI is incremented when the first numI objective-C implementation is // deallocated. static int numI = 0; @implementation Number { } @synthesize value; - (NSString *)stringError:(NSString *)s error:(NSError **)error { if ([s isEqualToString:@"number"]) { return @"OK"; } *error = [NSError errorWithDomain:@"SeqTest" code:1 userInfo:@{NSLocalizedDescriptionKey: @"NumberError"}]; return NULL; } - (BOOL)error:(BOOL)triggerError error:(NSError **)error { if (!triggerError) { return YES; } if (error != NULL) { *error = [NSError errorWithDomain:@"SeqTest" code:1 userInfo:NULL]; } return NO; } - (int64_t)times:(int32_t)v { return v * value; } - (void)dealloc { if (self.value == 0) { numI++; } } @end // Objective-C implementation of testpkg.NullTest. @interface NullTest : NSObject <TestpkgNullTest> { } - (TestpkgNullTest *)null; @end @implementation NullTest { } - (TestpkgNullTest *)null { return nil; } @end // Objective-C implementation of testpkg.InterfaceDupper. @interface IDup : NSObject <TestpkgInterfaceDupper> { } @end @implementation IDup { } - (id<TestpkgInterface>)iDup:(id<TestpkgInterface>)i { return i; } @end // Objective-C implementation of testpkg.ConcreteDupper. @interface CDup : NSObject <TestpkgConcreteDupper> { } @end @implementation CDup { } - (TestpkgConcrete *)cDup:(TestpkgConcrete *)c { return c; } @end // Objective-C implementation of testpkg.EmptyThrower. @interface EmptyErrorer: NSObject <TestpkgEmptyErrorer> { } @end @implementation EmptyErrorer { } - (BOOL)emptyError:(NSError **)error { *error = [NSError errorWithDomain:@"SeqTest" code:1 userInfo:NULL]; return NO; } @end @interface tests : XCTestCase @end @implementation tests - (void)setUp { [super setUp]; } - (void)tearDown { [super tearDown]; } - (void)testBasics { TestpkgHi(); TestpkgInt(42); } - (void)testAdd { int64_t sum = TestpkgAdd(31, 21); XCTAssertEqual(sum, 52, @"TestpkgSum(31, 21) = %lld, want 52\n", sum); } - (void)testHello:(NSString *)input { NSString *got = TestpkgAppendHello(input); NSString *want = [NSString stringWithFormat:@"Hello, %@!", input]; XCTAssertEqualObjects(got, want, @"want %@\nTestpkgHello(%@)= %@", want, input, got); } - (void)testHellos { [self testHello:@"세계"]; // korean, utf-8, world. unichar t[] = { 0xD83D, 0xDCA9, }; // utf-16, pile of poo. [self testHello:[NSString stringWithCharacters:t length:2]]; } - (void)testString { NSString *input = @""; NSString *got = TestpkgStrDup(input); XCTAssertEqualObjects(got, input, @"want %@\nTestpkgEcho(%@)= %@", input, input, got); input = @"FOO"; got = TestpkgStrDup(input); XCTAssertEqualObjects(got, input, @"want %@\nTestpkgEcho(%@)= %@", input, input, got); } - (void)testStruct { TestpkgS2 *s = TestpkgNewS2(10.0, 100.0); XCTAssertNotNil(s, @"TestpkgNewS2 returned NULL"); double x = [s x]; double y = [s y]; double sum = [s sum]; XCTAssertTrue(x == 10.0 && y == 100.0 && sum == 110.0, @"TestpkgS2(10.0, 100.0).X=%f Y=%f SUM=%f; want 10, 100, 110", x, y, sum); double sum2 = TestpkgCallSSum(s); XCTAssertEqual(sum, sum2, @"TestpkgCallSSum(s)=%f; want %f as returned by s.Sum", sum2, sum); [s setX:7]; [s setY:70]; x = [s x]; y = [s y]; sum = [s sum]; XCTAssertTrue(x == 7 && y == 70 && sum == 77, @"TestpkgS2(7, 70).X=%f Y=%f SUM=%f; want 7, 70, 77", x, y, sum); NSString *first = @"trytwotested"; NSString *second = @"test"; NSString *got = [s tryTwoStrings:first second:second]; NSString *want = [first stringByAppendingString:second]; XCTAssertEqualObjects(got, want, @"TestpkgS_TryTwoStrings(%@, %@)= %@; want %@", first, second, got, want); } - (void)testCollectS { @autoreleasepool { [self testStruct]; } TestpkgGC(); long numS = TestpkgCollectS2( 1, 10); // within 10 seconds, collect the S used in testStruct. XCTAssertEqual(numS, 1, @"%ld S objects were collected; S used in testStruct is supposed to " @"be collected.", numS); } - (void)testBytesAppend { NSString *a = @"Foo"; NSString *b = @"Bar"; NSData *data_a = [a dataUsingEncoding:NSUTF8StringEncoding]; NSData *data_b = [b dataUsingEncoding:NSUTF8StringEncoding]; NSData *gotData = TestpkgBytesAppend(data_a, data_b); NSString *got = [[NSString alloc] initWithData:gotData encoding:NSUTF8StringEncoding]; NSString *want = [a stringByAppendingString:b]; XCTAssertEqualObjects(got, want, @"want %@\nTestpkgBytesAppend(%@, %@) = %@", want, a, b, got); } - (void)testInterface { // Test Go object implementing testpkg.I is handled correctly. id<TestpkgI2> goObj = TestpkgNewI(); int64_t got = [goObj times:10]; XCTAssertEqual(got, 100, @"TestpkgNewI().times(10) = %lld; want %d", got, 100); int32_t key = -1; TestpkgRegisterI(key, goObj); int64_t got2 = TestpkgMultiply(key, 10); XCTAssertEqual(got, got2, @"TestpkgMultiply(10 * 10) = %lld; want %lld", got2, got); TestpkgUnregisterI(key); // Test Objective-C objects implementing testpkg.I is handled correctly. @autoreleasepool { for (int32_t i = 0; i < 10; i++) { Number *num = [[Number alloc] init]; num.value = i; TestpkgRegisterI(i, num); } TestpkgGC(); } // Registered Objective-C objects are pinned on Go side which must // prevent deallocation from Objective-C. for (int32_t i = 0; i < 10; i++) { int64_t got = TestpkgMultiply(i, 2); XCTAssertEqual(got, i * 2,@"TestpkgMultiply(%d, 2) = %lld; want %d", i, got, i * 2); TestpkgUnregisterI(i); TestpkgGC(); } // Unregistered all Objective-C objects. } - (void)testCollectI { @autoreleasepool { [self testInterface]; } XCTAssertEqual(numI, 1, @"%d I objects were collected; I used in testInterface is supposed " @"to be collected.", numI); } - (void)testConst { XCTAssertEqualObjects(TestpkgAString, @"a string", @"TestpkgAString = %@, want 'a string'", TestpkgAString); XCTAssertEqual(TestpkgAnInt, 7, @"TestpkgAnInt = %lld, want 7", TestpkgAnInt); XCTAssertTrue(ABS(TestpkgAFloat - 0.12345) < 0.0001, @"TestpkgAFloat = %f, want 0.12345", TestpkgAFloat); XCTAssertTrue(TestpkgABool == YES, @"TestpkgABool = %@, want YES", TestpkgAFloat ? @"YES" : @"NO"); XCTAssertEqual(TestpkgMinInt32, INT32_MIN, @"TestpkgMinInt32 = %d, want %d", TestpkgMinInt32, INT32_MIN); XCTAssertEqual(TestpkgMaxInt32, INT32_MAX, @"TestpkgMaxInt32 = %d, want %d", TestpkgMaxInt32, INT32_MAX); XCTAssertEqual(TestpkgMinInt64, INT64_MIN, @"TestpkgMinInt64 = %lld, want %lld", TestpkgMinInt64, INT64_MIN); XCTAssertEqual(TestpkgMaxInt64, INT64_MAX, @"TestpkgMaxInt64 = %lld, want %lld", TestpkgMaxInt64, INT64_MAX); XCTAssertTrue(ABS(TestpkgSmallestNonzeroFloat64 - 4.940656458412465441765687928682213723651e-324) < 1e-323, @"TestpkgSmallestNonzeroFloat64 = %f, want %f", TestpkgSmallestNonzeroFloat64, 4.940656458412465441765687928682213723651e-324); XCTAssertTrue(ABS(TestpkgMaxFloat64 - 1.797693134862315708145274237317043567981e+308) < 0.0001, @"TestpkgMaxFloat64 = %f, want %f", TestpkgMaxFloat64, 1.797693134862315708145274237317043567981e+308); XCTAssertTrue(ABS(TestpkgSmallestNonzeroFloat32 - 1.401298464324817070923729583289916131280e-45) < 1e-44, @"TestpkgSmallestNonzeroFloat32 = %f, want %f", TestpkgSmallestNonzeroFloat32, 1.401298464324817070923729583289916131280e-45); XCTAssertTrue(ABS(TestpkgMaxFloat32 - 3.40282346638528859811704183484516925440e+38) < 0.0001, @"TestpkgMaxFloat32 = %f, want %f", TestpkgMaxFloat32, 3.40282346638528859811704183484516925440e+38); XCTAssertTrue(ABS(TestpkgLog2E - 1 / 0.693147180559945309417232121458176568075500134360255254120680009) < 0.0001, @"TestpkgLog2E = %f, want %f", TestpkgLog2E, 1 / 0.693147180559945309417232121458176568075500134360255254120680009); } - (void)testIssue12307 { Number *num = [[Number alloc] init]; num.value = 1024; NSError *error; XCTAssertFalse(TestpkgCallIError(num, YES, &error), @"TestpkgCallIError(Number, YES) succeeded; want error"); NSError *error2; XCTAssertTrue(TestpkgCallIError(num, NO, &error2), @"TestpkgCallIError(Number, NO) failed(%@); want success", error2); } - (void)testErrorField { NSString *wantMsg = @"an error message"; NSError *want = [NSError errorWithDomain:@"SeqTest" code:1 userInfo:@{NSLocalizedDescriptionKey: wantMsg}]; TestpkgNode *n = TestpkgNewNode(@"ErrTest"); n.err = want; NSError *got = n.err; XCTAssertEqual(got, want, @"got different objects after roundtrip"); NSString *gotMsg = TestpkgErrorMessage(want); XCTAssertEqualObjects(gotMsg, wantMsg, @"err = %@, want %@", gotMsg, wantMsg); } - (void)testErrorDup { NSError *err = Testpkg.globalErr; XCTAssertTrue(TestpkgIsGlobalErr(err), @"A Go error must preserve its identity across the boundary"); XCTAssertEqualObjects([err localizedDescription], @"global err", "A Go error message must be preserved"); } - (void)testVar { NSString *s = Testpkg.stringVar; XCTAssertEqualObjects(s, @"a string var", @"Testpkg.StringVar = %@, want 'a string var'", s); s = @"a new string var"; Testpkg.stringVar = s; NSString *s2 = Testpkg.stringVar; XCTAssertEqualObjects(s2, s, @"Testpkg.stringVar = %@, want %@", s2, s); int64_t i = Testpkg.intVar; XCTAssertEqual(i, 77, @"Testpkg.intVar = %lld, want 77", i); Testpkg.intVar = 777; i = Testpkg.intVar; XCTAssertEqual(i, 777, @"Testpkg.intVar = %lld, want 777", i); [Testpkg setIntVar:7777]; i = [Testpkg intVar]; XCTAssertEqual(i, 7777, @"Testpkg.intVar = %lld, want 7777", i); TestpkgNode *n0 = Testpkg.nodeVar; XCTAssertEqualObjects(n0.v, @"a struct var", @"Testpkg.NodeVar = %@, want 'a struct var'", n0.v); TestpkgNode *n1 = TestpkgNewNode(@"a new struct var"); Testpkg.nodeVar = n1; TestpkgNode *n2 = Testpkg.nodeVar; XCTAssertEqualObjects(n2.v, @"a new struct var", @"Testpkg.NodeVar = %@, want 'a new struct var'", n2.v); Number *num = [[Number alloc] init]; num.value = 12345; Testpkg.interfaceVar2 = num; id<TestpkgI2> iface = Testpkg.interfaceVar2; int64_t x = [iface times:10]; int64_t y = [num times:10]; XCTAssertEqual(x, y, @"Testpkg.InterfaceVar2 Times 10 = %lld, want %lld", x, y); } - (void)testIssue12403 { Number *num = [[Number alloc] init]; num.value = 1024; NSError *error; NSString *ret = TestpkgCallIStringError(num, @"alphabet", &error); XCTAssertNil(ret, @"TestpkgCallIStringError(Number, 'alphabet') succeeded(%@); want error", ret); NSString *desc = [error localizedDescription]; XCTAssertEqualObjects(desc, @"NumberError", @"TestpkgCallIStringError(Number, 'alphabet') returned unexpected error message %@", desc); NSError *error2; NSString *ret2 = TestpkgCallIStringError(num, @"number", &error2); XCTAssertNotNil(ret2, @"TestpkgCallIStringError(Number, 'number') failed(%@); want success", error2); XCTAssertEqualObjects(ret2, @"OK", @"TestpkgCallIStringError(Number, 'number') returned unexpected results %@", ret2); } - (void)testStrDup:(NSString *)want { NSString *got = TestpkgStrDup(want); XCTAssertEqualObjects(want, got, @"StrDup returned %@; expected %@", got, want); } - (void)testUnicodeStrings { [self testStrDup:@"abcxyz09{}"]; [self testStrDup:@"Hello, 世界"]; [self testStrDup:@"\uffff\U00010000\U00010001\U00012345\U0010ffff"]; } - (void)testByteArrayRead { NSData *arr = [NSMutableData dataWithLength:8]; long n; XCTAssertTrue(TestpkgReadIntoByteArray(arr, &n, nil), @"ReadIntoByteArray failed"); XCTAssertEqual(n, 8, @"ReadIntoByteArray wrote %ld bytes, expected %d", n, 8); const uint8_t *b = [arr bytes]; for (int i = 0; i < [arr length]; i++) { XCTAssertEqual(b[i], i, @"ReadIntoByteArray wrote %d at %d; expected %d", b[i], i, i); } // Test that immutable data cannot be changed from Go const uint8_t buf[] = {42}; arr = [NSData dataWithBytes:buf length:1]; XCTAssertTrue(TestpkgReadIntoByteArray(arr, &n, nil), @"ReadIntoByteArray failed"); XCTAssertEqual(n, 1, @"ReadIntoByteArray wrote %ld bytes, expected %d", n, 8); b = [arr bytes]; XCTAssertEqual(b[0], 42, @"ReadIntoByteArray wrote to an immutable NSData; expected no change"); } - (void)testNilField { TestpkgNullFieldStruct *s = TestpkgNewNullFieldStruct(); XCTAssertNil([s f], @"NullFieldStruct has non-nil field; expected nil"); } - (void)testNullReferences { NullTest *t = [[NullTest alloc] init]; XCTAssertTrue(TestpkgCallWithNull(nil, t), @"Testpkg.CallWithNull failed"); id<TestpkgI> i = TestpkgNewNullInterface(); XCTAssertNil(i, @"NewNullInterface() returned %p; expected nil", i); TestpkgS *s = TestpkgNewNullStruct(); XCTAssertNil(s, @"NewNullStruct() returned %p; expected nil", s); TestpkgIssue20330 *nullArger = TestpkgNewIssue20330(); XCTAssertTrue([nullArger callWithNull:nil], @"Issue20330.CallWithNull failed"); } - (void)testReturnsError { NSError *error; NSString *value = TestpkgReturnsError(TRUE, &error); NSString *got = [error.userInfo valueForKey:NSLocalizedDescriptionKey]; NSString *want = @"Error"; XCTAssertEqualObjects(got, want, @"want %@\nTestpkgReturnsError(TRUE) = (%@, %@)", want, value, got); } - (void)testImportedPkg { XCTAssertEqualObjects(SecondpkgHelloString, SecondpkgHello(), @"imported string should match"); id<SecondpkgI> i = TestpkgNewImportedI(); SecondpkgS *s = TestpkgNewImportedS(); XCTAssertEqual(8, [i f:8], @"numbers should match"); XCTAssertEqual(8, [s f:8], @"numbers should match"); i = TestpkgWithImportedI(i); s = TestpkgWithImportedS(s); i = [Testpkg importedVarI]; s = [Testpkg importedVarS]; [Testpkg setImportedVarI:i]; [Testpkg setImportedVarS:s]; TestpkgImportedFields *fields = TestpkgNewImportedFields(); i = [fields i]; s = [fields s]; [fields setI:i]; [fields setS:s]; } - (void)testRoundTripEquality { Number *want = [[Number alloc] init]; Number *got = (Number *)TestpkgI2Dup(want); XCTAssertEqual(got, want, @"ObjC object passed through Go should not be wrapped"); IDup *idup = [[IDup alloc] init]; XCTAssertTrue(TestpkgCallIDupper(idup), @"Go interface passed through ObjC should not be wrapped"); CDup *cdup = [[CDup alloc] init]; XCTAssertTrue(TestpkgCallCDupper(cdup), @"Go struct passed through ObjC should not be wrapped"); } - (void)testEmptyError { NSError *error; XCTAssertFalse(TestpkgEmptyError(&error), @"GoTestpkgEmptyError succeeded; want error"); XCTAssertNotNil(error, @"TestpkgEmptyError returned nil error"); id<TestpkgEmptyErrorer> empty = [[EmptyErrorer alloc] init]; XCTAssertFalse(TestpkgCallEmptyError(empty, &error), @"TestpkgCallEmptyError succeeded; want error"); XCTAssertNotNil(error, @"TestpkgCallEmptyError returned nil error"); } - (void)testSIGPIPE { TestpkgTestSIGPIPE(); } - (void)testTags { XCTAssertEqual(42, TestpkgTaggedConst, @"Tagged const must exist"); } - (void)testConstructors { id<TestpkgInterface> i = [[TestpkgConcrete alloc] init]; [i f]; TestpkgS2 *s = [[TestpkgS2 alloc] init:1 y:2]; XCTAssertEqual(3.0, [s sum]); XCTAssertEqualObjects(@"gostring", [s tryTwoStrings:@"go" second:@"string"]); TestpkgS3 *s3 __attribute__((unused)) = [[TestpkgS3 alloc] init]; TestpkgS4 *s4 = [[TestpkgS4 alloc] initWithInt:123]; XCTAssertEqual(123, s4.i); s4 = [[TestpkgS4 alloc] initWithFloat: 123.456]; XCTAssertEqual(123, s4.i); s4 = [[TestpkgS4 alloc] initWithBoolAndError: false]; XCTAssertEqual(0, s4.i); s4 = [[TestpkgS4 alloc] initWithBoolAndError: true]; XCTAssertEqual(s4, NULL); } @end
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/seq_darwin.go.support
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main // Go support functions for Objective-C. Note that this // file is copied into and compiled with the generated // bindings. /* #cgo CFLAGS: -x objective-c -fobjc-arc -fmodules -fblocks -Werror #cgo LDFLAGS: -framework Foundation #include <stdint.h> #include <stdlib.h> #include "seq.h" */ import "C" import ( "unsafe" "golang.org/x/mobile/bind/seq" ) // DestroyRef is called by Objective-C to inform Go it is done with a reference. //export DestroyRef func DestroyRef(refnum C.int32_t) { seq.Delete(int32(refnum)) } // encodeString copies a Go string and returns it as a nstring. func encodeString(s string) C.nstring { n := C.int(len(s)) if n == 0 { return C.nstring{} } ptr := C.malloc(C.size_t(n)) if ptr == nil { panic("encodeString: malloc failed") } copy((*[1<<31 - 1]byte)(ptr)[:n], s) return C.nstring{ptr: ptr, len: n} } // decodeString converts a nstring to a Go string. The // data in str is freed after use. func decodeString(str C.nstring) string { if str.ptr == nil { return "" } s := C.GoStringN((*C.char)(str.ptr), str.len) C.free(str.ptr) return s } // fromSlice converts a slice to a nbyteslice. // If cpy is set, a malloc'ed copy of the data is returned. func fromSlice(s []byte, cpy bool) C.nbyteslice { if s == nil || len(s) == 0 { return C.nbyteslice{} } ptr, n := unsafe.Pointer(&s[0]), C.int(len(s)) if cpy { nptr := C.malloc(C.size_t(n)) if nptr == nil { panic("fromSlice: malloc failed") } copy((*[1<<31 - 1]byte)(nptr)[:n], (*[1<<31 - 1]byte)(ptr)[:n]) ptr = nptr } return C.nbyteslice{ptr: ptr, len: n} } // toSlice takes a nbyteslice and returns a byte slice with the data. If cpy is // set, the slice contains a copy of the data. If not, the generated Go code // calls releaseByteSlice after use. func toSlice(s C.nbyteslice, cpy bool) []byte { if s.ptr == nil || s.len == 0 { return nil } var b []byte if cpy { b = C.GoBytes(s.ptr, C.int(s.len)) C.free(s.ptr) } else { b = (*[1<<31 - 1]byte)(unsafe.Pointer(s.ptr))[:s.len:s.len] } return b }
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/SeqWrappers.m
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore // +build ignore @import ObjectiveC.message; @import Foundation; @import XCTest; @import Objcpkg; @interface TestNSObject : NSObject - (NSString *)description; - (NSString *)super_description; @end @implementation TestNSObject - (NSString *)description { return @"hej"; } - (NSString *)super_description { return [super description]; } @end @interface wrappers : XCTestCase @end @implementation wrappers - (void)setUp { [super setUp]; // Put setup code here. This method is called before the invocation of each test method in the class. } - (void)tearDown { // Put teardown code here. This method is called after the invocation of each test method in the class. [super tearDown]; } - (void)testFunction { ObjcpkgFunc(); } - (void)testMethod { ObjcpkgMethod(); } - (void)testNew { ObjcpkgNew(); } - (void)testError { ObjcpkgError(); } - (void)testClass { ObjcpkgGoNSDate *d = [[ObjcpkgGoNSDate alloc] init]; NSString *desc = [d description]; XCTAssertEqual(d, [d getSelf], "GoNSDate self not identical"); XCTAssertEqual(ObjcpkgHash, [d hash], "GoNSDate hash not identical"); XCTAssertTrue([desc isEqualToString:ObjcpkgDescriptionStr], "GoNSDate description mismatch: %@", desc); ObjcpkgGoUIResponder *resp = [[ObjcpkgGoUIResponder alloc] init]; [resp pressesBegan:nil withEvent:nil]; XCTAssertTrue([resp called], "GoUIResponder.pressesBegan not called"); } - (void)testSuper { ObjcpkgGoNSObject *o = [[ObjcpkgGoNSObject alloc] init]; struct objc_super _super = { .receiver = o, .super_class = [NSObject class], }; NSString *superDesc = ((NSString *(*)(struct objc_super*, SEL))objc_msgSendSuper)(&_super, @selector(description)); XCTAssertTrue([superDesc isEqualToString:[o description]], "GoNSObject description mismatch"); [o setUseSelf:TRUE]; XCTAssertTrue([ObjcpkgDescriptionStr isEqualToString:[o description]], "GoNSObject description mismatch"); } - (void)testIdentity { NSDate *d = [[NSDate alloc] init]; NSDate *d2 = ObjcpkgDupNSDate(d); XCTAssertEqual(d, d2, @"ObjcpkgDupNSDate failed to duplicate ObjC instance"); ObjcpkgGoNSDate *gd = [[ObjcpkgGoNSDate alloc] init]; NSDate *gd2 = ObjcpkgDupNSDate(gd); XCTAssertEqual(gd, gd2, @"ObjcpkgDupNSDate failed to duplicate Go instance"); NSDate *gd3 = ObjcpkgNewGoNSDate(); NSDate *gd4 = ObjcpkgDupNSDate(gd3); XCTAssertEqual(gd4, gd3, @"ObjcpkgDupNSDate failed to duplicate instance created in Go"); } @end
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/doc.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package objc implements the Objective-C language bindings. package objc
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/seq_darwin.h
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #ifndef __GO_SEQ_DARWIN_HDR__ #define __GO_SEQ_DARWIN_HDR__ #include <Foundation/Foundation.h> #include "ref.h" #include "Universe.objc.h" #ifdef DEBUG #define LOG_DEBUG(...) NSLog(__VA_ARGS__); #else #define LOG_DEBUG(...) ; #endif #define LOG_INFO(...) NSLog(__VA_ARGS__); #define LOG_FATAL(...) \ { \ NSLog(__VA_ARGS__); \ @throw \ [NSException exceptionWithName:NSInternalInconsistencyException \ reason:[NSString stringWithFormat:__VA_ARGS__] \ userInfo:NULL]; \ } // Platform specific types typedef struct nstring { void *ptr; int len; } nstring; typedef struct nbyteslice { void *ptr; int len; } nbyteslice; typedef int nint; extern void init_seq(); // go_seq_dec_ref decrements the reference count for the // specified refnum. It is called from Go from a finalizer. extern void go_seq_dec_ref(int32_t refnum); // go_seq_inc_ref increments the reference count for the // specified refnum. It is called from Go just before converting // a proxy to its refnum. extern void go_seq_inc_ref(int32_t refnum); extern int32_t go_seq_to_refnum(id obj); // go_seq_go_to_refnum is a special case of go_seq_to_refnum extern int32_t go_seq_go_to_refnum(GoSeqRef *ref); extern GoSeqRef *go_seq_from_refnum(int32_t refnum); // go_seq_objc_from_refnum is a special case of go_seq_from_refnum for // Objective-C objects that implement a Go interface. extern id go_seq_objc_from_refnum(int32_t refnum); extern nbyteslice go_seq_from_objc_bytearray(NSData *data, int copy); extern nstring go_seq_from_objc_string(NSString *s); extern NSData *go_seq_to_objc_bytearray(nbyteslice, int copy); extern NSString *go_seq_to_objc_string(nstring str); #endif // __GO_SEQ_DARWIN_HDR__
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/SeqBench.m
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build ignore // +build ignore #import <Foundation/Foundation.h> #import <XCTest/XCTest.h> #import "benchmark/Benchmark.h" @interface AnI : NSObject <BenchmarkI> { } @end @implementation AnI - (void)f { } @end @interface Benchmarks : NSObject <BenchmarkBenchmarks> { } @end @implementation Benchmarks - (void)manyargs:(long)p0 p1:(long)p1 p2:(long)p2 p3:(long)p3 p4:(long)p4 p5:(long)p5 p6:(long)p6 p7:(long)p7 p8:(long)p8 p9:(long)p9 { } - (id<BenchmarkI>)newI { return [[AnI alloc] init]; } - (void)noargs { } - (void)onearg:(long)p0 { } - (long)oneret { return 0; } - (void)ref:(id<BenchmarkI>)p0 { } - (void)slice:(NSData*)p0 { } - (void)string:(NSString*)p0 { } - (NSString*)stringRetLong { return BenchmarkLongString; } - (NSString*)stringRetShort { return BenchmarkShortString; } - (void (^)(void))lookupBenchmark:(NSString *)name { if ([name isEqualToString:@"Empty"]) { return ^() { }; } else if ([name isEqualToString:@"Noargs"]) { return ^() { BenchmarkNoargs(); }; } else if ([name isEqualToString:@"Onearg"]) { return ^() { BenchmarkOnearg(0); }; } else if ([name isEqualToString:@"Manyargs"]) { return ^() { BenchmarkManyargs(0, 0, 0, 0, 0, 0, 0, 0, 0, 0); }; } else if ([name isEqualToString:@"Oneret"]) { return ^() { BenchmarkOneret(); }; } else if ([name isEqualToString:@"Refforeign"]) { id<BenchmarkI> objcRef = [[AnI alloc] init]; return ^() { BenchmarkRef(objcRef); }; } else if ([name isEqualToString:@"Refgo"]) { id<BenchmarkI> goRef = BenchmarkNewI(); return ^() { BenchmarkRef(goRef); }; } else if ([name isEqualToString:@"StringShort"]) { return ^() { BenchmarkString(BenchmarkShortString); }; } else if ([name isEqualToString:@"StringLong"]) { return ^() { BenchmarkString(BenchmarkLongString); }; } else if ([name isEqualToString:@"StringShortUnicode"]) { return ^() { BenchmarkString(BenchmarkShortStringUnicode); }; } else if ([name isEqualToString:@"StringLongUnicode"]) { return ^() { BenchmarkString(BenchmarkLongStringUnicode); }; } else if ([name isEqualToString:@"StringRetShort"]) { return ^() { BenchmarkStringRetShort(); }; } else if ([name isEqualToString:@"StringRetLong"]) { return ^() { BenchmarkStringRetLong(); }; } else if ([name isEqualToString:@"SliceShort"]) { NSData *s = [Benchmark shortSlice]; return ^() { BenchmarkSlice(s); }; } else if ([name isEqualToString:@"SliceLong"]) { NSData *s = [Benchmark longSlice]; return ^() { BenchmarkSlice(s); }; } else { return nil; } } - (void)run:(NSString*)name n:(long)n { void (^bench)(void) = [self lookupBenchmark:name]; if (bench == nil) { NSLog(@"Error: no such benchmark: %@", name); return; } for (int i = 0; i < n; i++) { bench(); } } - (void)runDirect:(NSString*)name n:(long)n { void (^bench)(void) = [self lookupBenchmark:name]; if (bench == nil) { NSLog(@"Error: no such benchmark: %@", name); return; } dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ for (int i = 0; i < n; i++) { bench(); } }); } @end @interface benchmarks : XCTestCase @end @implementation benchmarks - (void)setUp { [super setUp]; // Put setup code here. This method is called before the invocation of each test method in the class. // In UI tests it is usually best to stop immediately when a failure occurs. self.continueAfterFailure = NO; // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. [[[XCUIApplication alloc] init] launch]; // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. } - (void)tearDown { // Put teardown code here. This method is called after the invocation of each test method in the class. [super tearDown]; } - (void)testBenchmark { // Long running unit tests seem to hang. Use an XCTestExpectation and run the Go // benchmark suite on a GCD thread. XCTestExpectation *expectation = [self expectationWithDescription:@"Benchmark"]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ Benchmarks *b = [[Benchmarks alloc] init]; BenchmarkRunBenchmarks(b); [expectation fulfill]; }); [self waitForExpectationsWithTimeout:5*60.0 handler:^(NSError *error) { if (error) { NSLog(@"Timeout Error: %@", error); } }]; } @end
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/seq_darwin.m.support
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <stdio.h> #include <stdint.h> #include <string.h> #include <Foundation/Foundation.h> #include "seq.h" #include "_cgo_export.h" // * Objective-C implementation of a Go interface type // // For an interface testpkg.I, gobind defines a protocol GoSeqTestpkgI. // Reference tracker (tracker) maintains two maps: // 1) _refs: objective-C object pointer -> a refnum (starting from 42). // 2) _objs: refnum -> RefCounter. // // Whenever a user's object conforming the protocol is sent to Go (through // a function or method that takes I), _refs is consulted to find the refnum // of the object. If not found, the refnum is assigned and stored. // // _objs is also updated so that the RefCounter is incremented and the // user's object is pinned. // // When a Go side needs to call a method of the interface, the Go side // notifies the Objective-C side of the object's refnum. Upon receiving the // request, Objective-C side looks up the object from _objs map, and sends // the method to the object. // // The RefCount counts the references on objective-C objects from Go side, // and pins the objective-C objects until there is no more references from // Go side. // // * Objective-C proxy of a Go object (struct or interface type) // // For Go type object, a objective-C proxy instance is created whenever // the object reference is passed into objective-C. // // While crossing the language barrier there is a brief window where the foreign // proxy object might be finalized but the refnum is not yet translated to its object. // If the proxy object was the last reference to the foreign object, the refnum // will be invalid by the time it is looked up in the foreign reference tracker. // // To make sure the foreign object is kept live while its refnum is in transit, // increment its refererence count before crossing. The other side will decrement // it again immediately after the refnum is converted to its object. // Note that this file is copied into and compiled with the generated // bindings. // A simple thread-safe mutable dictionary. @interface goSeqDictionary : NSObject { } @property NSMutableDictionary *dict; @end @implementation goSeqDictionary - (id)init { if (self = [super init]) { _dict = [[NSMutableDictionary alloc] init]; } return self; } - (id)get:(id)key { @synchronized(self) { return [_dict objectForKey:key]; } } - (void)put:(id)obj withKey:(id)key { @synchronized(self) { [_dict setObject:obj forKey:key]; } } @end // NULL_REFNUM is also known to bind/seq/ref.go and bind/java/Seq.java #define NULL_REFNUM 41 // RefTracker encapsulates a map of objective-C objects passed to Go and // the reference number counter which is incremented whenever an objective-C // object that implements a Go interface is created. @interface RefTracker : NSObject { int32_t _next; NSMutableDictionary *_refs; // map: object ptr -> refnum NSMutableDictionary *_objs; // map: refnum -> RefCounter* } - (id)init; // decrements the counter of the objective-C object with the reference number. // This is called whenever a Go proxy to this object is finalized. // When the counter reaches 0, the object is removed from the map. - (void)dec:(int32_t)refnum; // increments the counter of the objective-C object with the reference number. // This is called whenever a Go proxy is converted to its refnum and send // across the language barrier. - (void)inc:(int32_t)refnum; // returns the object of the reference number. - (id)get:(int32_t)refnum; // returns the reference number of the object and increments the ref count. // This is called whenever an Objective-C object is sent to Go side. - (int32_t)assignRefnumAndIncRefcount:(id)obj; @end static RefTracker *tracker = NULL; #define IS_FROM_GO(refnum) ((refnum) < 0) // init_seq is called when the Go side is initialized. void init_seq() { tracker = [[RefTracker alloc] init]; } void go_seq_dec_ref(int32_t refnum) { @autoreleasepool { [tracker dec:refnum]; } } void go_seq_inc_ref(int32_t refnum) { @autoreleasepool { [tracker inc:refnum]; } } NSData *go_seq_to_objc_bytearray(nbyteslice s, int copy) { if (s.ptr == NULL) { return NULL; } BOOL freeWhenDone = copy ? YES : NO; return [NSData dataWithBytesNoCopy:s.ptr length:s.len freeWhenDone:freeWhenDone]; } NSString *go_seq_to_objc_string(nstring str) { if (str.len == 0) { // empty string. return @""; } NSString * res = [[NSString alloc] initWithBytesNoCopy:str.ptr length:str.len encoding:NSUTF8StringEncoding freeWhenDone:YES]; return res; } id go_seq_objc_from_refnum(int32_t refnum) { id obj = [tracker get:refnum]; // Go called IncForeignRef just before converting its proxy to its refnum. Decrement it here. // It's very important to decrement *after* fetching the reference from the tracker, in case // there are no other proxy references to the object. [tracker dec:refnum]; return obj; } GoSeqRef *go_seq_from_refnum(int32_t refnum) { if (refnum == NULL_REFNUM) { return nil; } if (IS_FROM_GO(refnum)) { return [[GoSeqRef alloc] initWithRefnum:refnum obj:NULL]; } return [[GoSeqRef alloc] initWithRefnum:refnum obj:go_seq_objc_from_refnum(refnum)]; } int32_t go_seq_to_refnum(id obj) { if (obj == nil) { return NULL_REFNUM; } return [tracker assignRefnumAndIncRefcount:obj]; } int32_t go_seq_go_to_refnum(GoSeqRef *ref) { int32_t refnum = [ref incNum]; if (!IS_FROM_GO(refnum)) { LOG_FATAL(@"go_seq_go_to_refnum on objective-c objects is not permitted"); } return refnum; } nbyteslice go_seq_from_objc_bytearray(NSData *data, int copy) { struct nbyteslice res = {NULL, 0}; int sz = data.length; if (sz == 0) { return res; } void *ptr; // If the argument was not a NSMutableData, copy the data so that // the NSData is not changed from Go. The corresponding free is called // by releaseByteSlice. if (copy || ![data isKindOfClass:[NSMutableData class]]) { void *arr_copy = malloc(sz); if (arr_copy == NULL) { LOG_FATAL(@"malloc failed"); } memcpy(arr_copy, [data bytes], sz); ptr = arr_copy; } else { ptr = (void *)[data bytes]; } res.ptr = ptr; res.len = sz; return res; } nstring go_seq_from_objc_string(NSString *s) { nstring res = {NULL, 0}; int len = [s lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; if (len == 0) { if (s.length > 0) { LOG_INFO(@"unable to encode an NSString into UTF-8"); } return res; } char *buf = (char *)malloc(len); if (buf == NULL) { LOG_FATAL(@"malloc failed"); } NSUInteger used; [s getBytes:buf maxLength:len usedLength:&used encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, [s length]) remainingRange:NULL]; res.ptr = buf; res.len = used; return res; } @implementation GoSeqRef { } - (id)init { LOG_FATAL(@"GoSeqRef init is disallowed"); } - (int32_t)incNum { IncGoRef(_refnum); return _refnum; } // called when an object from Go is passed in. - (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj { self = [super init]; if (self) { _refnum = refnum; _obj = obj; } return self; } - (void)dealloc { if (IS_FROM_GO(_refnum)) { DestroyRef(_refnum); } } @end // RefCounter is a pair of (GoSeqProxy, count). GoSeqProxy has a strong // reference to an Objective-C object. The count corresponds to // the number of Go proxy objects. // // RefTracker maintains a map of refnum to RefCounter, for every // Objective-C objects passed to Go. This map allows the transact // call to relay the method call to the right Objective-C object, and // prevents the Objective-C objects from being deallocated // while they are still referenced from Go side. @interface RefCounter : NSObject { } @property(strong, readonly) id obj; @property int cnt; - (id)initWithObject:(id)obj; @end @implementation RefCounter { } - (id)initWithObject:(id)obj { self = [super init]; if (self) { _obj = obj; _cnt = 0; } return self; } @end @implementation RefTracker { } - (id)init { self = [super init]; if (self) { _next = 42; _refs = [[NSMutableDictionary alloc] init]; _objs = [[NSMutableDictionary alloc] init]; } return self; } - (void)dec:(int32_t)refnum { // called whenever a go proxy object is finalized. if (IS_FROM_GO(refnum)) { LOG_FATAL(@"dec:invalid refnum for Objective-C objects"); } @synchronized(self) { id key = @(refnum); RefCounter *counter = [_objs objectForKey:key]; if (counter == NULL) { LOG_FATAL(@"unknown refnum"); } int n = counter.cnt; if (n <= 0) { LOG_FATAL(@"refcount underflow"); } else if (n == 1) { LOG_DEBUG(@"remove the reference %d", refnum); NSValue *ptr = [NSValue valueWithPointer:(const void *)(counter.obj)]; [_refs removeObjectForKey:ptr]; [_objs removeObjectForKey:key]; } else { counter.cnt = n - 1; } } } // inc is called whenever a ObjC refnum crosses from Go to ObjC - (void)inc:(int32_t)refnum { if (IS_FROM_GO(refnum)) { LOG_FATAL(@"dec:invalid refnum for Objective-C objects"); } @synchronized(self) { id key = @(refnum); RefCounter *counter = [_objs objectForKey:key]; if (counter == NULL) { LOG_FATAL(@"unknown refnum"); } counter.cnt++; } } - (id)get:(int32_t)refnum { if (IS_FROM_GO(refnum)) { LOG_FATAL(@"get:invalid refnum for Objective-C objects"); } @synchronized(self) { RefCounter *counter = _objs[@(refnum)]; if (counter == NULL) { LOG_FATAL(@"unidentified object refnum: %d", refnum); } return counter.obj; } } - (int32_t)assignRefnumAndIncRefcount:(id)obj { @synchronized(self) { NSValue *ptr = [NSValue valueWithPointer:(const void *)(obj)]; NSNumber *refnum = [_refs objectForKey:ptr]; if (refnum == NULL) { refnum = @(_next++); _refs[ptr] = refnum; } RefCounter *counter = [_objs objectForKey:refnum]; if (counter == NULL) { counter = [[RefCounter alloc] initWithObject:obj]; counter.cnt = 1; _objs[refnum] = counter; } else { counter.cnt++; } return (int32_t)([refnum intValue]); } } @end
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/ref.h
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #ifndef __GO_REF_HDR__ #define __GO_REF_HDR__ #include <Foundation/Foundation.h> // GoSeqRef is an object tagged with an integer for passing back and // forth across the language boundary. A GoSeqRef may represent either // an instance of a Go object, or an Objective-C object passed to Go. // The explicit allocation of a GoSeqRef is used to pin a Go object // when it is passed to Objective-C. The Go seq package maintains a // reference to the Go object in a map keyed by the refnum along with // a reference count. When the reference count reaches zero, the Go // seq package will clear the corresponding entry in the map. @interface GoSeqRef : NSObject { } @property(readonly) int32_t refnum; @property(strong) id obj; // NULL when representing a Go object. // new GoSeqRef object to proxy a Go object. The refnum must be // provided from Go side. - (instancetype)initWithRefnum:(int32_t)refnum obj:(id)obj; - (int32_t)incNum; @end @protocol goSeqRefInterface -(GoSeqRef*) _ref; @end #endif
objc
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/objc/seq_test.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package objc import ( "flag" "fmt" "io" "io/ioutil" "log" "os" "os/exec" "path/filepath" "runtime" "strings" "testing" ) // Use the Xcode XCTestCase framework to run the regular tests and the special SeqBench.m benchmarks. // // Regular tests run in the xcodetest project as normal unit test (logic test in Xcode lingo). // Unit tests execute faster but cannot run on a real device. The benchmarks in SeqBench.m run as // UI unit tests. // // The Xcode files embedded in this file were constructed in Xcode 9 by: // // - Creating a new project through Xcode. Both unit tests and UI tests were checked off. // - Xcode schemes are per-user by default. The shared scheme is created by selecting // Project => Schemes => Manage Schemes from the Xcode menu and selecting "Shared". // - Remove files not needed for xcodebuild (determined empirically). In particular, the empty // tests Xcode creates can be removed and the unused user scheme. // // All tests here require the Xcode command line tools. var destination = flag.String("device", "platform=iOS Simulator,name=iPhone 6s Plus", "Specify the -destination flag to xcodebuild") var gomobileBin string func TestMain(m *testing.M) { os.Exit(testMain(m)) } func testMain(m *testing.M) int { binDir, err := ioutil.TempDir("", "bind-objc-test-") if err != nil { log.Fatal(err) } defer os.RemoveAll(binDir) exe := "" if runtime.GOOS == "windows" { exe = ".exe" } if runtime.GOOS != "android" { gocmd := filepath.Join(runtime.GOROOT(), "bin", "go") gomobileBin = filepath.Join(binDir, "gomobile"+exe) gobindBin := filepath.Join(binDir, "gobind"+exe) if out, err := exec.Command(gocmd, "build", "-o", gomobileBin, "golang.org/x/mobile/cmd/gomobile").CombinedOutput(); err != nil { log.Fatalf("gomobile build failed: %v: %s", err, out) } if out, err := exec.Command(gocmd, "build", "-o", gobindBin, "golang.org/x/mobile/cmd/gobind").CombinedOutput(); err != nil { log.Fatalf("gobind build failed: %v: %s", err, out) } path := binDir if oldPath := os.Getenv("PATH"); oldPath != "" { path += string(filepath.ListSeparator) + oldPath } os.Setenv("PATH", path) } return m.Run() } // TestObjcSeqTest runs ObjC test SeqTest.m. func TestObjcSeqTest(t *testing.T) { runTest(t, []string{ "golang.org/x/mobile/bind/testdata/testpkg", "golang.org/x/mobile/bind/testdata/testpkg/secondpkg", "golang.org/x/mobile/bind/testdata/testpkg/simplepkg", }, "", "SeqTest.m", "Testpkg.framework", false, false) } // TestObjcSeqBench runs ObjC test SeqBench.m. func TestObjcSeqBench(t *testing.T) { if testing.Short() { t.Skip("skipping benchmark in short mode.") } runTest(t, []string{"golang.org/x/mobile/bind/testdata/benchmark"}, "", "SeqBench.m", "Benchmark.framework", true, true) } // TestObjcSeqWrappers runs ObjC test SeqWrappers.m. func TestObjcSeqWrappers(t *testing.T) { runTest(t, []string{"golang.org/x/mobile/bind/testdata/testpkg/objcpkg"}, "", "SeqWrappers.m", "Objcpkg.framework", false, false) } // TestObjcCustomPkg runs the ObjC test SeqCustom.m. func TestObjcCustomPkg(t *testing.T) { runTest(t, []string{"golang.org/x/mobile/bind/testdata/testpkg"}, "Custom", "SeqCustom.m", "Testpkg.framework", false, false) } func runTest(t *testing.T, pkgNames []string, prefix, testfile, framework string, uitest, dumpOutput bool) { if gomobileBin == "" { t.Skipf("no gomobile on %s", runtime.GOOS) } if _, err := run("which xcodebuild"); err != nil { t.Skip("command xcodebuild not found, skipping") } tmpdir, err := ioutil.TempDir("", "bind-objc-seq-test-") if err != nil { t.Fatalf("failed to prepare temp dir: %v", err) } defer os.RemoveAll(tmpdir) t.Logf("tmpdir = %s", tmpdir) if err := createProject(tmpdir, testfile, framework); err != nil { t.Fatalf("failed to create project: %v", err) } if err := cp(filepath.Join(tmpdir, testfile), testfile); err != nil { t.Fatalf("failed to copy %s: %v", testfile, err) } cmd := exec.Command(gomobileBin, "bind", "-target", "ios", "-tags", "aaa bbb") if prefix != "" { cmd.Args = append(cmd.Args, "-prefix", prefix) } cmd.Args = append(cmd.Args, pkgNames...) cmd.Dir = filepath.Join(tmpdir, "xcodetest") // Reverse binding doesn't work with Go module since imports starting with Java or ObjC are not valid FQDNs. // Disable Go module explicitly until this problem is solved. See golang/go#27234. cmd.Env = append(os.Environ(), "GO111MODULE=off") buf, err := cmd.CombinedOutput() if err != nil { t.Logf("%s", buf) t.Fatalf("failed to run gomobile bind: %v", err) } testPattern := "xcodetestTests" if uitest { testPattern = "xcodetestUITests" } cmd = exec.Command("xcodebuild", "test", "-scheme", "xcodetest", "-destination", *destination, "-only-testing:"+testPattern) cmd.Dir = tmpdir buf, err = cmd.CombinedOutput() if err != nil { t.Logf("%s", buf) t.Errorf("failed to run xcodebuild: %v", err) } if dumpOutput { t.Logf("%s", buf) } } func run(cmd string) ([]byte, error) { c := strings.Split(cmd, " ") return exec.Command(c[0], c[1:]...).CombinedOutput() } func cp(dst, src string) error { r, err := os.Open(src) if err != nil { return fmt.Errorf("failed to read source: %v", err) } defer r.Close() w, err := os.Create(dst) if err != nil { return fmt.Errorf("failed to open destination: %v", err) } _, err = io.Copy(w, r) cerr := w.Close() if err != nil { return err } return cerr } // createProject generates the files required for xcodebuild test to run a // Objective-C testfile with a gomobile bind framework. func createProject(dir, testfile, framework string) error { for _, d := range []string{"xcodetest", "xcodetest.xcodeproj/xcshareddata/xcschemes", "xcodetestTests", "xcodetestUITests"} { if err := os.MkdirAll(filepath.Join(dir, d), 0700); err != nil { return err } } files := []struct { path string content string }{ {"xcodetest/Info.plist", infoPlist}, {"xcodetest.xcodeproj/project.pbxproj", fmt.Sprintf(pbxproj, testfile, framework)}, {"xcodetest.xcodeproj/xcshareddata/xcschemes/xcodetest.xcscheme", xcodescheme}, {"xcodetestTests/Info.plist", testInfoPlist}, // For UI tests. Only UI tests run on a real idevice. {"xcodetestUITests/Info.plist", testInfoPlist}, {"xcodetest/AppDelegate.h", appdelegateh}, {"xcodetest/main.m", mainm}, {"xcodetest/AppDelegate.m", appdelegatem}, } for _, f := range files { if err := ioutil.WriteFile(filepath.Join(dir, f.path), []byte(f.content), 0700); err != nil { return err } } return nil } const infoPlist = `<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist>` const testInfoPlist = `<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>BNDL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> </dict> </plist>` const pbxproj = `// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 50; objects = { /* Begin PBXBuildFile section */ 642D058D2094883B00FE587C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D058C2094883B00FE587C /* AppDelegate.m */; }; 642D05952094883C00FE587C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 642D05942094883C00FE587C /* Assets.xcassets */; }; 642D059B2094883C00FE587C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D059A2094883C00FE587C /* main.m */; }; 642D05A52094883C00FE587C /* xcodetestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D05A42094883C00FE587C /* xcodetestTests.m */; }; 642D05B02094883C00FE587C /* xcodetestUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 642D05AF2094883C00FE587C /* xcodetestUITests.m */; }; 642D05BE209488E400FE587C /* Testpkg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 642D05BD209488E400FE587C /* Testpkg.framework */; }; 642D05BF209488E400FE587C /* Testpkg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 642D05BD209488E400FE587C /* Testpkg.framework */; }; 642D05C0209488E400FE587C /* Testpkg.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 642D05BD209488E400FE587C /* Testpkg.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 642D05A12094883C00FE587C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 642D05802094883B00FE587C /* Project object */; proxyType = 1; remoteGlobalIDString = 642D05872094883B00FE587C; remoteInfo = xcodetest; }; 642D05AC2094883C00FE587C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 642D05802094883B00FE587C /* Project object */; proxyType = 1; remoteGlobalIDString = 642D05872094883B00FE587C; remoteInfo = xcodetest; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 642D05882094883B00FE587C /* xcodetest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = xcodetest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 642D058B2094883B00FE587C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 642D058C2094883B00FE587C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; 642D05942094883C00FE587C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 642D05992094883C00FE587C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 642D059A2094883C00FE587C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 642D05A02094883C00FE587C /* xcodetestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = xcodetestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 642D05A42094883C00FE587C /* xcodetestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ../%[1]s; sourceTree = "<group>"; }; 642D05A62094883C00FE587C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 642D05AB2094883C00FE587C /* xcodetestUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = xcodetestUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 642D05AF2094883C00FE587C /* xcodetestUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ../%[1]s; sourceTree = "<group>"; }; 642D05B12094883C00FE587C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 642D05BD209488E400FE587C /* Testpkg.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Testpkg.framework; path = %[2]s; sourceTree = "<group>"; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 642D05852094883B00FE587C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 642D05BE209488E400FE587C /* Testpkg.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 642D059D2094883C00FE587C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 642D05BF209488E400FE587C /* Testpkg.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 642D05A82094883C00FE587C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 642D05C0209488E400FE587C /* Testpkg.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 642D057F2094883B00FE587C = { isa = PBXGroup; children = ( 642D058A2094883B00FE587C /* xcodetest */, 642D05A32094883C00FE587C /* xcodetestTests */, 642D05AE2094883C00FE587C /* xcodetestUITests */, 642D05892094883B00FE587C /* Products */, 642D05BD209488E400FE587C /* Testpkg.framework */, ); sourceTree = "<group>"; }; 642D05892094883B00FE587C /* Products */ = { isa = PBXGroup; children = ( 642D05882094883B00FE587C /* xcodetest.app */, 642D05A02094883C00FE587C /* xcodetestTests.xctest */, 642D05AB2094883C00FE587C /* xcodetestUITests.xctest */, ); name = Products; sourceTree = "<group>"; }; 642D058A2094883B00FE587C /* xcodetest */ = { isa = PBXGroup; children = ( 642D058B2094883B00FE587C /* AppDelegate.h */, 642D058C2094883B00FE587C /* AppDelegate.m */, 642D05942094883C00FE587C /* Assets.xcassets */, 642D05992094883C00FE587C /* Info.plist */, 642D059A2094883C00FE587C /* main.m */, ); path = xcodetest; sourceTree = "<group>"; }; 642D05A32094883C00FE587C /* xcodetestTests */ = { isa = PBXGroup; children = ( 642D05A42094883C00FE587C /* xcodetestTests.m */, 642D05A62094883C00FE587C /* Info.plist */, ); path = xcodetestTests; sourceTree = "<group>"; }; 642D05AE2094883C00FE587C /* xcodetestUITests */ = { isa = PBXGroup; children = ( 642D05AF2094883C00FE587C /* xcodetestUITests.m */, 642D05B12094883C00FE587C /* Info.plist */, ); path = xcodetestUITests; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 642D05872094883B00FE587C /* xcodetest */ = { isa = PBXNativeTarget; buildConfigurationList = 642D05B42094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetest" */; buildPhases = ( 642D05842094883B00FE587C /* Sources */, 642D05852094883B00FE587C /* Frameworks */, 642D05862094883B00FE587C /* Resources */, ); buildRules = ( ); dependencies = ( ); name = xcodetest; productName = xcodetest; productReference = 642D05882094883B00FE587C /* xcodetest.app */; productType = "com.apple.product-type.application"; }; 642D059F2094883C00FE587C /* xcodetestTests */ = { isa = PBXNativeTarget; buildConfigurationList = 642D05B72094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestTests" */; buildPhases = ( 642D059C2094883C00FE587C /* Sources */, 642D059D2094883C00FE587C /* Frameworks */, 642D059E2094883C00FE587C /* Resources */, ); buildRules = ( ); dependencies = ( 642D05A22094883C00FE587C /* PBXTargetDependency */, ); name = xcodetestTests; productName = xcodetestTests; productReference = 642D05A02094883C00FE587C /* xcodetestTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; 642D05AA2094883C00FE587C /* xcodetestUITests */ = { isa = PBXNativeTarget; buildConfigurationList = 642D05BA2094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestUITests" */; buildPhases = ( 642D05A72094883C00FE587C /* Sources */, 642D05A82094883C00FE587C /* Frameworks */, 642D05A92094883C00FE587C /* Resources */, ); buildRules = ( ); dependencies = ( 642D05AD2094883C00FE587C /* PBXTargetDependency */, ); name = xcodetestUITests; productName = xcodetestUITests; productReference = 642D05AB2094883C00FE587C /* xcodetestUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 642D05802094883B00FE587C /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0930; ORGANIZATIONNAME = golang; TargetAttributes = { 642D05872094883B00FE587C = { CreatedOnToolsVersion = 9.3; }; 642D059F2094883C00FE587C = { CreatedOnToolsVersion = 9.3; TestTargetID = 642D05872094883B00FE587C; }; 642D05AA2094883C00FE587C = { CreatedOnToolsVersion = 9.3; TestTargetID = 642D05872094883B00FE587C; }; }; }; buildConfigurationList = 642D05832094883B00FE587C /* Build configuration list for PBXProject "xcodetest" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 642D057F2094883B00FE587C; productRefGroup = 642D05892094883B00FE587C /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 642D05872094883B00FE587C /* xcodetest */, 642D059F2094883C00FE587C /* xcodetestTests */, 642D05AA2094883C00FE587C /* xcodetestUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 642D05862094883B00FE587C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 642D05952094883C00FE587C /* Assets.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 642D059E2094883C00FE587C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 642D05A92094883C00FE587C /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 642D05842094883B00FE587C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 642D059B2094883C00FE587C /* main.m in Sources */, 642D058D2094883B00FE587C /* AppDelegate.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 642D059C2094883C00FE587C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 642D05A52094883C00FE587C /* xcodetestTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 642D05A72094883C00FE587C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 642D05B02094883C00FE587C /* xcodetestUITests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 642D05A22094883C00FE587C /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 642D05872094883B00FE587C /* xcodetest */; targetProxy = 642D05A12094883C00FE587C /* PBXContainerItemProxy */; }; 642D05AD2094883C00FE587C /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 642D05872094883B00FE587C /* xcodetest */; targetProxy = 642D05AC2094883C00FE587C /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 642D05B22094883C00FE587C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.3; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; 642D05B32094883C00FE587C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "Apple Development"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 11.3; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; 642D05B52094883C00FE587C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/xcodetest", ); INFOPLIST_FILE = xcodetest/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetest; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; 642D05B62094883C00FE587C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/xcodetest", ); INFOPLIST_FILE = xcodetest/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetest; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; 642D05B82094883C00FE587C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/xcodetest", ); INFOPLIST_FILE = xcodetestTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/xcodetest.app/xcodetest"; }; name = Debug; }; 642D05B92094883C00FE587C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/xcodetest", ); INFOPLIST_FILE = xcodetestTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestTests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/xcodetest.app/xcodetest"; }; name = Release; }; 642D05BB2094883C00FE587C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/xcodetest", ); INFOPLIST_FILE = xcodetestUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = xcodetest; }; name = Debug; }; 642D05BC2094883C00FE587C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/xcodetest", ); INFOPLIST_FILE = xcodetestUITests/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); PRODUCT_BUNDLE_IDENTIFIER = org.golang.xcodetestUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = xcodetest; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 642D05832094883B00FE587C /* Build configuration list for PBXProject "xcodetest" */ = { isa = XCConfigurationList; buildConfigurations = ( 642D05B22094883C00FE587C /* Debug */, 642D05B32094883C00FE587C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 642D05B42094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetest" */ = { isa = XCConfigurationList; buildConfigurations = ( 642D05B52094883C00FE587C /* Debug */, 642D05B62094883C00FE587C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 642D05B72094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 642D05B82094883C00FE587C /* Debug */, 642D05B92094883C00FE587C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 642D05BA2094883C00FE587C /* Build configuration list for PBXNativeTarget "xcodetestUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( 642D05BB2094883C00FE587C /* Debug */, 642D05BC2094883C00FE587C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 642D05802094883B00FE587C /* Project object */; }` const xcodescheme = `<?xml version="1.0" encoding="UTF-8"?> <Scheme LastUpgradeVersion = "0930" version = "1.3"> <BuildAction parallelizeBuildables = "YES" buildImplicitDependencies = "YES"> <BuildActionEntries> <BuildActionEntry buildForTesting = "YES" buildForRunning = "YES" buildForProfiling = "YES" buildForArchiving = "YES" buildForAnalyzing = "YES"> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "642D05872094883B00FE587C" BuildableName = "xcodetest.app" BlueprintName = "xcodetest" ReferencedContainer = "container:xcodetest.xcodeproj"> </BuildableReference> </BuildActionEntry> </BuildActionEntries> </BuildAction> <TestAction buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> <Testables> <TestableReference skipped = "NO"> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "642D059F2094883C00FE587C" BuildableName = "xcodetestTests.xctest" BlueprintName = "xcodetestTests" ReferencedContainer = "container:xcodetest.xcodeproj"> </BuildableReference> </TestableReference> <TestableReference skipped = "NO"> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "642D05AA2094883C00FE587C" BuildableName = "xcodetestUITests.xctest" BlueprintName = "xcodetestUITests" ReferencedContainer = "container:xcodetest.xcodeproj"> </BuildableReference> </TestableReference> </Testables> <MacroExpansion> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "642D05872094883B00FE587C" BuildableName = "xcodetest.app" BlueprintName = "xcodetest" ReferencedContainer = "container:xcodetest.xcodeproj"> </BuildableReference> </MacroExpansion> <AdditionalOptions> </AdditionalOptions> </TestAction> <LaunchAction buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> <BuildableProductRunnable runnableDebuggingMode = "0"> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "642D05872094883B00FE587C" BuildableName = "xcodetest.app" BlueprintName = "xcodetest" ReferencedContainer = "container:xcodetest.xcodeproj"> </BuildableReference> </BuildableProductRunnable> <AdditionalOptions> </AdditionalOptions> </LaunchAction> <ProfileAction buildConfiguration = "Release" shouldUseLaunchSchemeArgsEnv = "YES" savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> <BuildableProductRunnable runnableDebuggingMode = "0"> <BuildableReference BuildableIdentifier = "primary" BlueprintIdentifier = "642D05872094883B00FE587C" BuildableName = "xcodetest.app" BlueprintName = "xcodetest" ReferencedContainer = "container:xcodetest.xcodeproj"> </BuildableReference> </BuildableProductRunnable> </ProfileAction> <AnalyzeAction buildConfiguration = "Debug"> </AnalyzeAction> <ArchiveAction buildConfiguration = "Release" revealArchiveInOrganizer = "YES"> </ArchiveAction> </Scheme>` const appdelegateh = `#import <UIKit/UIKit.h> @interface AppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end` const appdelegatem = `#import "AppDelegate.h" @interface AppDelegate () @end @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { return YES; } - (void)applicationWillResignActive:(UIApplication *)application { } - (void)applicationDidEnterBackground:(UIApplication *)application { } - (void)applicationWillEnterForeground:(UIApplication *)application { } - (void)applicationDidBecomeActive:(UIApplication *)application { } - (void)applicationWillTerminate:(UIApplication *)application { } @end` const mainm = `#import <UIKit/UIKit.h> #import "AppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }`
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/context_android.go
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package java // import "golang.org/x/mobile/bind/java" // #cgo LDFLAGS: -llog // //#include <jni.h> import "C" import ( "unsafe" "golang.org/x/mobile/internal/mobileinit" ) //export setContext func setContext(vm *C.JavaVM, ctx C.jobject) { mobileinit.SetCurrentContext(unsafe.Pointer(vm), uintptr(ctx)) }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/seq_android.h
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #ifndef __GO_SEQ_ANDROID_HDR__ #define __GO_SEQ_ANDROID_HDR__ #include <stdint.h> #include <android/log.h> // For abort() #include <stdlib.h> #include <jni.h> #define LOG_INFO(...) __android_log_print(ANDROID_LOG_INFO, "go/Seq", __VA_ARGS__) #define LOG_FATAL(...) \ { \ __android_log_print(ANDROID_LOG_FATAL, "go/Seq", __VA_ARGS__); \ abort(); \ } // Platform specific types typedef struct nstring { // UTF16 or UTF8 Encoded string. When converting from Java string to Go // string, UTF16. When converting from Go to Java, UTF8. void *chars; // length in bytes, regardless of encoding jsize len; } nstring; typedef struct nbyteslice { void *ptr; jsize len; } nbyteslice; typedef jlong nint; extern void go_seq_dec_ref(int32_t ref); extern void go_seq_inc_ref(int32_t ref); // go_seq_unwrap takes a reference number to a Java wrapper and returns // a reference number to its wrapped Go object. extern int32_t go_seq_unwrap(jint refnum); extern int32_t go_seq_to_refnum(JNIEnv *env, jobject o); extern int32_t go_seq_to_refnum_go(JNIEnv *env, jobject o); extern jobject go_seq_from_refnum(JNIEnv *env, int32_t refnum, jclass proxy_class, jmethodID proxy_cons); extern void go_seq_maybe_throw_exception(JNIEnv *env, jobject msg); // go_seq_get_exception returns any pending exception and clears the exception status. extern jobject go_seq_get_exception(JNIEnv *env); extern jbyteArray go_seq_to_java_bytearray(JNIEnv *env, nbyteslice s, int copy); extern nbyteslice go_seq_from_java_bytearray(JNIEnv *env, jbyteArray s, int copy); extern void go_seq_release_byte_array(JNIEnv *env, jbyteArray arr, jbyte* ptr); extern jstring go_seq_to_java_string(JNIEnv *env, nstring str); extern nstring go_seq_from_java_string(JNIEnv *env, jstring s); // push_local_frame retrieves or creates the JNIEnv* for the current thread // and pushes a JNI reference frame. Must be matched with call to pop_local_frame. extern JNIEnv *go_seq_push_local_frame(jint cap); // Pop the current local frame, releasing all JNI local references in it extern void go_seq_pop_local_frame(JNIEnv *env); // Return a global reference to the given class. Return NULL and clear exception if not found. extern jclass go_seq_find_class(const char *name); extern jmethodID go_seq_get_static_method_id(jclass clazz, const char *name, const char *sig); extern jmethodID go_seq_get_method_id(jclass clazz, const char *name, const char *sig); extern int go_seq_isinstanceof(jint refnum, jclass clazz); #endif // __GO_SEQ_ANDROID_HDR__
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/Seq.java
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package go; import android.content.Context; import java.lang.ref.PhantomReference; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.IdentityHashMap; import java.util.HashSet; import java.util.Set; import java.util.logging.Logger; import go.Universe; // Seq is a sequence of machine-dependent encoded values. // Used by automatically generated language bindings to talk to Go. public class Seq { private static Logger log = Logger.getLogger("GoSeq"); // also known to bind/seq/ref.go and bind/objc/seq_darwin.m private static final int NULL_REFNUM = 41; // use single Ref for null Object public static final Ref nullRef = new Ref(NULL_REFNUM, null); // The singleton GoRefQueue private static final GoRefQueue goRefQueue = new GoRefQueue(); static { System.loadLibrary("gojni"); init(); Universe.touch(); } // setContext sets the context in the go-library to be used in RunOnJvm. public static void setContext(Context context) { setContext((java.lang.Object)context); } private static native void init(); // Empty method to run class initializer public static void touch() {} private Seq() { } // ctx is an android.context.Context. static native void setContext(java.lang.Object ctx); public static void incRefnum(int refnum) { tracker.incRefnum(refnum); } // incRef increments the reference count of Java objects. // For proxies for Go objects, it calls into the Proxy method // incRefnum() to make sure the Go reference count is positive // even if the Proxy is garbage collected and its Ref is finalized. public static int incRef(Object o) { return tracker.inc(o); } public static int incGoObjectRef(GoObject o) { return o.incRefnum(); } // trackGoRef tracks a Go reference and decrements its refcount // when the given GoObject wrapper is garbage collected. // // TODO(crawshaw): We could cut down allocations for frequently // sent Go objects by maintaining a map to weak references. This // however, would require allocating two objects per reference // instead of one. It also introduces weak references, the bane // of any Java debugging session. // // When we have real code, examine the tradeoffs. public static void trackGoRef(int refnum, GoObject obj) { if (refnum > 0) { throw new RuntimeException("trackGoRef called with Java refnum " + refnum); } goRefQueue.track(refnum, obj); } public static Ref getRef(int refnum) { return tracker.get(refnum); } // Increment the Go reference count before sending over a refnum. // The ref parameter is only used to make sure the referenced // object is not garbage collected before Go increments the // count. It's the equivalent of Go's runtime.KeepAlive. public static native void incGoRef(int refnum, GoObject ref); // Informs the Go ref tracker that Java is done with this refnum. static native void destroyRef(int refnum); // decRef is called from seq.FinalizeRef static void decRef(int refnum) { tracker.dec(refnum); } // A GoObject is a Java class implemented in Go. When a GoObject // is passed to Go, it is wrapped in a Go proxy, to make it behave // the same as passing a regular Java class. public interface GoObject { // Increment refcount and return the refnum of the proxy. // // The Go reference count need to be bumped while the // refnum is passed to Go, to avoid finalizing and // invalidating it before being translated on the Go side. int incRefnum(); } // A Proxy is a Java object that proxies a Go object. Proxies, unlike // GoObjects, are unwrapped to their Go counterpart when deserialized // in Go. public interface Proxy extends GoObject {} // A Ref represents an instance of a Java object passed back and forth // across the language boundary. public static final class Ref { public final int refnum; private int refcnt; // Track how many times sent to Go. public final Object obj; // The referenced Java obj. Ref(int refnum, Object o) { if (refnum < 0) { throw new RuntimeException("Ref instantiated with a Go refnum " + refnum); } this.refnum = refnum; this.refcnt = 0; this.obj = o; } void inc() { // Count how many times this ref's Java object is passed to Go. if (refcnt == Integer.MAX_VALUE) { throw new RuntimeException("refnum " + refnum + " overflow"); } refcnt++; } } static final RefTracker tracker = new RefTracker(); static final class RefTracker { private static final int REF_OFFSET = 42; // Next Java object reference number. // // Reference numbers are positive for Java objects, // and start, arbitrarily at a different offset to Go // to make debugging by reading Seq hex a little easier. private int next = REF_OFFSET; // next Java object ref // Java objects that have been passed to Go. refnum -> Ref // The Ref obj field is non-null. // This map pins Java objects so they don't get GCed while the // only reference to them is held by Go code. private final RefMap javaObjs = new RefMap(); // Java objects to refnum private final IdentityHashMap<Object, Integer> javaRefs = new IdentityHashMap<>(); // inc increments the reference count of a Java object when it // is sent to Go. inc returns the refnum for the object. synchronized int inc(Object o) { if (o == null) { return NULL_REFNUM; } if (o instanceof Proxy) { return ((Proxy)o).incRefnum(); } Integer refnumObj = javaRefs.get(o); if (refnumObj == null) { if (next == Integer.MAX_VALUE) { throw new RuntimeException("createRef overflow for " + o); } refnumObj = next++; javaRefs.put(o, refnumObj); } int refnum = refnumObj; Ref ref = javaObjs.get(refnum); if (ref == null) { ref = new Ref(refnum, o); javaObjs.put(refnum, ref); } ref.inc(); return refnum; } synchronized void incRefnum(int refnum) { Ref ref = javaObjs.get(refnum); if (ref == null) { throw new RuntimeException("referenced Java object is not found: refnum="+refnum); } ref.inc(); } // dec decrements the reference count of a Java object when // Go signals a corresponding proxy object is finalized. // If the count reaches zero, the Java object is removed // from the javaObjs map. synchronized void dec(int refnum) { if (refnum <= 0) { // We don't keep track of the Go object. // This must not happen. log.severe("dec request for Go object "+ refnum); return; } if (refnum == Seq.nullRef.refnum) { return; } // Java objects are removed on request of Go. Ref obj = javaObjs.get(refnum); if (obj == null) { throw new RuntimeException("referenced Java object is not found: refnum="+refnum); } obj.refcnt--; if (obj.refcnt <= 0) { javaObjs.remove(refnum); javaRefs.remove(obj.obj); } } // get returns an existing Ref to a Java object. synchronized Ref get(int refnum) { if (refnum < 0) { throw new RuntimeException("ref called with Go refnum " + refnum); } if (refnum == NULL_REFNUM) { return nullRef; } Ref ref = javaObjs.get(refnum); if (ref == null) { throw new RuntimeException("unknown java Ref: "+refnum); } return ref; } } // GoRefQueue is a queue of GoRefs that are no longer live. An internal thread // processes the queue and decrement the reference count on the Go side. static class GoRefQueue extends ReferenceQueue<GoObject> { // The set of tracked GoRefs. If we don't hold on to the GoRef instances, the Java GC // will not add them to the queue when their referents are reclaimed. private final Collection<GoRef> refs = Collections.synchronizedCollection(new HashSet<GoRef>()); void track(int refnum, GoObject obj) { refs.add(new GoRef(refnum, obj, this)); } GoRefQueue() { Thread daemon = new Thread(new Runnable() { @Override public void run() { while (true) { try { GoRef ref = (GoRef)remove(); refs.remove(ref); destroyRef(ref.refnum); ref.clear(); } catch (InterruptedException e) { // Ignore } } } }); daemon.setDaemon(true); daemon.setName("GoRefQueue Finalizer Thread"); daemon.start(); } } // A GoRef is a PhantomReference to a Java proxy for a Go object. // GoRefs are enqueued to the singleton GoRefQueue when no longer live, // so the corresponding reference count can be decremented. static class GoRef extends PhantomReference<GoObject> { final int refnum; GoRef(int refnum, GoObject obj, GoRefQueue q) { super(obj, q); if (refnum > 0) { throw new RuntimeException("GoRef instantiated with a Java refnum " + refnum); } this.refnum = refnum; } } // RefMap is a mapping of integers to Ref objects. // // The integers can be sparse. In Go this would be a map[int]*Ref. static final class RefMap { private int next = 0; private int live = 0; private int[] keys = new int[16]; private Ref[] objs = new Ref[16]; RefMap() {} Ref get(int key) { int i = Arrays.binarySearch(keys, 0, next, key); if (i >= 0) { return objs[i]; } return null; } void remove(int key) { int i = Arrays.binarySearch(keys, 0, next, key); if (i >= 0) { if (objs[i] != null) { objs[i] = null; live--; } } } void put(int key, Ref obj) { if (obj == null) { throw new RuntimeException("put a null ref (with key "+key+")"); } int i = Arrays.binarySearch(keys, 0, next, key); if (i >= 0) { if (objs[i] == null) { objs[i] = obj; live++; } if (objs[i] != obj) { throw new RuntimeException("replacing an existing ref (with key "+key+")"); } return; } if (next >= keys.length) { grow(); i = Arrays.binarySearch(keys, 0, next, key); } i = ~i; if (i < next) { // Insert, shift everything afterwards down. System.arraycopy(keys, i, keys, i+1, next-i); System.arraycopy(objs, i, objs, i+1, next-i); } keys[i] = key; objs[i] = obj; live++; next++; } private void grow() { // Compact and (if necessary) grow backing store. int[] newKeys; Ref[] newObjs; int len = 2*roundPow2(live); if (len > keys.length) { newKeys = new int[keys.length*2]; newObjs = new Ref[objs.length*2]; } else { newKeys = keys; newObjs = objs; } int j = 0; for (int i = 0; i < keys.length; i++) { if (objs[i] != null) { newKeys[j] = keys[i]; newObjs[j] = objs[i]; j++; } } for (int i = j; i < newKeys.length; i++) { newKeys[i] = 0; newObjs[i] = null; } keys = newKeys; objs = newObjs; next = j; if (live != next) { throw new RuntimeException("bad state: live="+live+", next="+next); } } private static int roundPow2(int x) { int p = 1; while (p < x) { p *= 2; } return p; } } }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/CustomPkgTest.java
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package go; import android.test.InstrumentationTestCase; import org.golang.custompkg.testpkg.Testpkg; public class CustomPkgTest extends InstrumentationTestCase { public void testHi() { Testpkg.hi(); } }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/doc.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package java implements the Java language bindings. // // See the design document (http://golang.org/s/gobind). package java
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/SeqBench.java
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package go; import android.test.InstrumentationTestCase; import android.util.Log; import java.util.Map; import java.util.HashMap; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; import benchmark.*; public class SeqBench extends InstrumentationTestCase { public static class AnI implements I { @Override public void f() { } } private static class Benchmarks implements benchmark.Benchmarks { private static Map<String, Runnable> benchmarks; private static ExecutorService executor = Executors.newSingleThreadExecutor(); static { benchmarks = new HashMap<String, Runnable>(); benchmarks.put("Empty", new Runnable() { @Override public void run() { } }); benchmarks.put("Noargs", new Runnable() { @Override public void run() { Benchmark.noargs(); } }); benchmarks.put("Onearg", new Runnable() { @Override public void run() { Benchmark.onearg(0); } }); benchmarks.put("Manyargs", new Runnable() { @Override public void run() { Benchmark.manyargs(0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } }); benchmarks.put("Oneret", new Runnable() { @Override public void run() { Benchmark.oneret(); } }); final I javaRef = new AnI(); benchmarks.put("Refforeign", new Runnable() { @Override public void run() { Benchmark.ref(javaRef); } }); final I goRef = Benchmark.newI(); benchmarks.put("Refgo", new Runnable() { @Override public void run() { Benchmark.ref(goRef); } }); benchmarks.put("StringShort", new Runnable() { @Override public void run() { Benchmark.string(Benchmark.ShortString); } }); benchmarks.put("StringLong", new Runnable() { @Override public void run() { Benchmark.string(Benchmark.LongString); } }); benchmarks.put("StringShortUnicode", new Runnable() { @Override public void run() { Benchmark.string(Benchmark.ShortStringUnicode); } }); benchmarks.put("StringLongUnicode", new Runnable() { @Override public void run() { Benchmark.string(Benchmark.LongStringUnicode); } }); benchmarks.put("StringRetShort", new Runnable() { @Override public void run() { Benchmark.stringRetShort(); } }); benchmarks.put("StringRetLong", new Runnable() { @Override public void run() { Benchmark.stringRetLong(); } }); final byte[] shortSlice = Benchmark.getShortSlice(); benchmarks.put("SliceShort", new Runnable() { @Override public void run() { Benchmark.slice(shortSlice); } }); final byte[] longSlice = Benchmark.getLongSlice(); benchmarks.put("SliceLong", new Runnable() { @Override public void run() { Benchmark.slice(longSlice); } }); } public void runDirect(String name, final long n) { final Runnable r = benchmarks.get(name); try { executor.submit(new Runnable() { @Override public void run() { for (int i = 0; i < n; i++) { r.run(); } } }).get(); } catch (Exception e) { throw new RuntimeException(e); } } public void run(String name, long n) { final Runnable r = benchmarks.get(name); for (int i = 0; i < n; i++) { r.run(); } } @Override public I newI() { return new AnI(); } @Override public void ref(I i) { } @Override public void noargs() { } @Override public void onearg(long i) { } @Override public long oneret() { return 0; } @Override public void manyargs(long p0, long p1, long p2, long p3, long p4, long p5, long p6, long p7, long gp8, long p9) { } @Override public void string(String s) { } @Override public void slice(byte[] s) { } @Override public String stringRetShort() { return Benchmark.ShortString; } @Override public String stringRetLong() { return Benchmark.LongString; } } public void testBenchmark() { Benchmark.runBenchmarks(new Benchmarks()); } }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/ClassesTest.java
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package go; import android.test.InstrumentationTestCase; import android.test.MoreAsserts; import java.io.InputStream; import java.io.IOException; import java.util.Arrays; import java.util.Random; import javapkg.Javapkg; import javapkg.I; import javapkg.GoObject; import javapkg.GoRunnable; import javapkg.GoSubset; import javapkg.GoInputStream; import javapkg.GoArrayList; public class ClassesTest extends InstrumentationTestCase { public void testConst() { assertEquals("const Float", Float.MIN_VALUE, Javapkg.floatMin()); assertEquals("const String", java.util.jar.JarFile.MANIFEST_NAME, Javapkg.manifestName()); assertEquals("const Int", 7, Integer.SIZE, Javapkg.integerBytes()); } public void testFunction() { Javapkg.systemCurrentTimeMillis(); } public void testMethod() { try { assertEquals("Integer.decode", 0xff, Javapkg.integerDecode("0xff")); } catch (Exception e) { throw new RuntimeException(e); } Exception exc = null; try { Javapkg.integerDecode("obviously wrong"); } catch (Exception e) { exc = e; } assertNotNull("IntegerDecode Exception", exc); } public void testOverloadedMethod() { try { assertEquals("Integer.parseInt", 0xc4, Javapkg.integerParseInt("c4", 16)); } catch (Exception e) { throw new RuntimeException(e); } Exception exc = null; try { Javapkg.integerParseInt("wrong", 16); } catch (Exception e) { exc = e; } assertNotNull("integerParseInt Exception", exc); assertEquals("Integer.valueOf", 42, Javapkg.integerValueOf(42)); } public void testException() { Exception exc = null; try { Javapkg.provokeRuntimeException(); } catch (Exception e) { exc = e; } assertNotNull("RuntimeException", exc); } public void testField() { GoRunnable r = new GoRunnable(); String f = r.getField(); } public void testGoObject() { Runnable r = new GoRunnable(); r.run(); assertEquals("GoRunnable.toString", r.toString(), Javapkg.ToStringPrefix); Runnable r2 = ((GoRunnable)r).getThis(); assertTrue("GoObject.this", r == r2); Object o = new GoObject(); assertEquals("GoObject hashCode", 42, o.hashCode()); Object o2 = Javapkg.constructGoObject(); assertEquals("GoObject hashCode", 42, o2.hashCode()); assertTrue("GoObject.toString", o.toString().startsWith(Javapkg.ToStringPrefix)); Javapkg.runRunnable(r); final boolean[] ran = new boolean[1]; Runnable r3 = new Runnable(){ @Override public void run() { ran[0] = true; } }; Javapkg.runRunnable(r3); assertTrue("RunRunnable", ran[0]); assertTrue("RunnableRoundtrip Java", r3 == Javapkg.runnableRoundtrip(r3)); assertTrue("RunnableRoundtrip Go", r == Javapkg.runnableRoundtrip(r)); Runnable r5 = Javapkg.constructGoRunnable(); r5.run(); } public void testTypedException() { InputStream is = new GoInputStream(); Exception exc = null; try { is.read(); } catch (IOException e) { exc = e; } assertNotNull("IOException", exc); assertEquals("IOException message", Javapkg.IOExceptionMessage, exc.getMessage()); } public void testInnerClass() { Character.Subset s = new Character.Subset(""){}; Character.Subset s2 = new GoSubset(""); Javapkg.callSubset(s); Javapkg.callSubset(s2); } public void testNew() { Object o = Javapkg.newJavaObject(); assertTrue("new Object()", o != null); Integer i = Javapkg.newJavaInteger(); assertEquals("new Integer(42)", 42, i.intValue()); } private static class InterfaceRunnable implements I, Runnable { @Override public void run() { } } public void testCast() { Runnable r1 = new GoRunnable(); Runnable r1c = Javapkg.castRunnable((Object)r1); assertTrue("Casting Go object", r1c != null); Runnable r2 = new Runnable() { @Override public void run() { } }; Runnable r2c = Javapkg.castRunnable((Object)r2); assertTrue("Casting Java object", r2c != null); Runnable r3c = Javapkg.castInterface(new InterfaceRunnable()); assertTrue("Casting Go interface implementation", r3c != null); Runnable r4c = Javapkg.castRunnable(new Object()); assertTrue("Invalid cast", r4c == null); } public void testUnwrap() { GoArrayList l = new GoArrayList(); Javapkg.unwrapGoArrayList(l); } }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/seq_android.go.support
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main // Go support functions for bindings. This file is copied into the // generated main package and compiled along with the generated binding // files. //#cgo CFLAGS: -Werror //#cgo LDFLAGS: -llog //#include <jni.h> //#include <stdint.h> //#include <stdlib.h> //#include "seq_android.h" import "C" import ( "unsafe" "golang.org/x/mobile/bind/seq" ) // DestroyRef is called by Java to inform Go it is done with a reference. //export DestroyRef func DestroyRef(refnum C.int32_t) { seq.Delete(int32(refnum)) } // encodeString returns a copy of a Go string as a UTF16 encoded nstring. // The returned data is freed in go_seq_to_java_string. // // encodeString uses UTF16 as the intermediate format. Note that UTF8 is an obvious // alternative, but JNI only supports a C-safe variant of UTF8 (modified UTF8). func encodeString(s string) C.nstring { n := C.int(len(s)) if n == 0 { return C.nstring{} } // Allocate enough for the worst case estimate, every character is a surrogate pair worstCaseLen := 4 * len(s) utf16buf := C.malloc(C.size_t(worstCaseLen)) if utf16buf == nil { panic("encodeString: malloc failed") } chars := (*[1<<30 - 1]uint16)(unsafe.Pointer(utf16buf))[:worstCaseLen/2 : worstCaseLen/2] nchars := seq.UTF16Encode(s, chars) return C.nstring{chars: unsafe.Pointer(utf16buf), len: C.jsize(nchars*2)} } // decodeString decodes a UTF8 encoded nstring to a Go string. The data // in str is freed after use. func decodeString(str C.nstring) string { if str.chars == nil { return "" } chars := (*[1<<31 - 1]byte)(str.chars)[:str.len] s := string(chars) C.free(str.chars) return s } // fromSlice converts a slice to a jbyteArray cast as a nbyteslice. If cpy // is set, the returned slice is a copy to be free by go_seq_to_java_bytearray. func fromSlice(s []byte, cpy bool) C.nbyteslice { if s == nil || len(s) == 0 { return C.nbyteslice{} } var ptr *C.jbyte n := C.jsize(len(s)) if cpy { ptr = (*C.jbyte)(C.malloc(C.size_t(n))) if ptr == nil { panic("fromSlice: malloc failed") } copy((*[1<<31 - 1]byte)(unsafe.Pointer(ptr))[:n], s) } else { ptr = (*C.jbyte)(unsafe.Pointer(&s[0])) } return C.nbyteslice{ptr: unsafe.Pointer(ptr), len: n} } // toSlice takes a nbyteslice (jbyteArray) and returns a byte slice // with the data. If cpy is set, the slice contains a copy of the data and is // freed. func toSlice(s C.nbyteslice, cpy bool) []byte { if s.ptr == nil || s.len == 0 { return nil } var b []byte if cpy { b = C.GoBytes(s.ptr, C.int(s.len)) C.free(s.ptr) } else { b = (*[1<<31 - 1]byte)(unsafe.Pointer(s.ptr))[:s.len:s.len] } return b }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/context_android.c
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <jni.h> #include "seq_android.h" #include "_cgo_export.h" JNIEXPORT void JNICALL Java_go_Seq_setContext(JNIEnv* env, jclass clazz, jobject ctx) { JavaVM* vm; if ((*env)->GetJavaVM(env, &vm) != 0) { LOG_FATAL("failed to get JavaVM"); } setContext(vm, (*env)->NewGlobalRef(env, ctx)); }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/seq_android.c.support
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // C support functions for bindings. This file is copied into the // generated gomobile_bind package and compiled along with the // generated binding files. #include <android/log.h> #include <errno.h> #include <jni.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <pthread.h> #include "seq.h" #include "_cgo_export.h" #define NULL_REFNUM 41 // initClasses are only exported from Go if reverse bindings are used. // If they're not, weakly define a no-op function. __attribute__((weak)) void initClasses(void) { } static JavaVM *jvm; // jnienvs holds the per-thread JNIEnv* for Go threads where we called AttachCurrentThread. // A pthread key destructor is supplied to call DetachCurrentThread on exit. This trick is // documented in http://developer.android.com/training/articles/perf-jni.html under "Threads". static pthread_key_t jnienvs; static jclass seq_class; static jmethodID seq_getRef; static jmethodID seq_decRef; static jmethodID seq_incRef; static jmethodID seq_incGoObjectRef; static jmethodID seq_incRefnum; static jfieldID ref_objField; static jclass throwable_class; // env_destructor is registered as a thread data key destructor to // clean up a Go thread that is attached to the JVM. static void env_destructor(void *env) { if ((*jvm)->DetachCurrentThread(jvm) != JNI_OK) { LOG_INFO("failed to detach current thread"); } } static JNIEnv *go_seq_get_thread_env(void) { JNIEnv *env; jint ret = (*jvm)->GetEnv(jvm, (void **)&env, JNI_VERSION_1_6); if (ret != JNI_OK) { if (ret != JNI_EDETACHED) { LOG_FATAL("failed to get thread env"); } if ((*jvm)->AttachCurrentThread(jvm, &env, NULL) != JNI_OK) { LOG_FATAL("failed to attach current thread"); } pthread_setspecific(jnienvs, env); } return env; } void go_seq_maybe_throw_exception(JNIEnv *env, jobject exc) { if (exc != NULL) { (*env)->Throw(env, exc); } } jobject go_seq_get_exception(JNIEnv *env) { jthrowable exc = (*env)->ExceptionOccurred(env); if (!exc) { return NULL; } (*env)->ExceptionClear(env); return exc; } jbyteArray go_seq_to_java_bytearray(JNIEnv *env, nbyteslice s, int copy) { if (s.ptr == NULL) { return NULL; } jbyteArray res = (*env)->NewByteArray(env, s.len); if (res == NULL) { LOG_FATAL("NewByteArray failed"); } (*env)->SetByteArrayRegion(env, res, 0, s.len, s.ptr); if (copy) { free(s.ptr); } return res; } #define surr1 0xd800 #define surr2 0xdc00 #define surr3 0xe000 // Unicode replacement character #define replacementChar 0xFFFD #define rune1Max ((1<<7) - 1) #define rune2Max ((1<<11) - 1) #define rune3Max ((1<<16) - 1) // Maximum valid Unicode code point. #define MaxRune 0x0010FFFF #define surrogateMin 0xD800 #define surrogateMax 0xDFFF // 0011 1111 #define maskx 0x3F // 1000 0000 #define tx 0x80 // 1100 0000 #define t2 0xC0 // 1110 0000 #define t3 0xE0 // 1111 0000 #define t4 0xF0 // encode_rune writes into p (which must be large enough) the UTF-8 encoding // of the rune. It returns the number of bytes written. static int encode_rune(uint8_t *p, uint32_t r) { if (r <= rune1Max) { p[0] = (uint8_t)r; return 1; } else if (r <= rune2Max) { p[0] = t2 | (uint8_t)(r>>6); p[1] = tx | (((uint8_t)(r))&maskx); return 2; } else { if (r > MaxRune || (surrogateMin <= r && r <= surrogateMax)) { r = replacementChar; } if (r <= rune3Max) { p[0] = t3 | (uint8_t)(r>>12); p[1] = tx | (((uint8_t)(r>>6))&maskx); p[2] = tx | (((uint8_t)(r))&maskx); return 3; } else { p[0] = t4 | (uint8_t)(r>>18); p[1] = tx | (((uint8_t)(r>>12))&maskx); p[2] = tx | (((uint8_t)(r>>6))&maskx); p[3] = tx | (((uint8_t)(r))&maskx); return 4; } } } // utf16_decode decodes an array of UTF16 characters to a UTF-8 encoded // nstring copy. The support functions and utf16_decode itself are heavily // based on the unicode/utf8 and unicode/utf16 Go packages. static nstring utf16_decode(jchar *chars, jsize len) { jsize worstCaseLen = 4*len; uint8_t *buf = malloc(worstCaseLen); if (buf == NULL) { LOG_FATAL("utf16Decode: malloc failed"); } jsize nsrc = 0; jsize ndst = 0; while (nsrc < len) { uint32_t r = chars[nsrc]; nsrc++; if (surr1 <= r && r < surr2 && nsrc < len) { uint32_t r2 = chars[nsrc]; if (surr2 <= r2 && r2 < surr3) { nsrc++; r = (((r-surr1)<<10) | (r2 - surr2)) + 0x10000; } } if (ndst + 4 > worstCaseLen) { LOG_FATAL("utf16Decode: buffer overflow"); } ndst += encode_rune(buf + ndst, r); } struct nstring res = {.chars = buf, .len = ndst}; return res; } nstring go_seq_from_java_string(JNIEnv *env, jstring str) { struct nstring res = {NULL, 0}; if (str == NULL) { return res; } jsize nchars = (*env)->GetStringLength(env, str); if (nchars == 0) { return res; } jchar *chars = (jchar *)(*env)->GetStringChars(env, str, NULL); if (chars == NULL) { LOG_FATAL("GetStringChars failed"); } nstring nstr = utf16_decode(chars, nchars); (*env)->ReleaseStringChars(env, str, chars); return nstr; } nbyteslice go_seq_from_java_bytearray(JNIEnv *env, jbyteArray arr, int copy) { struct nbyteslice res = {NULL, 0}; if (arr == NULL) { return res; } jsize len = (*env)->GetArrayLength(env, arr); if (len == 0) { return res; } jbyte *ptr = (*env)->GetByteArrayElements(env, arr, NULL); if (ptr == NULL) { LOG_FATAL("GetByteArrayElements failed"); } if (copy) { void *ptr_copy = (void *)malloc(len); if (ptr_copy == NULL) { LOG_FATAL("malloc failed"); } memcpy(ptr_copy, ptr, len); (*env)->ReleaseByteArrayElements(env, arr, ptr, JNI_ABORT); ptr = (jbyte *)ptr_copy; } res.ptr = ptr; res.len = len; return res; } int32_t go_seq_to_refnum_go(JNIEnv *env, jobject o) { if (o == NULL) { return NULL_REFNUM; } return (int32_t)(*env)->CallStaticIntMethod(env, seq_class, seq_incGoObjectRef, o); } int32_t go_seq_to_refnum(JNIEnv *env, jobject o) { if (o == NULL) { return NULL_REFNUM; } return (int32_t)(*env)->CallStaticIntMethod(env, seq_class, seq_incRef, o); } int32_t go_seq_unwrap(jint refnum) { JNIEnv *env = go_seq_push_local_frame(0); jobject jobj = go_seq_from_refnum(env, refnum, NULL, NULL); int32_t goref = go_seq_to_refnum_go(env, jobj); go_seq_pop_local_frame(env); return goref; } jobject go_seq_from_refnum(JNIEnv *env, int32_t refnum, jclass proxy_class, jmethodID proxy_cons) { if (refnum == NULL_REFNUM) { return NULL; } if (refnum < 0) { // Go object // return new <Proxy>(refnum) return (*env)->NewObject(env, proxy_class, proxy_cons, refnum); } // Seq.Ref ref = Seq.getRef(refnum) jobject ref = (*env)->CallStaticObjectMethod(env, seq_class, seq_getRef, (jint)refnum); if (ref == NULL) { LOG_FATAL("Unknown reference: %d", refnum); } // Go incremented the reference count just before passing the refnum. Decrement it here. (*env)->CallStaticVoidMethod(env, seq_class, seq_decRef, (jint)refnum); // return ref.obj return (*env)->GetObjectField(env, ref, ref_objField); } // go_seq_to_java_string converts a nstring to a jstring. jstring go_seq_to_java_string(JNIEnv *env, nstring str) { jstring s = (*env)->NewString(env, str.chars, str.len/2); if (str.chars != NULL) { free(str.chars); } return s; } // go_seq_push_local_frame retrieves or creates the JNIEnv* for the current thread // and pushes a JNI reference frame. Must be matched with call to go_seq_pop_local_frame. JNIEnv *go_seq_push_local_frame(jint nargs) { JNIEnv *env = go_seq_get_thread_env(); // Given the number of function arguments, compute a conservative bound for the minimal frame size. // Assume two slots for each per parameter (Seq.Ref and Seq.Object) and add extra // extra space for the receiver, the return value, and exception (if any). jint frameSize = 2*nargs + 10; if ((*env)->PushLocalFrame(env, frameSize) < 0) { LOG_FATAL("PushLocalFrame failed"); } return env; } // Pop the current local frame, freeing all JNI local references in it void go_seq_pop_local_frame(JNIEnv *env) { (*env)->PopLocalFrame(env, NULL); } void go_seq_inc_ref(int32_t ref) { JNIEnv *env = go_seq_get_thread_env(); (*env)->CallStaticVoidMethod(env, seq_class, seq_incRefnum, (jint)ref); } void go_seq_dec_ref(int32_t ref) { JNIEnv *env = go_seq_get_thread_env(); (*env)->CallStaticVoidMethod(env, seq_class, seq_decRef, (jint)ref); } JNIEXPORT void JNICALL Java_go_Seq_init(JNIEnv *env, jclass clazz) { if ((*env)->GetJavaVM(env, &jvm) != 0) { LOG_FATAL("failed to get JVM"); } if (pthread_key_create(&jnienvs, env_destructor) != 0) { LOG_FATAL("failed to initialize jnienvs thread local storage"); } seq_class = (*env)->NewGlobalRef(env, clazz); seq_getRef = (*env)->GetStaticMethodID(env, seq_class, "getRef", "(I)Lgo/Seq$Ref;"); if (seq_getRef == NULL) { LOG_FATAL("failed to find method Seq.getRef"); } seq_decRef = (*env)->GetStaticMethodID(env, seq_class, "decRef", "(I)V"); if (seq_decRef == NULL) { LOG_FATAL("failed to find method Seq.decRef"); } seq_incRefnum = (*env)->GetStaticMethodID(env, seq_class, "incRefnum", "(I)V"); if (seq_incRefnum == NULL) { LOG_FATAL("failed to find method Seq.incRefnum"); } seq_incRef = (*env)->GetStaticMethodID(env, seq_class, "incRef", "(Ljava/lang/Object;)I"); if (seq_incRef == NULL) { LOG_FATAL("failed to find method Seq.incRef"); } seq_incGoObjectRef = (*env)->GetStaticMethodID(env, seq_class, "incGoObjectRef", "(Lgo/Seq$GoObject;)I"); if (seq_incGoObjectRef == NULL) { LOG_FATAL("failed to find method Seq.incGoObjectRef"); } jclass ref_class = (*env)->FindClass(env, "go/Seq$Ref"); if (ref_class == NULL) { LOG_FATAL("failed to find the Seq.Ref class"); } ref_objField = (*env)->GetFieldID(env, ref_class, "obj", "Ljava/lang/Object;"); if (ref_objField == NULL) { LOG_FATAL("failed to find the Seq.Ref.obj field"); } initClasses(); } JNIEXPORT void JNICALL Java_go_Seq_destroyRef(JNIEnv *env, jclass clazz, jint refnum) { DestroyRef(refnum); } JNIEXPORT void JNICALL Java_go_Seq_incGoRef(JNIEnv *env, jclass clazz, jint refnum, jobject ref) { IncGoRef(refnum); } jclass go_seq_find_class(const char *name) { JNIEnv *env = go_seq_push_local_frame(0); jclass clazz = (*env)->FindClass(env, name); if (clazz == NULL) { (*env)->ExceptionClear(env); } else { clazz = (*env)->NewGlobalRef(env, clazz); } go_seq_pop_local_frame(env); return clazz; } jmethodID go_seq_get_static_method_id(jclass clazz, const char *name, const char *sig) { JNIEnv *env = go_seq_push_local_frame(0); jmethodID m = (*env)->GetStaticMethodID(env, clazz, name, sig); if (m == NULL) { (*env)->ExceptionClear(env); } go_seq_pop_local_frame(env); return m; } jmethodID go_seq_get_method_id(jclass clazz, const char *name, const char *sig) { JNIEnv *env = go_seq_push_local_frame(0); jmethodID m = (*env)->GetMethodID(env, clazz, name, sig); if (m == NULL) { (*env)->ExceptionClear(env); } go_seq_pop_local_frame(env); return m; } void go_seq_release_byte_array(JNIEnv *env, jbyteArray arr, jbyte* ptr) { if (ptr != NULL) { (*env)->ReleaseByteArrayElements(env, arr, ptr, 0); } } int go_seq_isinstanceof(jint refnum, jclass clazz) { JNIEnv *env = go_seq_push_local_frame(0); jobject obj = go_seq_from_refnum(env, refnum, NULL, NULL); jboolean isinst = (*env)->IsInstanceOf(env, obj, clazz); go_seq_pop_local_frame(env); return isinst; }
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/seq_test.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package java import ( "fmt" "io" "io/ioutil" "log" "os" "os/exec" "path/filepath" "runtime" "strings" "testing" "golang.org/x/mobile/internal/importers/java" "golang.org/x/mobile/internal/sdkpath" ) var gomobileBin string func TestMain(m *testing.M) { os.Exit(testMain(m)) } func testMain(m *testing.M) int { // Build gomobile and gobind and put them into PATH. binDir, err := ioutil.TempDir("", "bind-java-test-") if err != nil { log.Fatal(err) } defer os.RemoveAll(binDir) exe := "" if runtime.GOOS == "windows" { exe = ".exe" } if runtime.GOOS != "android" { gocmd := filepath.Join(runtime.GOROOT(), "bin", "go") gomobileBin = filepath.Join(binDir, "gomobile"+exe) gobindBin := filepath.Join(binDir, "gobind"+exe) if out, err := exec.Command(gocmd, "build", "-o", gomobileBin, "golang.org/x/mobile/cmd/gomobile").CombinedOutput(); err != nil { log.Fatalf("gomobile build failed: %v: %s", err, out) } if out, err := exec.Command(gocmd, "build", "-o", gobindBin, "golang.org/x/mobile/cmd/gobind").CombinedOutput(); err != nil { log.Fatalf("gobind build failed: %v: %s", err, out) } path := binDir if oldPath := os.Getenv("PATH"); oldPath != "" { path += string(filepath.ListSeparator) + oldPath } os.Setenv("PATH", path) } return m.Run() } func TestClasses(t *testing.T) { if !java.IsAvailable() { t.Skipf("java importer is not available") } runTest(t, []string{ "golang.org/x/mobile/bind/testdata/testpkg/javapkg", }, "", "ClassesTest") } func TestCustomPkg(t *testing.T) { runTest(t, []string{ "golang.org/x/mobile/bind/testdata/testpkg", }, "org.golang.custompkg", "CustomPkgTest") } func TestJavaSeqTest(t *testing.T) { runTest(t, []string{ "golang.org/x/mobile/bind/testdata/testpkg", "golang.org/x/mobile/bind/testdata/testpkg/secondpkg", "golang.org/x/mobile/bind/testdata/testpkg/simplepkg", }, "", "SeqTest") } // TestJavaSeqBench runs java test SeqBench.java, with the same // environment requirements as TestJavaSeqTest. // // The benchmarks runs on the phone, so the benchmarkpkg implements // rudimentary timing logic and outputs benchcmp compatible runtimes // to logcat. Use // // adb logcat -v raw GoLog:* *:S // // while running the benchmark to see the results. func TestJavaSeqBench(t *testing.T) { if testing.Short() { t.Skip("skipping benchmark in short mode.") } runTest(t, []string{"golang.org/x/mobile/bind/testdata/benchmark"}, "", "SeqBench") } // runTest runs the Android java test class specified with javaCls. If javaPkg is // set, it is passed with the -javapkg flag to gomobile. The pkgNames lists the Go // packages to bind for the test. // This requires the gradle command to be in PATH and the Android SDK to be // installed. func runTest(t *testing.T, pkgNames []string, javaPkg, javaCls string) { if gomobileBin == "" { t.Skipf("no gomobile on %s", runtime.GOOS) } gradle, err := exec.LookPath("gradle") if err != nil { t.Skip("command gradle not found, skipping") } if _, err := sdkpath.AndroidHome(); err != nil { t.Skip("Android SDK not found, skipping") } cwd, err := os.Getwd() if err != nil { t.Fatalf("failed pwd: %v", err) } tmpdir, err := ioutil.TempDir("", "bind-java-seq-test-") if err != nil { t.Fatalf("failed to prepare temp dir: %v", err) } defer os.RemoveAll(tmpdir) t.Logf("tmpdir = %s", tmpdir) if err := os.Chdir(tmpdir); err != nil { t.Fatalf("failed chdir: %v", err) } defer os.Chdir(cwd) for _, d := range []string{"src/main", "src/androidTest/java/go", "libs", "src/main/res/values"} { err = os.MkdirAll(filepath.Join(tmpdir, d), 0700) if err != nil { t.Fatal(err) } } args := []string{"bind", "-tags", "aaa bbb", "-o", "pkg.aar"} if javaPkg != "" { args = append(args, "-javapkg", javaPkg) } args = append(args, pkgNames...) cmd := exec.Command(gomobileBin, args...) // Reverse binding doesn't work with Go module since imports starting with Java or ObjC are not valid FQDNs. // Disable Go module explicitly until this problem is solved. See golang/go#27234. cmd.Env = append(os.Environ(), "GO111MODULE=off") buf, err := cmd.CombinedOutput() if err != nil { t.Logf("%s", buf) t.Fatalf("failed to run gomobile bind: %v", err) } fname := filepath.Join(tmpdir, "libs", "pkg.aar") err = cp(fname, filepath.Join(tmpdir, "pkg.aar")) if err != nil { t.Fatalf("failed to copy pkg.aar: %v", err) } fname = filepath.Join(tmpdir, "src/androidTest/java/go/"+javaCls+".java") err = cp(fname, filepath.Join(cwd, javaCls+".java")) if err != nil { t.Fatalf("failed to copy SeqTest.java: %v", err) } fname = filepath.Join(tmpdir, "src/main/AndroidManifest.xml") err = ioutil.WriteFile(fname, []byte(androidmanifest), 0700) if err != nil { t.Fatalf("failed to write android manifest file: %v", err) } // Add a dummy string resource to avoid errors from the Android build system. fname = filepath.Join(tmpdir, "src/main/res/values/strings.xml") err = ioutil.WriteFile(fname, []byte(stringsxml), 0700) if err != nil { t.Fatalf("failed to write strings.xml file: %v", err) } fname = filepath.Join(tmpdir, "build.gradle") err = ioutil.WriteFile(fname, []byte(buildgradle), 0700) if err != nil { t.Fatalf("failed to write build.gradle file: %v", err) } if buf, err := run(gradle + " connectedAndroidTest"); err != nil { t.Logf("%s", buf) t.Errorf("failed to run gradle test: %v", err) } } func run(cmd string) ([]byte, error) { c := strings.Split(cmd, " ") return exec.Command(c[0], c[1:]...).CombinedOutput() } func cp(dst, src string) error { r, err := os.Open(src) if err != nil { return fmt.Errorf("failed to read source: %v", err) } defer r.Close() w, err := os.Create(dst) if err != nil { return fmt.Errorf("failed to open destination: %v", err) } _, err = io.Copy(w, r) cerr := w.Close() if err != nil { return err } return cerr } const androidmanifest = `<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.BindTest" android:versionCode="1" android:versionName="1.0"> </manifest>` const buildgradle = `buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.1.0' } } allprojects { repositories { google() jcenter() } } apply plugin: 'com.android.library' android { compileSdkVersion 'android-19' defaultConfig { minSdkVersion 16 } } repositories { flatDir { dirs 'libs' } } dependencies { implementation(name: "pkg", ext: "aar") } ` const stringsxml = `<?xml version="1.0" encoding="utf-8"?> <resources> <string name="dummy">dummy</string> </resources>`
java
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/java/SeqTest.java
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package go; import android.test.InstrumentationTestCase; import android.test.MoreAsserts; import java.util.Arrays; import java.util.Random; import testpkg.*; import secondpkg.Secondpkg; public class SeqTest extends InstrumentationTestCase { public SeqTest() { } public void testConst() { assertEquals("const String", "a string", Testpkg.AString); assertEquals("const Int", 7, Testpkg.AnInt); assertEquals("const Bool", true, Testpkg.ABool); assertEquals("const Float", 0.12345, Testpkg.AFloat, 0.0001); assertEquals("const MinInt32", -1<<31, Testpkg.MinInt32); assertEquals("const MaxInt32", (1<<31) - 1, Testpkg.MaxInt32); assertEquals("const MinInt64", -1L<<63, Testpkg.MinInt64); assertEquals("const MaxInt64", (1L<<63) - 1, Testpkg.MaxInt64); assertEquals("const SmallestNonzeroFloat64", 4.940656458412465441765687928682213723651e-324, Testpkg.SmallestNonzeroFloat64, 1e-323); assertEquals("const MaxFloat64", 1.797693134862315708145274237317043567981e+308, Testpkg.MaxFloat64, 0.0001); assertEquals("const SmallestNonzeroFloat32", 1.401298464324817070923729583289916131280e-45, Testpkg.SmallestNonzeroFloat32, 1e-44); assertEquals("const MaxFloat32", 3.40282346638528859811704183484516925440e+38, Testpkg.MaxFloat32, 0.0001); assertEquals("const Log2E", 1/0.693147180559945309417232121458176568075500134360255254120680009, Testpkg.Log2E, 0.0001); } public void testRefMap() { // Ensure that the RefMap.live count is kept in sync // even a particular reference number is removed and // added again Seq.RefMap m = new Seq.RefMap(); Seq.Ref r = new Seq.Ref(1, null); m.put(r.refnum, r); m.remove(r.refnum); m.put(r.refnum, r); // Force the RefMap to grow, to activate the sanity // checking of the live count in RefMap.grow. for (int i = 2; i < 24; i++) { m.put(i, new Seq.Ref(i, null)); } } public void testVar() { assertEquals("var StringVar", "a string var", Testpkg.getStringVar()); String newStringVar = "a new string var"; Testpkg.setStringVar(newStringVar); assertEquals("var StringVar", newStringVar, Testpkg.getStringVar()); assertEquals("var IntVar", 77, Testpkg.getIntVar()); long newIntVar = 777; Testpkg.setIntVar(newIntVar); assertEquals("var IntVar", newIntVar, Testpkg.getIntVar()); S s0 = Testpkg.getStructVar(); assertEquals("var StructVar", "a struct var", s0.string()); S s1 = Testpkg.new_(); Testpkg.setStructVar(s1); assertEquals("var StructVar", s1.string(), Testpkg.getStructVar().string()); AnI obj = new AnI(); obj.name = "this is an I"; Testpkg.setInterfaceVar(obj); assertEquals("var InterfaceVar", obj.string(), Testpkg.getInterfaceVar().string()); } public void testAssets() { // Make sure that a valid context is set before reading assets Seq.setContext(getInstrumentation().getContext()); String want = "Hello, Assets.\n"; String got = Testpkg.readAsset(); assertEquals("Asset read", want, got); } public void testAdd() { long res = Testpkg.add(3, 4); assertEquals("Unexpected arithmetic failure", 7, res); } public void testBool() { assertTrue(Testpkg.negate(false)); assertFalse(Testpkg.negate(true)); } public void testShortString() { String want = "a short string"; String got = Testpkg.strDup(want); assertEquals("Strings should match", want, got); want = ""; got = Testpkg.strDup(want); assertEquals("Strings should match (empty string)", want, got); got = Testpkg.strDup(null); assertEquals("Strings should match (null string)", want, got); } public void testLongString() { StringBuilder b = new StringBuilder(); for (int i = 0; i < 128*1024; i++) { b.append("0123456789"); } String want = b.toString(); String got = Testpkg.strDup(want); assertEquals("Strings should match", want, got); } public void testUnicode() { String[] tests = new String[]{ "abcxyz09{}", "Hello, 世界", "\uffff\uD800\uDC00\uD800\uDC01\uD808\uDF45\uDBFF\uDFFF", // From Go std lib tests in unicode/utf16/utf16_test.go "\u0001\u0002\u0003\u0004", "\uffff\ud800\udc00\ud800\udc01\ud808\udf45\udbff\udfff", "\ud800a", "\udfff" }; String[] wants = new String[]{ "abcxyz09{}", "Hello, 世界", "\uffff\uD800\uDC00\uD800\uDC01\uD808\uDF45\uDBFF\uDFFF", "\u0001\u0002\u0003\u0004", "\uffff\ud800\udc00\ud800\udc01\ud808\udf45\udbff\udfff", "\ufffda", "\ufffd" }; for (int i = 0; i < tests.length; i++) { String got = Testpkg.strDup(tests[i]); String want = wants[i]; assertEquals("Strings should match", want, got); } } public void testNilErr() throws Exception { Testpkg.err(null); // returns nil, no exception } public void testErr() { String msg = "Go errors are dropped into the confusing space of exceptions"; try { Testpkg.err(msg); fail("expected non-nil error to be turned into an exception"); } catch (Exception e) { assertEquals("messages should match", msg, e.getMessage()); } } public void testByteArray() { for (int i = 0; i < 2048; i++) { if (i == 0) { byte[] got = Testpkg.bytesAppend(null, null); assertEquals("Bytes(null+null) should match", (byte[])null, got); got = Testpkg.bytesAppend(new byte[0], new byte[0]); assertEquals("Bytes(empty+empty) should match", (byte[])null, got); continue; } byte[] want = new byte[i]; new Random().nextBytes(want); byte[] s1 = null; byte[] s2 = null; if (i > 0) { s1 = Arrays.copyOfRange(want, 0, 1); } if (i > 1) { s2 = Arrays.copyOfRange(want, 1, i); } byte[] got = Testpkg.bytesAppend(s1, s2); MoreAsserts.assertEquals("Bytes(len="+i+") should match", want, got); } } // Test for golang.org/issue/9486. public void testByteArrayAfterString() { byte[] bytes = new byte[1024]; for (int i=0; i < bytes.length; i++) { bytes[i] = 8; } String stuff = "stuff"; byte[] got = Testpkg.appendToString(stuff, bytes); try { byte[] s = stuff.getBytes("UTF-8"); byte[] want = new byte[s.length + bytes.length]; System.arraycopy(s, 0, want, 0, s.length); System.arraycopy(bytes, 0, want, s.length, bytes.length); MoreAsserts.assertEquals("Bytes should match", want, got); } catch (Exception e) { fail("Cannot perform the test: " + e.toString()); } } public void testGoRefGC() { S s = Testpkg.new_(); runGC(); long collected = Testpkg.numSCollected(); assertEquals("Only S should be pinned", 0, collected); s = null; runGC(); collected = Testpkg.numSCollected(); assertEquals("S should be collected", 1, collected); } private class AnI implements I { public void e() throws Exception { throw new Exception("my exception from E"); } boolean calledF; public void f() { calledF = true; } public I i() { return this; } public S s() { return Testpkg.new_(); } public String stoString(S s) { return s.string(); } public long v() { return 1234; } public long ve() throws Exception { throw new Exception("my exception from VE"); } public String name; public String string() { return name; } } // TODO(hyangah): add tests for methods that take parameters. public void testInterfaceMethodReturnsError() { final AnI obj = new AnI(); try { Testpkg.callE(obj); fail("Expecting exception but none was thrown."); } catch (Exception e) { assertEquals("Error messages should match", "my exception from E", e.getMessage()); } } public void testInterfaceMethodVoid() { final AnI obj = new AnI(); Testpkg.callF(obj); assertTrue("Want AnI.F to be called", obj.calledF); } public void testInterfaceMethodReturnsInterface() { AnI obj = new AnI(); obj.name = "testing AnI.I"; I i = Testpkg.callI(obj); assertEquals("Want AnI.I to return itself", i.string(), obj.string()); runGC(); i = Testpkg.callI(obj); assertEquals("Want AnI.I to return itself", i.string(), obj.string()); } public void testInterfaceMethodReturnsStructPointer() { final AnI obj = new AnI(); for (int i = 0; i < 5; i++) { S s = Testpkg.callS(obj); runGC(); } } public void testInterfaceMethodTakesStructPointer() { final AnI obj = new AnI(); S s = Testpkg.callS(obj); String got = obj.stoString(s); String want = s.string(); assertEquals("Want AnI.StoString(s) to call s's String", want, got); } public void testInterfaceMethodReturnsInt() { final AnI obj = new AnI(); assertEquals("Values must match", 1234, Testpkg.callV(obj)); } public void testInterfaceMethodReturnsIntOrError() { final AnI obj = new AnI(); try { long v = Testpkg.callVE(obj); fail("Expecting exception but none was thrown and got value " + v); } catch (Exception e) { assertEquals("Error messages should match", "my exception from VE", e.getMessage()); } } boolean finalizedAnI; private class AnI_Traced extends AnI { @Override public void finalize() throws Throwable { finalizedAnI = true; super.finalize(); } } public void testJavaRefKeep() { finalizedAnI = false; AnI obj = new AnI_Traced(); Testpkg.callF(obj); assertTrue("want F to be called", obj.calledF); Testpkg.callF(obj); obj = null; int attempts = 0; while (true) { runGC(); if (finalizedAnI) break; attempts++; try { Thread.sleep(100); } catch (InterruptedException e) { throw new RuntimeException(e); } if (attempts >= 10) fail("want obj not to be kept by Go; tried " + attempts + " garbage collections."); } finalizedAnI = false; obj = new AnI_Traced(); Testpkg.keep(obj); obj = null; runGC(); assertFalse("want obj to be kept live by Go", finalizedAnI); } private int countI = 0; private class CountI implements I { public void f() { countI++; } public void e() throws Exception {} public I i() { return null; } public S s() { return null; } public String stoString(S s) { return ""; } public long v() { return 0; } public long ve() throws Exception { return 0; } public String string() { return ""; } } public void testGoRefMapGrow() { CountI obj = new CountI(); Testpkg.keep(obj); // Push active references beyond base map size. for (int i = 0; i < 24; i++) { CountI o = new CountI(); Testpkg.callF(o); if (i%3==0) { Testpkg.keep(o); } } runGC(); for (int i = 0; i < 128; i++) { Testpkg.callF(new CountI()); } Testpkg.callF(obj); // original object needs to work. assertEquals(countI, 1+24+128); } private void runGC() { System.gc(); System.runFinalization(); Testpkg.gc(); System.gc(); System.runFinalization(); } public void testUnnamedParams() { final String msg = "1234567"; assertEquals("want the length of \"1234567\" passed after unnamed params", 7, Testpkg.unnamedParams(10, 20, msg)); } public void testPointerToStructAsField() { Node a = Testpkg.newNode("A"); Node b = Testpkg.newNode("B"); a.setNext(b); String got = a.string(); assertEquals("want Node A points to Node B", "A:B:<end>", got); } public void testImplementsInterface() { Interface intf = Testpkg.newConcrete(); } public void testErrorField() { Node n = Testpkg.newNode("ErrTest"); Exception want = new Exception("an error message"); n.setErr(want); Exception got = n.getErr(); assertTrue("want back the error we set", want == got); String msg = Testpkg.errorMessage(want); assertEquals("the error message must match", want.getMessage(), msg); } public void testErrorDup() { Exception err = Testpkg.getGlobalErr(); assertTrue("the Go error instance must preserve its identity", Testpkg.isGlobalErr(err)); assertEquals("the Go error message must be preserved", "global err", err.getMessage()); } //test if we have JNI local reference table overflow error public void testLocalReferenceOverflow() { Testpkg.callWithCallback(new GoCallback() { @Override public void varUpdate() { //do nothing } }); } public void testNullReferences() { assertTrue(Testpkg.callWithNull(null, new NullTest() { public NullTest null_() { return null; } })); assertEquals("Go nil interface is null", null, Testpkg.newNullInterface()); assertEquals("Go nil struct pointer is null", null, Testpkg.newNullStruct()); Issue20330 nullArger = new Issue20330(); assertTrue(nullArger.callWithNull(null)); } public void testPassByteArray() { Testpkg.passByteArray(new B() { @Override public void b(byte[] b) { byte[] want = new byte[]{1, 2, 3, 4}; MoreAsserts.assertEquals("bytes should match", want, b); } }); } public void testReader() { byte[] b = new byte[8]; try { long n = Testpkg.readIntoByteArray(b); assertEquals("wrote to the entire byte array", b.length, n); byte[] want = new byte[b.length]; for (int i = 0; i < want.length; i++) want[i] = (byte)i; MoreAsserts.assertEquals("bytes should match", want, b); } catch (Exception e) { fail("Failed to write: " + e.toString()); } } public void testGoroutineCallback() { Testpkg.goroutineCallback(new Receiver() { @Override public void hello(String msg) { } }); } public void testImportedPkg() { Testpkg.callImportedI(new secondpkg.I() { @Override public long f(long i) { return i; } }); assertEquals("imported string should match", Secondpkg.HelloString, Secondpkg.hello()); secondpkg.I i = Testpkg.newImportedI(); secondpkg.S s = Testpkg.newImportedS(); i = Testpkg.getImportedVarI(); s = Testpkg.getImportedVarS(); assertEquals("numbers should match", 8, i.f(8)); assertEquals("numbers should match", 8, s.f(8)); Testpkg.setImportedVarI(i); Testpkg.setImportedVarS(s); ImportedFields fields = Testpkg.newImportedFields(); i = fields.getI(); s = fields.getS(); fields.setI(i); fields.setS(s); Testpkg.withImportedI(i); Testpkg.withImportedS(s); secondpkg.IF f = new AnI(); f = Testpkg.new_(); secondpkg.Ser ser = Testpkg.newSer(); } public void testRoundtripEquality() { I want = new AnI(); assertTrue("java object passed through Go should not be wrapped", want == Testpkg.iDup(want)); InterfaceDupper idup = new InterfaceDupper(){ @Override public Interface iDup(Interface i) { return i; } }; assertTrue("Go interface passed through Java should not be wrapped", Testpkg.callIDupper(idup)); ConcreteDupper cdup = new ConcreteDupper(){ @Override public Concrete cDup(Concrete c) { return c; } }; assertTrue("Go struct passed through Java should not be wrapped", Testpkg.callCDupper(cdup)); } public void testConstructor() { Interface i = new Concrete(); i.f(); S2 s = new S2(1, 2); assertEquals("new S2().sum", 3.0, s.sum()); assertEquals("new S2().tryTwoStrings", "gostring", s.tryTwoStrings("go", "string")); new S3(); S4 s4 = new S4(123); assertEquals("Constructor argument", 123, s4.getI()); s4 = new S4(123.456); assertEquals("Overloaded constructor argument", 123, s4.getI()); s4 = new S4(false); assertEquals("Exceptional constructor", 0, s4.getI()); try { s4 = new S4(true); fail("Constructor error wasn't caught"); } catch (Exception e) { } } public void testEmptyError() { try { Testpkg.emptyError(); fail("Empty error wasn't caught"); } catch (Exception e) { } EmptyErrorer empty = new EmptyErrorer() { @Override public void emptyError() throws Exception { throw new Exception(""); } }; try { Testpkg.callEmptyError(empty); fail("Empty exception wasn't caught"); } catch (Exception e) { } } public void testInitCaller() { Testpkg.init(); InitCaller initer = Testpkg.newInitCaller(); initer.init(); } public void testSIGPIPE() { Testpkg.testSIGPIPE(); } public void testTags() { assertEquals("Constant from a tagged file", 42, Testpkg.TaggedConst); } public void testClassNameWithPackageName() { testpkg.Testpkg_ o = new secondpkg.Secondpkg_(); secondpkg.Secondpkg_ o2 = Secondpkg.newSecondpkg(); o2.m(); o2.setV("hi"); assertEquals(o2.getV(), "hi"); Testpkg.clashingParameterFromOtherPackage(o2); } }
seq
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/seq/seq.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package seq implements the machine-dependent seq serialization format. // // Implementations of Transact and FinalizeRef are provided by a // specific foreign language binding package, e.g. go.mobile/bind/java. // // Designed only for use by the code generated by gobind. Don't try to // use this directly. package seq // import "golang.org/x/mobile/bind/seq" import _ "golang.org/x/mobile/internal/mobileinit" // FinalizeRef is the finalizer used on foreign objects. var FinalizeRef func(ref *Ref) // IncRef increments the foreign reference count for ref while it is in transit. // The count is decremented after the ref is received and translated on the foreign side. var IncForeignRef func(refnum int32)
seq
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/seq/ref.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package seq //#cgo LDFLAGS: -llog //#include <android/log.h> //#include <string.h> //import "C" import ( "fmt" "runtime" "sync" ) type countedObj struct { obj interface{} cnt int32 } // also known to bind/java/Seq.java and bind/objc/seq_darwin.m const NullRefNum = 41 // refs stores Go objects that have been passed to another language. var refs struct { sync.Mutex next int32 // next reference number to use for Go object, always negative refs map[interface{}]int32 objs map[int32]countedObj } func init() { refs.Lock() refs.next = -24 // Go objects get negative reference numbers. Arbitrary starting point. refs.refs = make(map[interface{}]int32) refs.objs = make(map[int32]countedObj) refs.Unlock() } // A Ref represents a Java or Go object passed across the language // boundary. type Ref struct { Bind_Num int32 } type proxy interface { // Use a strange name and hope that user code does not implement it Bind_proxy_refnum__() int32 } // ToRefNum increments the reference count for an object and // returns its refnum. func ToRefNum(obj interface{}) int32 { // We don't track foreign objects, so if obj is a proxy // return its refnum. if r, ok := obj.(proxy); ok { refnum := r.Bind_proxy_refnum__() if refnum <= 0 { panic(fmt.Errorf("seq: proxy contained invalid Go refnum: %d", refnum)) } return refnum } refs.Lock() num := refs.refs[obj] if num != 0 { s := refs.objs[num] refs.objs[num] = countedObj{s.obj, s.cnt + 1} } else { num = refs.next refs.next-- if refs.next > 0 { panic("refs.next underflow") } refs.refs[obj] = num refs.objs[num] = countedObj{obj, 1} } refs.Unlock() return num } // FromRefNum returns the Ref for a refnum. If the refnum specifies a // foreign object, a finalizer is set to track its lifetime. func FromRefNum(num int32) *Ref { if num == NullRefNum { return nil } ref := &Ref{num} if num > 0 { // This is a foreign object reference. // Track its lifetime with a finalizer. runtime.SetFinalizer(ref, FinalizeRef) } return ref } // Bind_IncNum increments the foreign reference count and // return the refnum. func (r *Ref) Bind_IncNum() int32 { refnum := r.Bind_Num IncForeignRef(refnum) // Make sure this reference is not finalized before // the foreign reference count is incremented. runtime.KeepAlive(r) return refnum } // Get returns the underlying object. func (r *Ref) Get() interface{} { refnum := r.Bind_Num refs.Lock() o, ok := refs.objs[refnum] refs.Unlock() if !ok { panic(fmt.Sprintf("unknown ref %d", refnum)) } // This is a Go reference and its refnum was incremented // before crossing the language barrier. Delete(refnum) return o.obj } // Inc increments the reference count for a refnum. Called from Bind_proxy_refnum // functions. func Inc(num int32) { refs.Lock() o, ok := refs.objs[num] if !ok { panic(fmt.Sprintf("seq.Inc: unknown refnum: %d", num)) } refs.objs[num] = countedObj{o.obj, o.cnt + 1} refs.Unlock() } // Delete decrements the reference count and removes the pinned object // from the object map when the reference count becomes zero. func Delete(num int32) { refs.Lock() defer refs.Unlock() o, ok := refs.objs[num] if !ok { panic(fmt.Sprintf("seq.Delete unknown refnum: %d", num)) } if o.cnt <= 1 { delete(refs.objs, num) delete(refs.refs, o.obj) } else { refs.objs[num] = countedObj{o.obj, o.cnt - 1} } }
seq
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/seq/string_test.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package seq import ( "testing" "unicode/utf16" ) var strData = []string{ "abcxyz09{}", "Hello, 世界", string([]rune{0xffff, 0x10000, 0x10001, 0x12345, 0x10ffff}), } func TestString(t *testing.T) { for _, test := range strData { chars := make([]uint16, 4*len(test)) nchars := UTF16Encode(test, chars) chars = chars[:nchars] got := string(utf16.Decode(chars)) if got != test { t.Errorf("UTF16: got %q, want %q", got, test) } } }
seq
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/bind/seq/string.go
// Copyright 2014 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package seq import "unicode/utf16" // Based heavily on package unicode/utf16 from the Go standard library. const ( replacementChar = '\uFFFD' // Unicode replacement character maxRune = '\U0010FFFF' // Maximum valid Unicode code point. ) const ( // 0xd800-0xdc00 encodes the high 10 bits of a pair. // 0xdc00-0xe000 encodes the low 10 bits of a pair. // the value is those 20 bits plus 0x10000. surr1 = 0xd800 surr2 = 0xdc00 surr3 = 0xe000 surrSelf = 0x10000 ) // UTF16Encode utf16 encodes s into chars. It returns the resulting // length in units of uint16. It is assumed that the chars slice // has enough room for the encoded string. func UTF16Encode(s string, chars []uint16) int { n := 0 for _, v := range s { switch { case v < 0, surr1 <= v && v < surr3, v > maxRune: v = replacementChar fallthrough case v < surrSelf: chars[n] = uint16(v) n += 1 default: // surrogate pair, two uint16 values r1, r2 := utf16.EncodeRune(v) chars[n] = uint16(r1) chars[n+1] = uint16(r2) n += 2 } } return n }
touch
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/touch/touch.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package touch defines an event for touch input. // // See the golang.org/x/mobile/app package for details on the event model. package touch // import "golang.org/x/mobile/event/touch" // The best source on android input events is the NDK: include/android/input.h // // iOS event handling guide: // https://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS import ( "fmt" ) // Event is a touch event. type Event struct { // X and Y are the touch location, in pixels. X, Y float32 // Sequence is the sequence number. The same number is shared by all events // in a sequence. A sequence begins with a single TypeBegin, is followed by // zero or more TypeMoves, and ends with a single TypeEnd. A Sequence // distinguishes concurrent sequences but its value is subsequently reused. Sequence Sequence // Type is the touch type. Type Type } // Sequence identifies a sequence of touch events. type Sequence int64 // Type describes the type of a touch event. type Type byte const ( // TypeBegin is a user first touching the device. // // On Android, this is a AMOTION_EVENT_ACTION_DOWN. // On iOS, this is a call to touchesBegan. TypeBegin Type = iota // TypeMove is a user dragging across the device. // // A TypeMove is delivered between a TypeBegin and TypeEnd. // // On Android, this is a AMOTION_EVENT_ACTION_MOVE. // On iOS, this is a call to touchesMoved. TypeMove // TypeEnd is a user no longer touching the device. // // On Android, this is a AMOTION_EVENT_ACTION_UP. // On iOS, this is a call to touchesEnded. TypeEnd ) func (t Type) String() string { switch t { case TypeBegin: return "begin" case TypeMove: return "move" case TypeEnd: return "end" } return fmt.Sprintf("touch.Type(%d)", t) }
paint
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/paint/paint.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package paint defines an event for the app being ready to paint. // // See the golang.org/x/mobile/app package for details on the event model. package paint // import "golang.org/x/mobile/event/paint" // Event indicates that the app is ready to paint the next frame of the GUI. // // A frame is completed by calling the App's Publish method. type Event struct { // External is true for paint events sent by the screen driver. // // An external event may be sent at any time in response to an // operating system event, for example the window opened, was // resized, or the screen memory was lost. // // Programs actively drawing to the screen as fast as vsync allows // should ignore external paint events to avoid a backlog of paint // events building up. External bool }
size
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/size/size.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package size defines an event for the dimensions, physical resolution and // orientation of the app's window. // // See the golang.org/x/mobile/app package for details on the event model. package size // import "golang.org/x/mobile/event/size" import ( "image" "golang.org/x/mobile/geom" ) // Event holds the dimensions, physical resolution and orientation of the app's // window. type Event struct { // WidthPx and HeightPx are the window's dimensions in pixels. WidthPx, HeightPx int // WidthPt and HeightPt are the window's physical dimensions in points // (1/72 of an inch). // // The values are based on PixelsPerPt and are therefore approximate, as // per the comment on PixelsPerPt. WidthPt, HeightPt geom.Pt // PixelsPerPt is the window's physical resolution. It is the number of // pixels in a single geom.Pt, from the golang.org/x/mobile/geom package. // // There are a wide variety of pixel densities in existing phones and // tablets, so apps should be written to expect various non-integer // PixelsPerPt values. In general, work in geom.Pt. // // The value is approximate, in that the OS, drivers or hardware may report // approximate or quantized values. An N x N pixel square should be roughly // 1 square inch for N = int(PixelsPerPt * 72), although different square // lengths (in pixels) might be closer to 1 inch in practice. Nonetheless, // this PixelsPerPt value should be consistent with e.g. the ratio of // WidthPx to WidthPt. PixelsPerPt float32 // Orientation is the orientation of the device screen. Orientation Orientation } // Size returns the window's size in pixels, at the time this size event was // sent. func (e Event) Size() image.Point { return image.Point{e.WidthPx, e.HeightPx} } // Bounds returns the window's bounds in pixels, at the time this size event // was sent. // // The top-left pixel is always (0, 0). The bottom-right pixel is given by the // width and height. func (e Event) Bounds() image.Rectangle { return image.Rectangle{Max: image.Point{e.WidthPx, e.HeightPx}} } // Orientation is the orientation of the device screen. type Orientation int const ( // OrientationUnknown means device orientation cannot be determined. // // Equivalent on Android to Configuration.ORIENTATION_UNKNOWN // and on iOS to: // UIDeviceOrientationUnknown // UIDeviceOrientationFaceUp // UIDeviceOrientationFaceDown OrientationUnknown Orientation = iota // OrientationPortrait is a device oriented so it is tall and thin. // // Equivalent on Android to Configuration.ORIENTATION_PORTRAIT // and on iOS to: // UIDeviceOrientationPortrait // UIDeviceOrientationPortraitUpsideDown OrientationPortrait // OrientationLandscape is a device oriented so it is short and wide. // // Equivalent on Android to Configuration.ORIENTATION_LANDSCAPE // and on iOS to: // UIDeviceOrientationLandscapeLeft // UIDeviceOrientationLandscapeRight OrientationLandscape )
mouse
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/mouse/mouse.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package mouse defines an event for mouse input. // // See the golang.org/x/mobile/app package for details on the event model. package mouse // import "golang.org/x/mobile/event/mouse" import ( "fmt" "golang.org/x/mobile/event/key" ) // Event is a mouse event. type Event struct { // X and Y are the mouse location, in pixels. X, Y float32 // Button is the mouse button being pressed or released. Its value may be // zero, for a mouse move or drag without any button change. Button Button // TODO: have a field to hold what other buttons are down, for detecting // drags or button-chords. // Modifiers is a bitmask representing a set of modifier keys: // key.ModShift, key.ModAlt, etc. Modifiers key.Modifiers // Direction is the direction of the mouse event: DirPress, DirRelease, // or DirNone (for mouse moves or drags). Direction Direction // TODO: add a Device ID, for multiple input devices? // TODO: add a time.Time? } // Button is a mouse button. type Button int32 // IsWheel reports whether the button is for a scroll wheel. func (b Button) IsWheel() bool { return b < 0 } // TODO: have a separate axis concept for wheel up/down? How does that relate // to joystick events? const ( ButtonNone Button = +0 ButtonLeft Button = +1 ButtonMiddle Button = +2 ButtonRight Button = +3 ButtonWheelUp Button = -1 ButtonWheelDown Button = -2 ButtonWheelLeft Button = -3 ButtonWheelRight Button = -4 ) // Direction is the direction of the mouse event. type Direction uint8 const ( DirNone Direction = 0 DirPress Direction = 1 DirRelease Direction = 2 // DirStep is a simultaneous press and release, such as a single step of a // mouse wheel. // // Its value equals DirPress | DirRelease. DirStep Direction = 3 ) func (d Direction) String() string { switch d { case DirNone: return "None" case DirPress: return "Press" case DirRelease: return "Release" case DirStep: return "Step" default: return fmt.Sprintf("mouse.Direction(%d)", d) } }
key
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/key/code_string.go
// Code generated by "stringer -type=Code"; DO NOT EDIT package key import "fmt" const ( _Code_name_0 = "CodeUnknown" _Code_name_1 = "CodeACodeBCodeCCodeDCodeECodeFCodeGCodeHCodeICodeJCodeKCodeLCodeMCodeNCodeOCodePCodeQCodeRCodeSCodeTCodeUCodeVCodeWCodeXCodeYCodeZCode1Code2Code3Code4Code5Code6Code7Code8Code9Code0CodeReturnEnterCodeEscapeCodeDeleteBackspaceCodeTabCodeSpacebarCodeHyphenMinusCodeEqualSignCodeLeftSquareBracketCodeRightSquareBracketCodeBackslash" _Code_name_2 = "CodeSemicolonCodeApostropheCodeGraveAccentCodeCommaCodeFullStopCodeSlashCodeCapsLockCodeF1CodeF2CodeF3CodeF4CodeF5CodeF6CodeF7CodeF8CodeF9CodeF10CodeF11CodeF12" _Code_name_3 = "CodePauseCodeInsertCodeHomeCodePageUpCodeDeleteForwardCodeEndCodePageDownCodeRightArrowCodeLeftArrowCodeDownArrowCodeUpArrowCodeKeypadNumLockCodeKeypadSlashCodeKeypadAsteriskCodeKeypadHyphenMinusCodeKeypadPlusSignCodeKeypadEnterCodeKeypad1CodeKeypad2CodeKeypad3CodeKeypad4CodeKeypad5CodeKeypad6CodeKeypad7CodeKeypad8CodeKeypad9CodeKeypad0CodeKeypadFullStop" _Code_name_4 = "CodeKeypadEqualSignCodeF13CodeF14CodeF15CodeF16CodeF17CodeF18CodeF19CodeF20CodeF21CodeF22CodeF23CodeF24" _Code_name_5 = "CodeHelp" _Code_name_6 = "CodeMuteCodeVolumeUpCodeVolumeDown" _Code_name_7 = "CodeLeftControlCodeLeftShiftCodeLeftAltCodeLeftGUICodeRightControlCodeRightShiftCodeRightAltCodeRightGUI" _Code_name_8 = "CodeCompose" ) var ( _Code_index_0 = [...]uint8{0, 11} _Code_index_1 = [...]uint16{0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 195, 205, 224, 231, 243, 258, 271, 292, 314, 327} _Code_index_2 = [...]uint8{0, 13, 27, 42, 51, 63, 72, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 145, 152, 159} _Code_index_3 = [...]uint16{0, 9, 19, 27, 37, 54, 61, 73, 87, 100, 113, 124, 141, 156, 174, 195, 213, 228, 239, 250, 261, 272, 283, 294, 305, 316, 327, 338, 356} _Code_index_4 = [...]uint8{0, 19, 26, 33, 40, 47, 54, 61, 68, 75, 82, 89, 96, 103} _Code_index_5 = [...]uint8{0, 8} _Code_index_6 = [...]uint8{0, 8, 20, 34} _Code_index_7 = [...]uint8{0, 15, 28, 39, 50, 66, 80, 92, 104} _Code_index_8 = [...]uint8{0, 11} ) func (i Code) String() string { switch { case i == 0: return _Code_name_0 case 4 <= i && i <= 49: i -= 4 return _Code_name_1[_Code_index_1[i]:_Code_index_1[i+1]] case 51 <= i && i <= 69: i -= 51 return _Code_name_2[_Code_index_2[i]:_Code_index_2[i+1]] case 72 <= i && i <= 99: i -= 72 return _Code_name_3[_Code_index_3[i]:_Code_index_3[i+1]] case 103 <= i && i <= 115: i -= 103 return _Code_name_4[_Code_index_4[i]:_Code_index_4[i+1]] case i == 117: return _Code_name_5 case 127 <= i && i <= 129: i -= 127 return _Code_name_6[_Code_index_6[i]:_Code_index_6[i+1]] case 224 <= i && i <= 231: i -= 224 return _Code_name_7[_Code_index_7[i]:_Code_index_7[i+1]] case i == 65536: return _Code_name_8 default: return fmt.Sprintf("Code(%d)", i) } }
key
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/key/key.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:generate stringer -type=Code // Package key defines an event for physical keyboard keys. // // On-screen software keyboards do not send key events. // // See the golang.org/x/mobile/app package for details on the event model. package key import ( "fmt" "strings" ) // Event is a key event. type Event struct { // Rune is the meaning of the key event as determined by the // operating system. The mapping is determined by system-dependent // current layout, modifiers, lock-states, etc. // // If non-negative, it is a Unicode codepoint: pressing the 'a' key // generates different Runes 'a' or 'A' (but the same Code) depending on // the state of the shift key. // // If -1, the key does not generate a Unicode codepoint. To distinguish // them, look at Code. Rune rune // Code is the identity of the physical key relative to a notional // "standard" keyboard, independent of current layout, modifiers, // lock-states, etc // // For standard key codes, its value matches USB HID key codes. // Compare its value to uint32-typed constants in this package, such // as CodeLeftShift and CodeEscape. // // Pressing the regular '2' key and number-pad '2' key (with Num-Lock) // generate different Codes (but the same Rune). Code Code // Modifiers is a bitmask representing a set of modifier keys: ModShift, // ModAlt, etc. Modifiers Modifiers // Direction is the direction of the key event: DirPress, DirRelease, // or DirNone (for key repeats). Direction Direction // TODO: add a Device ID, for multiple input devices? // TODO: add a time.Time? } func (e Event) String() string { if e.Rune >= 0 { return fmt.Sprintf("key.Event{%q (%v), %v, %v}", e.Rune, e.Code, e.Modifiers, e.Direction) } return fmt.Sprintf("key.Event{(%v), %v, %v}", e.Code, e.Modifiers, e.Direction) } // Direction is the direction of the key event. type Direction uint8 const ( DirNone Direction = 0 DirPress Direction = 1 DirRelease Direction = 2 ) // Modifiers is a bitmask representing a set of modifier keys. type Modifiers uint32 const ( ModShift Modifiers = 1 << 0 ModControl Modifiers = 1 << 1 ModAlt Modifiers = 1 << 2 ModMeta Modifiers = 1 << 3 // called "Command" on OS X ) // Code is the identity of a key relative to a notional "standard" keyboard. type Code uint32 // Physical key codes. // // For standard key codes, its value matches USB HID key codes. // TODO: add missing codes. const ( CodeUnknown Code = 0 CodeA Code = 4 CodeB Code = 5 CodeC Code = 6 CodeD Code = 7 CodeE Code = 8 CodeF Code = 9 CodeG Code = 10 CodeH Code = 11 CodeI Code = 12 CodeJ Code = 13 CodeK Code = 14 CodeL Code = 15 CodeM Code = 16 CodeN Code = 17 CodeO Code = 18 CodeP Code = 19 CodeQ Code = 20 CodeR Code = 21 CodeS Code = 22 CodeT Code = 23 CodeU Code = 24 CodeV Code = 25 CodeW Code = 26 CodeX Code = 27 CodeY Code = 28 CodeZ Code = 29 Code1 Code = 30 Code2 Code = 31 Code3 Code = 32 Code4 Code = 33 Code5 Code = 34 Code6 Code = 35 Code7 Code = 36 Code8 Code = 37 Code9 Code = 38 Code0 Code = 39 CodeReturnEnter Code = 40 CodeEscape Code = 41 CodeDeleteBackspace Code = 42 CodeTab Code = 43 CodeSpacebar Code = 44 CodeHyphenMinus Code = 45 // - CodeEqualSign Code = 46 // = CodeLeftSquareBracket Code = 47 // [ CodeRightSquareBracket Code = 48 // ] CodeBackslash Code = 49 // \ CodeSemicolon Code = 51 // ; CodeApostrophe Code = 52 // ' CodeGraveAccent Code = 53 // ` CodeComma Code = 54 // , CodeFullStop Code = 55 // . CodeSlash Code = 56 // / CodeCapsLock Code = 57 CodeF1 Code = 58 CodeF2 Code = 59 CodeF3 Code = 60 CodeF4 Code = 61 CodeF5 Code = 62 CodeF6 Code = 63 CodeF7 Code = 64 CodeF8 Code = 65 CodeF9 Code = 66 CodeF10 Code = 67 CodeF11 Code = 68 CodeF12 Code = 69 CodePause Code = 72 CodeInsert Code = 73 CodeHome Code = 74 CodePageUp Code = 75 CodeDeleteForward Code = 76 CodeEnd Code = 77 CodePageDown Code = 78 CodeRightArrow Code = 79 CodeLeftArrow Code = 80 CodeDownArrow Code = 81 CodeUpArrow Code = 82 CodeKeypadNumLock Code = 83 CodeKeypadSlash Code = 84 // / CodeKeypadAsterisk Code = 85 // * CodeKeypadHyphenMinus Code = 86 // - CodeKeypadPlusSign Code = 87 // + CodeKeypadEnter Code = 88 CodeKeypad1 Code = 89 CodeKeypad2 Code = 90 CodeKeypad3 Code = 91 CodeKeypad4 Code = 92 CodeKeypad5 Code = 93 CodeKeypad6 Code = 94 CodeKeypad7 Code = 95 CodeKeypad8 Code = 96 CodeKeypad9 Code = 97 CodeKeypad0 Code = 98 CodeKeypadFullStop Code = 99 // . CodeKeypadEqualSign Code = 103 // = CodeF13 Code = 104 CodeF14 Code = 105 CodeF15 Code = 106 CodeF16 Code = 107 CodeF17 Code = 108 CodeF18 Code = 109 CodeF19 Code = 110 CodeF20 Code = 111 CodeF21 Code = 112 CodeF22 Code = 113 CodeF23 Code = 114 CodeF24 Code = 115 CodeHelp Code = 117 CodeMute Code = 127 CodeVolumeUp Code = 128 CodeVolumeDown Code = 129 CodeLeftControl Code = 224 CodeLeftShift Code = 225 CodeLeftAlt Code = 226 CodeLeftGUI Code = 227 CodeRightControl Code = 228 CodeRightShift Code = 229 CodeRightAlt Code = 230 CodeRightGUI Code = 231 // The following codes are not part of the standard USB HID Usage IDs for // keyboards. See http://www.usb.org/developers/hidpage/Hut1_12v2.pdf // // Usage IDs are uint16s, so these non-standard values start at 0x10000. // CodeCompose is the Code for a compose key, sometimes called a multi key, // used to input non-ASCII characters such as ñ being composed of n and ~. // // See https://en.wikipedia.org/wiki/Compose_key CodeCompose Code = 0x10000 ) // TODO: Given we use runes outside the unicode space, should we provide a // printing function? Related: it's a little unfortunate that printing a // key.Event with %v gives not very readable output like: // {100 7 key.Modifiers() Press} var mods = [...]struct { m Modifiers s string }{ {ModShift, "Shift"}, {ModControl, "Control"}, {ModAlt, "Alt"}, {ModMeta, "Meta"}, } func (m Modifiers) String() string { var match []string for _, mod := range mods { if mod.m&m != 0 { match = append(match, mod.s) } } return "key.Modifiers(" + strings.Join(match, "|") + ")" } func (d Direction) String() string { switch d { case DirNone: return "None" case DirPress: return "Press" case DirRelease: return "Release" default: return fmt.Sprintf("key.Direction(%d)", d) } }
lifecycle
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/mobile/event/lifecycle/lifecycle.go
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package lifecycle defines an event for an app's lifecycle. // // The app lifecycle consists of moving back and forth between an ordered // sequence of stages. For example, being at a stage greater than or equal to // StageVisible means that the app is visible on the screen. // // A lifecycle event is a change from one stage to another, which crosses every // intermediate stage. For example, changing from StageAlive to StageFocused // implicitly crosses StageVisible. // // Crosses can be in a positive or negative direction. A positive crossing of // StageFocused means that the app has gained the focus. A negative crossing // means it has lost the focus. // // See the golang.org/x/mobile/app package for details on the event model. package lifecycle // import "golang.org/x/mobile/event/lifecycle" import ( "fmt" ) // Cross is whether a lifecycle stage was crossed. type Cross uint32 func (c Cross) String() string { switch c { case CrossOn: return "on" case CrossOff: return "off" } return "none" } const ( CrossNone Cross = 0 CrossOn Cross = 1 CrossOff Cross = 2 ) // Event is a lifecycle change from an old stage to a new stage. type Event struct { From, To Stage // DrawContext is the state used for painting, if any is valid. // // For OpenGL apps, a non-nil DrawContext is a gl.Context. // // TODO: make this an App method if we move away from an event channel? DrawContext interface{} } func (e Event) String() string { return fmt.Sprintf("lifecycle.Event{From:%v, To:%v, DrawContext:%v}", e.From, e.To, e.DrawContext) } // Crosses reports whether the transition from From to To crosses the stage s: // - It returns CrossOn if it does, and the lifecycle change is positive. // - It returns CrossOff if it does, and the lifecycle change is negative. // - Otherwise, it returns CrossNone. // // See the documentation for Stage for more discussion of positive and negative // crosses. func (e Event) Crosses(s Stage) Cross { switch { case e.From < s && e.To >= s: return CrossOn case e.From >= s && e.To < s: return CrossOff } return CrossNone } // Stage is a stage in the app's lifecycle. The values are ordered, so that a // lifecycle change from stage From to stage To implicitly crosses every stage // in the range (min, max], exclusive on the low end and inclusive on the high // end, where min is the minimum of From and To, and max is the maximum. // // The documentation for individual stages talk about positive and negative // crosses. A positive lifecycle change is one where its From stage is less // than its To stage. Similarly, a negative lifecycle change is one where From // is greater than To. Thus, a positive lifecycle change crosses every stage in // the range (From, To] in increasing order, and a negative lifecycle change // crosses every stage in the range (To, From] in decreasing order. type Stage uint32 // TODO: how does iOS map to these stages? What do cross-platform mobile // abstractions do? const ( // StageDead is the zero stage. No lifecycle change crosses this stage, // but: // - A positive change from this stage is the very first lifecycle change. // - A negative change to this stage is the very last lifecycle change. StageDead Stage = iota // StageAlive means that the app is alive. // - A positive cross means that the app has been created. // - A negative cross means that the app is being destroyed. // Each cross, either from or to StageDead, will occur only once. // On Android, these correspond to onCreate and onDestroy. StageAlive // StageVisible means that the app window is visible. // - A positive cross means that the app window has become visible. // - A negative cross means that the app window has become invisible. // On Android, these correspond to onStart and onStop. // On Desktop, an app window can become invisible if e.g. it is minimized, // unmapped, or not on a visible workspace. StageVisible // StageFocused means that the app window has the focus. // - A positive cross means that the app window has gained the focus. // - A negative cross means that the app window has lost the focus. // On Android, these correspond to onResume and onFreeze. StageFocused ) func (s Stage) String() string { switch s { case StageDead: return "StageDead" case StageAlive: return "StageAlive" case StageVisible: return "StageVisible" case StageFocused: return "StageFocused" default: return fmt.Sprintf("lifecycle.Stage(%d)", s) } }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/start_windows.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows package telemetry import ( "os/exec" "syscall" "golang.org/x/sys/windows" ) func init() { daemonize = daemonizeWindows } func daemonizeWindows(cmd *exec.Cmd) { // Set DETACHED_PROCESS creation flag so that closing // the console window the parent process was run in // does not kill the child. // See documentation of creation flags in the Microsoft documentation: // https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags cmd.SysProcAttr = &syscall.SysProcAttr{ CreationFlags: windows.DETACHED_PROCESS, } }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/types_alias.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package telemetry import "golang.org/x/telemetry/internal/telemetry" // Common types and directories used by multiple packages. // An UploadConfig controls what data is uploaded. type UploadConfig = telemetry.UploadConfig type ProgramConfig = telemetry.ProgramConfig type CounterConfig = telemetry.CounterConfig // A Report is what's uploaded (or saved locally) type Report = telemetry.Report type ProgramReport = telemetry.ProgramReport
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/CONTRIBUTING.md
# Contributing to Go Go is an open source project. It is the work of hundreds of contributors. We appreciate your help! ## Filing issues When [filing an issue](https://golang.org/issue/new), make sure to answer these five questions: 1. What version of Go are you using (`go version`)? 2. What operating system and processor architecture are you using? 3. What did you do? 4. What did you expect to see? 5. What did you see instead? General questions should go to the [golang-nuts mailing list](https://groups.google.com/group/golang-nuts) instead of the issue tracker. The gophers there will answer or ask you to file an issue if you've tripped over a bug. ## Contributing code Please read the [Contribution Guidelines](https://golang.org/doc/contribute.html) before sending patches. Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/npx
#!/bin/bash # Copyright 2022 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. docker run \ --rm \ --volume $(pwd):/workspace \ --workdir /workspace \ --env NODE_OPTIONS="--dns-result-order=ipv4first" \ --entrypoint npx \ node:18.16.0-slim \ $@
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/package.json
{ "scripts": { "eslint": "eslint . --fix", "stylelint": "stylelint '**/*.css' --fix", "prettier": "prettier --write **/*.{css,ts,md,yaml} !**/*.min.css", "all": "run-s --continue-on-error eslint stylelint prettier" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "5.59.6", "@typescript-eslint/parser": "5.59.6", "eslint": "8.40.0", "eslint-config-prettier": "8.8.0", "npm-run-all": "4.1.5", "prettier": "2.8.8", "stylelint": "15.6.2", "stylelint-config-standard": "33.0.0", "typescript": "5.0.4" }, "dependencies": { "@observablehq/plot": "0.6.9", "d3": "7.8.5" } }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/PATENTS
Additional IP Rights Grant (Patents) "This implementation" means the copyrightable works distributed by Google as part of the Go project. Google hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, transfer and otherwise run, modify and propagate the contents of this implementation of Go, where such license applies only to those patent claims, both currently owned or controlled by Google and acquired in the future, licensable by Google that are necessarily infringed by this implementation of Go. This grant does not include claims that would be infringed only as a consequence of further modification of this implementation. If you or your agent or exclusive licensee institute or order or agree to the institution of patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that this implementation of Go or any code incorporated within this implementation of Go constitutes direct or contributory patent infringement, or inducement of patent infringement, then any patent rights granted to you under this License for this implementation of Go shall terminate as of the date such litigation is filed.
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/dir.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package telemetry import "golang.org/x/telemetry/internal/telemetry" // Dir returns the telemetry directory. func Dir() string { return telemetry.Default.Dir() }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/doc.go
package telemetry
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/go.mod
module golang.org/x/telemetry go 1.20 require golang.org/x/mod v0.19.0 require ( golang.org/x/sync v0.7.0 golang.org/x/sys v0.22.0 )
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/README.md
# Go Telemetry This repository holds the Go Telemetry server code and libraries, used for hosting [telemetry.go.dev](https://telemetry.go.dev) and instrumenting Go toolchain programs with opt-in telemetry. **Warning**: this repository is intended for use only in tools maintained by the Go team, including tools in the Go distribution and auxiliary tools like [gopls](https://pkg.go.dev/golang.org/x/tools/gopls) or [govulncheck](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck). There are no compatibility guarantees for any of the packages here: public APIs will change in breaking ways as the telemetry integration is refined. ## Notable Packages - The [x/telemetry/counter](https://pkg.go.dev/golang.org/x/telemetry/counter) package provides a library for instrumenting programs with counters and stack reports. - The [x/telemetry/upload](https://pkg.go.dev/golang.org/x/telemetry/upload) package provides a hook for Go toolchain programs to upload telemetry data, if the user has opted in to telemetry uploading. - The [x/telemetry/cmd/gotelemetry](https://pkg.go.dev/pkg/golang.org/x/telemetry/cmd/gotelemetry) command is used for managing telemetry data and configuration. - The [x/telemetry/config](https://pkg.go.dev/pkg/golang.org/x/telemetry/config) package defines the subset of telemetry data that has been approved for uploading by the telemetry proposal process. - The [x/telemetry/godev](https://pkg.go.dev/pkg/golang.org/x/telemetry/godev) directory defines the services running at [telemetry.go.dev](https://telemetry.go.dev). ## Contributing This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html. The main issue tracker for the time repository is located at https://github.com/golang/go/issues. Prefix your issue with "x/telemetry:" in the subject line, so it is easy to find. ### Linting & Formatting This repository uses [eslint](https://eslint.org/) to format TS files, [stylelint](https://stylelint.io/) to format CSS files, and [prettier](https://prettier.io/) to format TS, CSS, Markdown, and YAML files. See the style guides: - [TypeScript](https://google.github.io/styleguide/tsguide.html) - [CSS](https://go.dev/wiki/CSSStyleGuide) It is encouraged that all TS and CSS code be run through formatters before submitting a change. However, it is not a strict requirement enforced by CI. ### Installing npm Dependencies: 1. Install [docker](https://docs.docker.com/get-docker/) 2. Run `./npm install` ### Run ESLint, Stylelint, & Prettier ./npm run all
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/start_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package telemetry_test import ( "io" "log" "net/http" "net/http/httptest" "os" "os/exec" "strings" "sync" "testing" "time" "golang.org/x/telemetry" "golang.org/x/telemetry/counter" "golang.org/x/telemetry/counter/countertest" "golang.org/x/telemetry/internal/configtest" ic "golang.org/x/telemetry/internal/counter" "golang.org/x/telemetry/internal/regtest" it "golang.org/x/telemetry/internal/telemetry" "golang.org/x/telemetry/internal/testenv" ) // These environment variables are used to coordinate the fork+exec subprocess // started by TestStart. const ( runStartEnv = "X_TELEMETRY_TEST_START" telemetryDirEnv = "X_TELEMETRY_TEST_START_TELEMETRY_DIR" uploadURLEnv = "X_TELEMETRY_TEST_START_UPLOAD_URL" asofEnv = "X_TELEMETRY_TEST_START_ASOF" ) func TestMain(m *testing.M) { // TestStart can't use internal/regtest, because Start itself also uses // fork+exec to start a subprocess, which does not interact well with the // fork+exec trick used by regtest.RunProg. if prog := os.Getenv(runStartEnv); prog != "" { os.Exit(runProg(prog)) } os.Exit(m.Run()) } // runProg runs the given program. // See the switch statement below. func runProg(prog string) int { mustGetEnv := func(envvar string) string { v := os.Getenv(envvar) if v == "" { log.Fatalf("missing required environment var %q", envvar) } return v } // Get the fake time used by all programs. asof, err := time.Parse(time.DateOnly, mustGetEnv(asofEnv)) if err != nil { log.Fatalf("parsing %s: %v", asofEnv, err) } // Set global state. ic.CounterTime = func() time.Time { return asof } // must be done before Open countertest.Open(mustGetEnv(telemetryDirEnv)) switch prog { case "setmode": // Use the modified time above for the asof time. if err := it.Default.SetModeAsOf("on", asof); err != nil { log.Fatalf("setting mode: %v", err) } case "inc": // (CounterTime is already set above) counter.Inc("teststart/counter") case "start": res := telemetry.Start(telemetry.Config{ // No need to set TelemetryDir since the Default dir is already set by countertest.Open. Upload: true, UploadURL: mustGetEnv(uploadURLEnv), UploadStartTime: asof, }) res.Wait() default: log.Fatalf("unknown program %q", prog) } return 0 } func execProg(t *testing.T, telemetryDir, prog string, asof time.Time, env ...string) { // Run the runStart function below, via a fork+exec trick. exe, err := os.Executable() if err != nil { t.Error(err) return } cmd := exec.Command(exe, "** TestStart **") // this unused arg is just for ps(1) cmd.Stderr = os.Stderr cmd.Env = os.Environ() cmd.Env = append(cmd.Env, asofEnv+"="+asof.Format(time.DateOnly)) cmd.Env = append(cmd.Env, telemetryDirEnv+"="+telemetryDir) cmd.Env = append(cmd.Env, runStartEnv+"="+prog) // see TestMain cmd.Env = append(cmd.Env, env...) out, err := cmd.Output() if err != nil { t.Errorf("program failed unexpectedly (%v)\n%s", err, out) } } func TestStart(t *testing.T) { testenv.SkipIfUnsupportedPlatform(t) testenv.MustHaveExec(t) // This test sets up a telemetry environment, and then runs a test program // that increments a counter, and uploads via telemetry.Start. telemetryDir := t.TempDir() uploaded := false server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { uploaded = true body, err := io.ReadAll(r.Body) if err != nil { t.Errorf("error reading body: %v", err) } else { if body := string(body); !strings.Contains(body, "teststart/counter") { t.Errorf("upload does not contain \"teststart/counter\":\n%s", body) } } })) uploadEnv := []string{uploadURLEnv + "=" + server.URL} uc := regtest.CreateTestUploadConfig(t, []string{"teststart/counter"}, nil) uploadEnv = append(uploadEnv, configtest.LocalProxyEnv(t, uc, "v1.2.3")...) // Script programs. now := time.Now() execProg(t, telemetryDir, "setmode", now.Add(-30*24*time.Hour)) // back-date telemetry acceptance execProg(t, telemetryDir, "inc", now.Add(-8*24*time.Hour)) // increment the counter execProg(t, telemetryDir, "start", now, uploadEnv...) // run start if !uploaded { t.Fatalf("no upload occurred on %v", os.Getpid()) } } func TestConcurrentStart(t *testing.T) { testenv.SkipIfUnsupportedPlatform(t) testenv.MustHaveExec(t) telemetryDir := t.TempDir() var uploadMu sync.Mutex uploads := map[string]int{} // date -> uploads server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { key := r.URL.Path if idx := strings.LastIndex(r.URL.Path, "/"); idx >= 0 { key = r.URL.Path[idx+len("/"):] } uploadMu.Lock() uploads[key]++ uploadMu.Unlock() })) uploadEnv := []string{uploadURLEnv + "=" + server.URL} uc := regtest.CreateTestUploadConfig(t, []string{"teststart/counter"}, nil) uploadEnv = append(uploadEnv, configtest.LocalProxyEnv(t, uc, "v1.2.3")...) now := time.Now() execProg(t, telemetryDir, "setmode", now.Add(-365*24*time.Hour)) // back-date telemetry acceptance execProg(t, telemetryDir, "inc", now.Add(-8*24*time.Hour)) // increment the counter // Populate three weeks of counters to upload. for i := -28; i < -7; i++ { // Populate three weeks of counters to upload. execProg(t, telemetryDir, "inc", now.Add(time.Duration(i)*24*time.Hour)) } // Run start concurrently. var wg sync.WaitGroup for i := 0; i < 10; i++ { wg.Add(1) go func() { defer wg.Done() execProg(t, telemetryDir, "start", now, uploadEnv...) }() } wg.Wait() // Expect exactly three weeks to be uploaded. if got, want := len(uploads), 3; got != want { t.Errorf("got %d report dates, want %d", got, want) } for asof, n := range uploads { if n != 1 { t.Errorf("got %d reports for %s, want 1", n, asof) } } }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/start_posix.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris package telemetry import ( "os/exec" "syscall" ) func init() { daemonize = daemonizePosix } func daemonizePosix(cmd *exec.Cmd) { cmd.SysProcAttr = &syscall.SysProcAttr{ Setsid: true, } }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/go.sum
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/.prettierrc.json
{"proseWrap": "always"}
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/tsconfig.json
{ /* Visit https://aka.ms/tsconfig.json to read more about this file */ "compilerOptions": { "target": "ES2022", "module": "ES2022", "moduleResolution": "node", "strict": true, "allowUnusedLabels": false, "allowUnreachableCode": false, "exactOptionalPropertyTypes": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "noImplicitReturns": true, "noPropertyAccessFromIndexSignature": true, "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, "checkJs": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true }, }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/start.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package telemetry import ( "fmt" "log" "os" "os/exec" "path/filepath" "sync" "time" "golang.org/x/sync/errgroup" "golang.org/x/telemetry/counter" "golang.org/x/telemetry/internal/crashmonitor" "golang.org/x/telemetry/internal/telemetry" "golang.org/x/telemetry/internal/upload" ) // Config controls the behavior of [Start]. type Config struct { // ReportCrashes, if set, will enable crash reporting. // ReportCrashes uses the [debug.SetCrashOutput] mechanism, which is a // process-wide resource. // Do not make other calls to that function within your application. // ReportCrashes is a non-functional unless the program is built with go1.23+. ReportCrashes bool // Upload causes this program to periodically upload approved counters // from the local telemetry database to telemetry.go.dev. // // This option has no effect unless the user has given consent // to enable data collection, for example by running // cmd/gotelemetry or affirming the gopls dialog. // // (This feature is expected to be used only by gopls. // Longer term, the go command may become the sole program // responsible for uploading.) Upload bool // TelemetryDir, if set, will specify an alternate telemetry // directory to write data to. If not set, it uses the default // directory. // This field is intended to be used for isolating testing environments. TelemetryDir string // UploadStartTime, if set, overrides the time used as the upload start time, // which is the time used by the upload logic to determine whether counter // file data should be uploaded. Only counter files that have expired before // the start time are considered for upload. // // This field can be used to simulate a future upload that collects recently // modified counters. UploadStartTime time.Time // UploadURL, if set, overrides the URL used to receive uploaded reports. If // unset, this URL defaults to https://telemetry.go.dev/upload. UploadURL string } // Start initializes telemetry using the specified configuration. // // Start opens the local telemetry database so that counter increment // operations are durably recorded in the local file system. // // If [Config.Upload] is set, and the user has opted in to telemetry // uploading, this process may attempt to upload approved counters // to telemetry.go.dev. // // If [Config.ReportCrashes] is set, any fatal crash will be // recorded by incrementing a counter named for the stack of the // first running goroutine in the traceback. // // If either of these flags is set, Start re-executes the current // executable as a child process, in a special mode in which it // acts as a telemetry sidecar for the parent process (the application). // In that mode, the call to Start will never return, so Start must // be called immediately within main, even before such things as // inspecting the command line. The application should avoid expensive // steps or external side effects in init functions, as they will // be executed twice (parent and child). // // Start returns a StartResult, which may be awaited via [StartResult.Wait] to // wait for all work done by Start to complete. func Start(config Config) *StartResult { switch v := os.Getenv(telemetryChildVar); v { case "": // The subprocess started by parent has GO_TELEMETRY_CHILD=1. return parent(config) case "1": child(config) // child will exit the process when it's done. case "2": // Do nothing: this was executed directly or indirectly by a child. default: log.Fatalf("unexpected value for %q: %q", telemetryChildVar, v) } return &StartResult{} } // MaybeChild executes the telemetry child logic if the calling program is // the telemetry child process, and does nothing otherwise. It is meant to be // called as the first thing in a program that uses telemetry.Start but cannot // call telemetry.Start immediately when it starts. func MaybeChild(config Config) { if v := os.Getenv(telemetryChildVar); v == "1" { child(config) // child will exit the process when it's done. } // other values of the telemetryChildVar environment variable // will be handled by telemetry.Start. } // A StartResult is a handle to the result of a call to [Start]. Call // [StartResult.Wait] to wait for the completion of all work done on behalf of // Start. type StartResult struct { wg sync.WaitGroup } // Wait waits for the completion of all work initiated by [Start]. func (res *StartResult) Wait() { if res == nil { return } res.wg.Wait() } var daemonize = func(cmd *exec.Cmd) {} // If telemetryChildVar is set to "1" in the environment, this is the telemetry // child. // // If telemetryChildVar is set to "2", this is a child of the child, and no // further forking should occur. const telemetryChildVar = "GO_TELEMETRY_CHILD" // If telemetryUploadVar is set to "1" in the environment, the upload token has been // acquired by the parent, and the child should attempt an upload. const telemetryUploadVar = "GO_TELEMETRY_CHILD_UPLOAD" func parent(config Config) *StartResult { if config.TelemetryDir != "" { telemetry.Default = telemetry.NewDir(config.TelemetryDir) } result := new(StartResult) mode, _ := telemetry.Default.Mode() if mode == "off" { // Telemetry is turned off. Crash reporting doesn't work without telemetry // at least set to "local". The upload process runs in both "on" and "local" modes. // In local mode the upload process builds local reports but does not do the upload. return result } counter.Open() if _, err := os.Stat(telemetry.Default.LocalDir()); err != nil { // There was a problem statting LocalDir, which is needed for both // crash monitoring and counter uploading. Most likely, there was an // error creating telemetry.LocalDir in the counter.Open call above. // Don't start the child. return result } childShouldUpload := config.Upload && acquireUploadToken() reportCrashes := config.ReportCrashes && crashmonitor.Supported() if reportCrashes || childShouldUpload { startChild(reportCrashes, childShouldUpload, result) } return result } func startChild(reportCrashes, upload bool, result *StartResult) { // This process is the application (parent). // Fork+exec the telemetry child. exe, err := os.Executable() if err != nil { // There was an error getting os.Executable. It's possible // for this to happen on AIX if os.Args[0] is not an absolute // path and we can't find os.Args[0] in PATH. log.Printf("failed to start telemetry sidecar: os.Executable: %v", err) return } cmd := exec.Command(exe, "** telemetry **") // this unused arg is just for ps(1) daemonize(cmd) cmd.Env = append(os.Environ(), telemetryChildVar+"=1") if upload { cmd.Env = append(cmd.Env, telemetryUploadVar+"=1") } cmd.Dir = telemetry.Default.LocalDir() // The child process must write to a log file, not // the stderr file it inherited from the parent, as // the child may outlive the parent but should not prolong // the life of any pipes created (by the grandparent) // to gather the output of the parent. // // By default, we discard the child process's stderr, // but in line with the uploader, log to a file in debug // only if that directory was created by the user. fd, err := os.Stat(telemetry.Default.DebugDir()) if err != nil { if !os.IsNotExist(err) { log.Fatalf("failed to stat debug directory: %v", err) } } else if fd.IsDir() { // local/debug exists and is a directory. Set stderr to a log file path // in local/debug. childLogPath := filepath.Join(telemetry.Default.DebugDir(), "sidecar.log") childLog, err := os.OpenFile(childLogPath, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0600) if err != nil { log.Fatalf("opening sidecar log file for child: %v", err) } defer childLog.Close() cmd.Stderr = childLog } if reportCrashes { pipe, err := cmd.StdinPipe() if err != nil { log.Fatalf("StdinPipe: %v", err) } crashmonitor.Parent(pipe.(*os.File)) // (this conversion is safe) } if err := cmd.Start(); err != nil { log.Fatalf("can't start telemetry child process: %v", err) } result.wg.Add(1) go func() { cmd.Wait() // Release resources if cmd happens not to outlive this process. result.wg.Done() }() } func child(config Config) { log.SetPrefix(fmt.Sprintf("telemetry-sidecar (pid %v): ", os.Getpid())) if config.TelemetryDir != "" { telemetry.Default = telemetry.NewDir(config.TelemetryDir) } // golang/go#67211: be sure to set telemetryChildVar before running the // child, because the child itself invokes the go command to download the // upload config. If the telemetryChildVar variable is still set to "1", // that delegated go command may think that it is itself a telemetry // child. // // On the other hand, if telemetryChildVar were simply unset, then the // delegated go commands would fork themselves recursively. Short-circuit // this recursion. os.Setenv(telemetryChildVar, "2") upload := os.Getenv(telemetryUploadVar) == "1" reportCrashes := config.ReportCrashes && crashmonitor.Supported() uploadStartTime := config.UploadStartTime uploadURL := config.UploadURL // Start crashmonitoring and uploading depending on what's requested // and wait for the longer running child to complete before exiting: // if we collected a crash before the upload finished, wait for the // upload to finish before exiting var g errgroup.Group if reportCrashes { g.Go(func() error { crashmonitor.Child() return nil }) } if upload { g.Go(func() error { uploaderChild(uploadStartTime, uploadURL) return nil }) } g.Wait() os.Exit(0) } func uploaderChild(asof time.Time, uploadURL string) { if err := upload.Run(upload.RunConfig{ UploadURL: uploadURL, LogWriter: os.Stderr, StartTime: asof, }); err != nil { log.Printf("upload failed: %v", err) } } // acquireUploadToken acquires a token permitting the caller to upload. // To limit the frequency of uploads, only one token is issue per // machine per time period. // The boolean indicates whether the token was acquired. func acquireUploadToken() bool { if telemetry.Default.LocalDir() == "" { // The telemetry dir wasn't initialized properly, probably because // os.UserConfigDir did not complete successfully. In that case // there are no counters to upload, so we should just do nothing. return false } tokenfile := filepath.Join(telemetry.Default.LocalDir(), "upload.token") const period = 24 * time.Hour // A process acquires a token by successfully creating a // well-known file. If the file already exists and has an // mtime age less then than the period, the process does // not acquire the token. If the file is older than the // period, the process is allowed to remove the file and // try to re-create it. fi, err := os.Stat(tokenfile) if err == nil { if time.Since(fi.ModTime()) < period { return false } // There's a possible race here where two processes check the // token file and see that it's older than the period, then the // first one removes it and creates another, and then a second one // removes the newly created file and creates yet another // file. Then both processes would act as though they had the token. // This is very rare, but it's also okay because we're only grabbing // the token to do rate limiting, not for correctness. _ = os.Remove(tokenfile) } else if !os.IsNotExist(err) { log.Printf("error acquiring upload taken: statting token file: %v", err) return false } f, err := os.OpenFile(tokenfile, os.O_CREATE|os.O_EXCL, 0666) if err != nil { if os.IsExist(err) { return false } log.Printf("error acquiring upload token: creating token file: %v", err) return false } _ = f.Close() return true }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/package-lock.json
{ "name": "workspace", "lockfileVersion": 3, "requires": true, "packages": { "": { "dependencies": { "@observablehq/plot": "0.6.9", "d3": "7.8.5" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "5.59.6", "@typescript-eslint/parser": "5.59.6", "eslint": "8.40.0", "eslint-config-prettier": "8.8.0", "npm-run-all": "4.1.5", "prettier": "2.8.8", "stylelint": "15.6.2", "stylelint-config-standard": "33.0.0", "typescript": "5.0.4" } }, "node_modules/@aashutoshrathi/word-wrap": { "version": "1.2.6", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/@babel/code-frame": { "version": "7.21.4", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", "dev": true, "dependencies": { "@babel/highlight": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { "version": "7.19.1", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@csstools/css-parser-algorithms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-2.1.1.tgz", "integrity": "sha512-viRnRh02AgO4mwIQb2xQNJju0i+Fh9roNgmbR5xEuG7J3TGgxjnE95HnBLgsFJOJOksvcfxOUCgODcft6Y07cA==", "dev": true, "engines": { "node": "^14 || ^16 || >=18" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/csstools" }, "peerDependencies": { "@csstools/css-tokenizer": "^2.1.1" } }, "node_modules/@csstools/css-tokenizer": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-2.1.1.tgz", "integrity": "sha512-GbrTj2Z8MCTUv+52GE0RbFGM527xuXZ0Xa5g0Z+YN573uveS4G0qi6WNOMyz3yrFM/jaILTTwJ0+umx81EzqfA==", "dev": true, "engines": { "node": "^14 || ^16 || >=18" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/csstools" } }, "node_modules/@csstools/media-query-list-parser": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@csstools/media-query-list-parser/-/media-query-list-parser-2.0.4.tgz", "integrity": "sha512-GyYot6jHgcSDZZ+tLSnrzkR7aJhF2ZW6d+CXH66mjy5WpAQhZD4HDke2OQ36SivGRWlZJpAz7TzbW6OKlEpxAA==", "dev": true, "engines": { "node": "^14 || ^16 || >=18" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/csstools" }, "peerDependencies": { "@csstools/css-parser-algorithms": "^2.1.1", "@csstools/css-tokenizer": "^2.1.1" } }, "node_modules/@csstools/selector-specificity": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz", "integrity": "sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw==", "dev": true, "engines": { "node": "^14 || ^16 || >=18" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/csstools" }, "peerDependencies": { "postcss-selector-parser": "^6.0.10" } }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", "dev": true, "dependencies": { "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { "version": "4.5.1", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^9.5.2", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "node_modules/@eslint/js": { "version": "8.40.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz", "integrity": "sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.8", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "engines": { "node": ">=12.22" }, "funding": { "type": "github", "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" }, "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" }, "engines": { "node": ">= 8" } }, "node_modules/@observablehq/plot": { "version": "0.6.9", "resolved": "https://registry.npmjs.org/@observablehq/plot/-/plot-0.6.9.tgz", "integrity": "sha512-vwV6bzQsGjv2XrPEpc3Voixcz2e5EVvCSzzcs/uW9KXO5ZM8GdMVXtNTaRwYXUOk98nbiYFCFwzMaIyRjrt9IA==", "dependencies": { "d3": "^7.8.0", "interval-tree-1d": "^1.0.0", "isoformat": "^0.2.0" }, "engines": { "node": ">=12" } }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "node_modules/@types/minimist": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, "node_modules/@types/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.6.tgz", "integrity": "sha512-sXtOgJNEuRU5RLwPUb1jxtToZbgvq3M6FPpY4QENxoOggK+UpTxUBpj6tD8+Qh2g46Pi9We87E+eHnUw8YcGsw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.4.0", "@typescript-eslint/scope-manager": "5.59.6", "@typescript-eslint/type-utils": "5.59.6", "@typescript-eslint/utils": "5.59.6", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "@typescript-eslint/parser": "^5.0.0", "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, "node_modules/@typescript-eslint/parser": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.6.tgz", "integrity": "sha512-7pCa6al03Pv1yf/dUg/s1pXz/yGMUBAw5EeWqNTFiSueKvRNonze3hma3lhdsOrQcaOXhbk5gKu2Fludiho9VA==", "dev": true, "dependencies": { "@typescript-eslint/scope-manager": "5.59.6", "@typescript-eslint/types": "5.59.6", "@typescript-eslint/typescript-estree": "5.59.6", "debug": "^4.3.4" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.6.tgz", "integrity": "sha512-gLbY3Le9Dxcb8KdpF0+SJr6EQ+hFGYFl6tVY8VxLPFDfUZC7BHFw+Vq7bM5lE9DwWPfx4vMWWTLGXgpc0mAYyQ==", "dev": true, "dependencies": { "@typescript-eslint/types": "5.59.6", "@typescript-eslint/visitor-keys": "5.59.6" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/type-utils": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.6.tgz", "integrity": "sha512-A4tms2Mp5yNvLDlySF+kAThV9VTBPCvGf0Rp8nl/eoDX9Okun8byTKoj3fJ52IJitjWOk0fKPNQhXEB++eNozQ==", "dev": true, "dependencies": { "@typescript-eslint/typescript-estree": "5.59.6", "@typescript-eslint/utils": "5.59.6", "debug": "^4.3.4", "tsutils": "^3.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "*" }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, "node_modules/@typescript-eslint/types": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.6.tgz", "integrity": "sha512-tH5lBXZI7T2MOUgOWFdVNUILsI02shyQvfzG9EJkoONWugCG77NDDa1EeDGw7oJ5IvsTAAGVV8I3Tk2PNu9QfA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/@typescript-eslint/typescript-estree": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.6.tgz", "integrity": "sha512-vW6JP3lMAs/Tq4KjdI/RiHaaJSO7IUsbkz17it/Rl9Q+WkQ77EOuOnlbaU8kKfVIOJxMhnRiBG+olE7f3M16DA==", "dev": true, "dependencies": { "@typescript-eslint/types": "5.59.6", "@typescript-eslint/visitor-keys": "5.59.6", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", "semver": "^7.3.7", "tsutils": "^3.21.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, "node_modules/@typescript-eslint/utils": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.6.tgz", "integrity": "sha512-vzaaD6EXbTS29cVH0JjXBdzMt6VBlv+hE31XktDRMX1j3462wZCJa7VzO2AxXEXcIl8GQqZPcOPuW/Z1tZVogg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", "@typescript-eslint/scope-manager": "5.59.6", "@typescript-eslint/types": "5.59.6", "@typescript-eslint/typescript-estree": "5.59.6", "eslint-scope": "^5.1.1", "semver": "^7.3.7" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { "version": "5.59.6", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.6.tgz", "integrity": "sha512-zEfbFLzB9ETcEJ4HZEEsCR9HHeNku5/Qw1jSS5McYJv5BR+ftYXwFFAH5Al+xkGaZEqowMwl7uoJjQb1YSPF8Q==", "dev": true, "dependencies": { "@typescript-eslint/types": "5.59.6", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, "node_modules/acorn": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" }, "engines": { "node": ">=0.4.0" } }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "node_modules/ajv": { "version": "8.12.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", "require-from-string": "^2.0.2", "uri-js": "^4.2.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { "color-convert": "^1.9.0" }, "engines": { "node": ">=4" } }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "node_modules/array-buffer-byte-length": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "is-array-buffer": "^3.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/available-typed-arrays": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/balanced-match": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", "dev": true }, "node_modules/binary-search-bounds": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.5.tgz", "integrity": "sha512-H0ea4Fd3lS1+sTEB2TgcLoK21lLhwEJzlQv3IN47pJS976Gx4zoWe0ak3q+uYh60ppQxg9F16Ri4tS1sfD4+jA==" }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "node_modules/brace-expansion/node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { "fill-range": "^7.0.1" }, "engines": { "node": ">=8" } }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/camelcase-keys": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", "dev": true, "dependencies": { "camelcase": "^5.3.1", "map-obj": "^4.0.0", "quick-lru": "^4.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" }, "engines": { "node": ">=4" } }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { "color-name": "1.1.3" } }, "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/colord": { "version": "2.9.3", "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", "dev": true }, "node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "engines": { "node": ">= 10" } }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, "node_modules/cosmiconfig": { "version": "8.1.3", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", "dev": true, "dependencies": { "import-fresh": "^3.2.1", "js-yaml": "^4.1.0", "parse-json": "^5.0.0", "path-type": "^4.0.0" }, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/d-fischer" } }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" }, "engines": { "node": ">= 8" } }, "node_modules/cross-spawn/node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "bin/node-which" }, "engines": { "node": ">= 8" } }, "node_modules/css-functions-list": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/css-functions-list/-/css-functions-list-3.1.0.tgz", "integrity": "sha512-/9lCvYZaUbBGvYUgYGFJ4dcYiyqdhSjG7IPVluoV8A1ILjkF7ilmhp1OGUz8n+nmBcu0RNrQAzgD8B6FJbrt2w==", "dev": true, "engines": { "node": ">=12.22" } }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", "dev": true, "dependencies": { "mdn-data": "2.0.30", "source-map-js": "^1.0.1" }, "engines": { "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" } }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, "bin": { "cssesc": "bin/cssesc" }, "engines": { "node": ">=4" } }, "node_modules/d3": { "version": "7.8.5", "resolved": "https://registry.npmjs.org/d3/-/d3-7.8.5.tgz", "integrity": "sha512-JgoahDG51ncUfJu6wX/1vWQEqOflgXyl4MaHqlcSruTez7yhaRKR9i8VjjcQGeS2en/jnFivXuaIMnseMMt0XA==", "dependencies": { "d3-array": "3", "d3-axis": "3", "d3-brush": "3", "d3-chord": "3", "d3-color": "3", "d3-contour": "4", "d3-delaunay": "6", "d3-dispatch": "3", "d3-drag": "3", "d3-dsv": "3", "d3-ease": "3", "d3-fetch": "3", "d3-force": "3", "d3-format": "3", "d3-geo": "3", "d3-hierarchy": "3", "d3-interpolate": "3", "d3-path": "3", "d3-polygon": "3", "d3-quadtree": "3", "d3-random": "3", "d3-scale": "4", "d3-scale-chromatic": "3", "d3-selection": "3", "d3-shape": "3", "d3-time": "3", "d3-time-format": "4", "d3-timer": "3", "d3-transition": "3", "d3-zoom": "3" }, "engines": { "node": ">=12" } }, "node_modules/d3-array": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.3.tgz", "integrity": "sha512-JRHwbQQ84XuAESWhvIPaUV4/1UYTBOLiOPGWqgFDHZS1D5QN9c57FbH3QpEnQMYiOXNzKUQyGTZf+EVO7RT5TQ==", "dependencies": { "internmap": "1 - 2" }, "engines": { "node": ">=12" } }, "node_modules/d3-axis": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", "engines": { "node": ">=12" } }, "node_modules/d3-brush": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "3", "d3-transition": "3" }, "engines": { "node": ">=12" } }, "node_modules/d3-chord": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", "dependencies": { "d3-path": "1 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-color": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", "engines": { "node": ">=12" } }, "node_modules/d3-contour": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", "dependencies": { "d3-array": "^3.2.0" }, "engines": { "node": ">=12" } }, "node_modules/d3-delaunay": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", "dependencies": { "delaunator": "5" }, "engines": { "node": ">=12" } }, "node_modules/d3-dispatch": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", "engines": { "node": ">=12" } }, "node_modules/d3-drag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", "dependencies": { "d3-dispatch": "1 - 3", "d3-selection": "3" }, "engines": { "node": ">=12" } }, "node_modules/d3-dsv": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", "dependencies": { "commander": "7", "iconv-lite": "0.6", "rw": "1" }, "bin": { "csv2json": "bin/dsv2json.js", "csv2tsv": "bin/dsv2dsv.js", "dsv2dsv": "bin/dsv2dsv.js", "dsv2json": "bin/dsv2json.js", "json2csv": "bin/json2dsv.js", "json2dsv": "bin/json2dsv.js", "json2tsv": "bin/json2dsv.js", "tsv2csv": "bin/dsv2dsv.js", "tsv2json": "bin/dsv2json.js" }, "engines": { "node": ">=12" } }, "node_modules/d3-ease": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", "engines": { "node": ">=12" } }, "node_modules/d3-fetch": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", "dependencies": { "d3-dsv": "1 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-force": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", "dependencies": { "d3-dispatch": "1 - 3", "d3-quadtree": "1 - 3", "d3-timer": "1 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-format": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", "engines": { "node": ">=12" } }, "node_modules/d3-geo": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.0.tgz", "integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==", "dependencies": { "d3-array": "2.5.0 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-hierarchy": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", "engines": { "node": ">=12" } }, "node_modules/d3-interpolate": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", "dependencies": { "d3-color": "1 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-path": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", "engines": { "node": ">=12" } }, "node_modules/d3-polygon": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", "engines": { "node": ">=12" } }, "node_modules/d3-quadtree": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", "engines": { "node": ">=12" } }, "node_modules/d3-random": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", "engines": { "node": ">=12" } }, "node_modules/d3-scale": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", "dependencies": { "d3-array": "2.10.0 - 3", "d3-format": "1 - 3", "d3-interpolate": "1.2.0 - 3", "d3-time": "2.1.1 - 3", "d3-time-format": "2 - 4" }, "engines": { "node": ">=12" } }, "node_modules/d3-scale-chromatic": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz", "integrity": "sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==", "dependencies": { "d3-color": "1 - 3", "d3-interpolate": "1 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-selection": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", "engines": { "node": ">=12" } }, "node_modules/d3-shape": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", "dependencies": { "d3-path": "^3.1.0" }, "engines": { "node": ">=12" } }, "node_modules/d3-time": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", "dependencies": { "d3-array": "2 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-time-format": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", "dependencies": { "d3-time": "1 - 3" }, "engines": { "node": ">=12" } }, "node_modules/d3-timer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", "engines": { "node": ">=12" } }, "node_modules/d3-transition": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", "dependencies": { "d3-color": "1 - 3", "d3-dispatch": "1 - 3", "d3-ease": "1 - 3", "d3-interpolate": "1 - 3", "d3-timer": "1 - 3" }, "engines": { "node": ">=12" }, "peerDependencies": { "d3-selection": "2 - 3" } }, "node_modules/d3-zoom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", "dependencies": { "d3-dispatch": "1 - 3", "d3-drag": "2 - 3", "d3-interpolate": "1 - 3", "d3-selection": "2 - 3", "d3-transition": "2 - 3" }, "engines": { "node": ">=12" } }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { "ms": "2.1.2" }, "engines": { "node": ">=6.0" }, "peerDependenciesMeta": { "supports-color": { "optional": true } } }, "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/decamelize-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "dependencies": { "decamelize": "^1.1.0", "map-obj": "^1.0.0" }, "engines": { "node": ">=0.10.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/decamelize-keys/node_modules/map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, "node_modules/define-properties": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dev": true, "dependencies": { "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/delaunator": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.0.0.tgz", "integrity": "sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==", "dependencies": { "robust-predicates": "^3.0.0" } }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", "dev": true, "dependencies": { "path-type": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "dependencies": { "esutils": "^2.0.2" }, "engines": { "node": ">=6.0.0" } }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, "node_modules/error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "dev": true, "dependencies": { "is-arrayish": "^0.2.1" } }, "node_modules/es-abstract": { "version": "1.21.2", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.5", "get-intrinsic": "^1.2.0", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", "has": "^1.0.3", "has-property-descriptors": "^1.0.0", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "internal-slot": "^1.0.5", "is-array-buffer": "^3.0.2", "is-callable": "^1.2.7", "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", "is-typed-array": "^1.1.10", "is-weakref": "^1.0.2", "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", "regexp.prototype.flags": "^1.4.3", "safe-regex-test": "^1.0.0", "string.prototype.trim": "^1.2.7", "string.prototype.trimend": "^1.0.6", "string.prototype.trimstart": "^1.0.6", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.9" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/es-set-tostringtag": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", "dev": true, "dependencies": { "get-intrinsic": "^1.1.3", "has": "^1.0.3", "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" } }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", "dev": true, "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" } }, "node_modules/eslint": { "version": "8.40.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.40.0.tgz", "integrity": "sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", "@eslint/eslintrc": "^2.0.3", "@eslint/js": "8.40.0", "@humanwhocodes/config-array": "^0.11.8", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", "eslint-visitor-keys": "^3.4.1", "espree": "^9.5.2", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "globals": "^13.19.0", "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "is-path-inside": "^3.0.3", "js-sdsl": "^4.1.4", "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.1", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-prettier": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.8.0.tgz", "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, "peerDependencies": { "eslint": ">=7.0.0" } }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" }, "engines": { "node": ">=8.0.0" } }, "node_modules/eslint-visitor-keys": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" }, "funding": { "type": "github", "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/eslint/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/eslint/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/eslint/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/eslint/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "node_modules/eslint/node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/eslint-scope": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" } }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "dependencies": { "is-glob": "^4.0.3" }, "engines": { "node": ">=10.13.0" } }, "node_modules/eslint/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, "node_modules/eslint/node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "dependencies": { "p-locate": "^5.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { "p-limit": "^3.0.2" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/espree": { "version": "9.5.2", "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", "dev": true, "dependencies": { "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" }, "engines": { "node": ">=0.10" } }, "node_modules/esquery/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" } }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "dependencies": { "estraverse": "^5.2.0" }, "engines": { "node": ">=4.0" } }, "node_modules/esrecurse/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "engines": { "node": ">=4.0" } }, "node_modules/estraverse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, "engines": { "node": ">=4.0" } }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "node_modules/fast-glob": { "version": "3.2.12", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" }, "engines": { "node": ">=8.6.0" } }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true, "engines": { "node": ">= 4.9.1" } }, "node_modules/fastq": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { "reusify": "^1.0.4" } }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, "engines": { "node": "^10.12.0 || >=12.0.0" } }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" }, "engines": { "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, "dependencies": { "is-callable": "^1.1.3" } }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "node_modules/function.prototype.name": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.3", "es-abstract": "^1.19.0", "functions-have-names": "^1.2.2" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-intrinsic": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", "has-proto": "^1.0.1", "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/get-symbol-description": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.1" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.1.1", "once": "^1.3.0", "path-is-absolute": "^1.0.0" }, "engines": { "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, "dependencies": { "is-glob": "^4.0.1" }, "engines": { "node": ">= 6" } }, "node_modules/global-modules": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", "dev": true, "dependencies": { "global-prefix": "^3.0.0" }, "engines": { "node": ">=6" } }, "node_modules/global-prefix": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", "dev": true, "dependencies": { "ini": "^1.3.5", "kind-of": "^6.0.2", "which": "^1.3.1" }, "engines": { "node": ">=6" } }, "node_modules/globals": { "version": "13.20.0", "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globals/node_modules/type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", "dev": true, "dependencies": { "define-properties": "^1.1.3" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", "fast-glob": "^3.2.9", "ignore": "^5.2.0", "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globjoin": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", "integrity": "sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==", "dev": true }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, "dependencies": { "get-intrinsic": "^1.1.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, "node_modules/grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "dependencies": { "function-bind": "^1.1.1" }, "engines": { "node": ">= 0.4.0" } }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/has-property-descriptors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", "dev": true, "dependencies": { "get-intrinsic": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-tostringtag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/hosted-git-info": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, "engines": { "node": ">=10" } }, "node_modules/html-tags": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.3.1.tgz", "integrity": "sha512-ztqyC3kLto0e9WbNp0aeP+M3kTt+nbaIveGmUxAtZa+8iFgKLUOD4YKM5j+f3QD89bra7UeumolZHKuOXnTmeQ==", "dev": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/iconv-lite": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" } }, "node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/import-fresh/node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/import-lazy": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "engines": { "node": ">=0.8.19" } }, "node_modules/indent-string": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, "node_modules/internal-slot": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "dependencies": { "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" }, "engines": { "node": ">= 0.4" } }, "node_modules/internmap": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", "engines": { "node": ">=12" } }, "node_modules/interval-tree-1d": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/interval-tree-1d/-/interval-tree-1d-1.0.4.tgz", "integrity": "sha512-wY8QJH+6wNI0uh4pDQzMvl+478Qh7Rl4qLmqiluxALlNvl+I+o5x38Pw3/z7mDPTPS1dQalZJXsmbvxx5gclhQ==", "dependencies": { "binary-search-bounds": "^2.0.0" } }, "node_modules/is-array-buffer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.0", "is-typed-array": "^1.1.10" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, "dependencies": { "has-bigints": "^1.0.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-callable": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-core-module": { "version": "2.12.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "dependencies": { "has": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { "node": ">=0.12.0" } }, "node_modules/is-number-object": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-path-inside": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-plain-object": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/is-regex": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "dependencies": { "call-bind": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-string": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, "dependencies": { "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-symbol": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "dependencies": { "has-symbols": "^1.0.2" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-typed-array": { "version": "1.1.10", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, "node_modules/isoformat": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/isoformat/-/isoformat-0.2.1.tgz", "integrity": "sha512-tFLRAygk9NqrRPhJSnNGh7g7oaVWDwR0wKh/GM2LgmPa50Eg4UfyaCO4I8k6EqJHl1/uh2RAD6g06n5ygEnrjQ==" }, "node_modules/js-sdsl": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", "dev": true, "funding": { "type": "opencollective", "url": "https://opencollective.com/js-sdsl" } }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/known-css-properties": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.27.0.tgz", "integrity": "sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==", "dev": true }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^4.0.0", "pify": "^3.0.0", "strip-bom": "^3.0.0" }, "engines": { "node": ">=4" } }, "node_modules/load-json-file/node_modules/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" }, "engines": { "node": ">=4" } }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { "p-locate": "^4.1.0" }, "engines": { "node": ">=8" } }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", "integrity": "sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==", "dev": true }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { "node": ">=10" } }, "node_modules/map-obj": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mathml-tag-names": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", "dev": true, "funding": { "type": "github", "url": "https://github.com/sponsors/wooorm" } }, "node_modules/mdn-data": { "version": "2.0.30", "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", "dev": true }, "node_modules/memorystream": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", "dev": true, "engines": { "node": ">= 0.10.0" } }, "node_modules/meow": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", "dev": true, "dependencies": { "@types/minimist": "^1.2.0", "camelcase-keys": "^6.2.2", "decamelize": "^1.2.0", "decamelize-keys": "^1.1.0", "hard-rejection": "^2.1.0", "minimist-options": "4.1.0", "normalize-package-data": "^3.0.0", "read-pkg-up": "^7.0.1", "redent": "^3.0.0", "trim-newlines": "^3.0.0", "type-fest": "^0.18.0", "yargs-parser": "^20.2.3" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, "engines": { "node": ">= 8" } }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { "braces": "^3.0.2", "picomatch": "^2.3.1" }, "engines": { "node": ">=8.6" } }, "node_modules/min-indent": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, "engines": { "node": "*" } }, "node_modules/minimist-options": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, "dependencies": { "arrify": "^1.0.1", "is-plain-obj": "^1.1.0", "kind-of": "^6.0.3" }, "engines": { "node": ">= 6" } }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/ai" } ], "bin": { "nanoid": "bin/nanoid.cjs" }, "engines": { "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, "node_modules/natural-compare-lite": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", "dev": true }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "node_modules/normalize-package-data": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "dependencies": { "hosted-git-info": "^4.0.1", "is-core-module": "^2.5.0", "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" }, "engines": { "node": ">=10" } }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-all": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "chalk": "^2.4.1", "cross-spawn": "^6.0.5", "memorystream": "^0.3.1", "minimatch": "^3.0.4", "pidtree": "^0.3.0", "read-pkg": "^3.0.0", "shell-quote": "^1.6.1", "string.prototype.padend": "^3.0.0" }, "bin": { "npm-run-all": "bin/npm-run-all/index.js", "run-p": "bin/run-p/index.js", "run-s": "bin/run-s/index.js" }, "engines": { "node": ">= 4" } }, "node_modules/npm-run-all/node_modules/cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "dependencies": { "nice-try": "^1.0.4", "path-key": "^2.0.1", "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" }, "engines": { "node": ">=4.8" } }, "node_modules/npm-run-all/node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "node_modules/npm-run-all/node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "node_modules/npm-run-all/node_modules/path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/npm-run-all/node_modules/path-type": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "dependencies": { "pify": "^3.0.0" }, "engines": { "node": ">=4" } }, "node_modules/npm-run-all/node_modules/read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", "dev": true, "dependencies": { "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", "path-type": "^3.0.0" }, "engines": { "node": ">=4" } }, "node_modules/npm-run-all/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" } }, "node_modules/npm-run-all/node_modules/shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", "dev": true, "dependencies": { "shebang-regex": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, "node_modules/npm-run-all/node_modules/shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/object-inspect": { "version": "1.12.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { "version": "0.9.3", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { "p-try": "^2.0.0" }, "engines": { "node": ">=6" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { "p-limit": "^2.2.0" }, "engines": { "node": ">=8" } }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "dependencies": { "callsites": "^3.0.0" }, "engines": { "node": ">=6" } }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", "dev": true }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/pidtree": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", "dev": true, "bin": { "pidtree": "bin/pidtree.js" }, "engines": { "node": ">=0.10" } }, "node_modules/pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/postcss": { "version": "8.4.23", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz", "integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==", "dev": true, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/postcss/" }, { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/postcss" }, { "type": "github", "url": "https://github.com/sponsors/ai" } ], "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", "source-map-js": "^1.0.2" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-media-query-parser": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", "dev": true }, "node_modules/postcss-resolve-nested-selector": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", "integrity": "sha512-HvExULSwLqHLgUy1rl3ANIqCsvMS0WHss2UOsXhXnQaZ9VCc2oBvIpXrl00IUFT5ZDITME0o6oiXeiHr2SAIfw==", "dev": true }, "node_modules/postcss-safe-parser": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-6.0.0.tgz", "integrity": "sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==", "dev": true, "engines": { "node": ">=12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/postcss/" }, "peerDependencies": { "postcss": "^8.3.3" } }, "node_modules/postcss-selector-parser": { "version": "6.0.13", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", "dev": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" }, "engines": { "node": ">=4" } }, "node_modules/postcss-value-parser": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/prettier": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, "bin": { "prettier": "bin-prettier.js" }, "engines": { "node": ">=10.13.0" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" } }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "engines": { "node": ">=6" } }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ] }, "node_modules/quick-lru": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, "dependencies": { "@types/normalize-package-data": "^2.4.0", "normalize-package-data": "^2.5.0", "parse-json": "^5.0.0", "type-fest": "^0.6.0" }, "engines": { "node": ">=8" } }, "node_modules/read-pkg-up": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "dependencies": { "find-up": "^4.1.0", "read-pkg": "^5.2.0", "type-fest": "^0.8.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/read-pkg-up/node_modules/type-fest": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/read-pkg/node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "node_modules/read-pkg/node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { "hosted-git-info": "^2.1.4", "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "node_modules/read-pkg/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { "semver": "bin/semver" } }, "node_modules/read-pkg/node_modules/type-fest": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/redent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, "dependencies": { "indent-string": "^4.0.0", "strip-indent": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/regexp.prototype.flags": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "functions-have-names": "^1.2.3" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "dependencies": { "is-core-module": "^2.11.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" } }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/robust-predicates": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.1.tgz", "integrity": "sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g==" }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, "funding": [ { "type": "github", "url": "https://github.com/sponsors/feross" }, { "type": "patreon", "url": "https://www.patreon.com/feross" }, { "type": "consulting", "url": "https://feross.org/support" } ], "dependencies": { "queue-microtask": "^1.2.2" } }, "node_modules/rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.3", "is-regex": "^1.1.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, "bin": { "semver": "bin/semver.js" }, "engines": { "node": ">=10" } }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/shell-quote": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", "object-inspect": "^1.9.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/signal-exit": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.0.2.tgz", "integrity": "sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==", "dev": true, "engines": { "node": ">=14" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/slice-ansi": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { "color-convert": "^2.0.1" }, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/slice-ansi/node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { "color-name": "~1.1.4" }, "engines": { "node": ">=7.0.0" } }, "node_modules/slice-ansi/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "node_modules/source-map-js": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { "version": "3.0.13", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" } }, "node_modules/string.prototype.padend": { "version": "3.1.4", "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.4.tgz", "integrity": "sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trim": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", "es-abstract": "^1.20.4" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimend": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.1.4", "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "engines": { "node": ">=4" } }, "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, "dependencies": { "min-indent": "^1.0.0" }, "engines": { "node": ">=8" } }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, "engines": { "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/style-search": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", "integrity": "sha512-Dj1Okke1C3uKKwQcetra4jSuk0DqbzbYtXipzFlFMZtowbF1x7BKJwB9AayVMyFARvU8EDrZdcax4At/452cAg==", "dev": true }, "node_modules/stylelint": { "version": "15.6.2", "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-15.6.2.tgz", "integrity": "sha512-fjQWwcdUye4DU+0oIxNGwawIPC5DvG5kdObY5Sg4rc87untze3gC/5g/ikePqVjrAsBUZjwMN+pZsAYbDO6ArQ==", "dev": true, "dependencies": { "@csstools/css-parser-algorithms": "^2.1.1", "@csstools/css-tokenizer": "^2.1.1", "@csstools/media-query-list-parser": "^2.0.4", "@csstools/selector-specificity": "^2.2.0", "balanced-match": "^2.0.0", "colord": "^2.9.3", "cosmiconfig": "^8.1.3", "css-functions-list": "^3.1.0", "css-tree": "^2.3.1", "debug": "^4.3.4", "fast-glob": "^3.2.12", "fastest-levenshtein": "^1.0.16", "file-entry-cache": "^6.0.1", "global-modules": "^2.0.0", "globby": "^11.1.0", "globjoin": "^0.1.4", "html-tags": "^3.3.1", "ignore": "^5.2.4", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", "is-plain-object": "^5.0.0", "known-css-properties": "^0.27.0", "mathml-tag-names": "^2.1.3", "meow": "^9.0.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", "picocolors": "^1.0.0", "postcss": "^8.4.23", "postcss-media-query-parser": "^0.2.3", "postcss-resolve-nested-selector": "^0.1.1", "postcss-safe-parser": "^6.0.0", "postcss-selector-parser": "^6.0.12", "postcss-value-parser": "^4.2.0", "resolve-from": "^5.0.0", "string-width": "^4.2.3", "strip-ansi": "^6.0.1", "style-search": "^0.1.0", "supports-hyperlinks": "^3.0.0", "svg-tags": "^1.0.0", "table": "^6.8.1", "v8-compile-cache": "^2.3.0", "write-file-atomic": "^5.0.1" }, "bin": { "stylelint": "bin/stylelint.js" }, "engines": { "node": "^14.13.1 || >=16.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/stylelint" } }, "node_modules/stylelint-config-recommended": { "version": "12.0.0", "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz", "integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==", "dev": true, "peerDependencies": { "stylelint": "^15.5.0" } }, "node_modules/stylelint-config-standard": { "version": "33.0.0", "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz", "integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==", "dev": true, "dependencies": { "stylelint-config-recommended": "^12.0.0" }, "peerDependencies": { "stylelint": "^15.5.0" } }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { "has-flag": "^3.0.0" }, "engines": { "node": ">=4" } }, "node_modules/supports-hyperlinks": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-3.0.0.tgz", "integrity": "sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==", "dev": true, "dependencies": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" }, "engines": { "node": ">=14.18" } }, "node_modules/supports-hyperlinks/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/supports-hyperlinks/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/svg-tags": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", "integrity": "sha512-ovssysQTa+luh7A5Weu3Rta6FJlFBBbInjOh722LIt6klpU2/HtdUbszju/G4devcvk8PGt7FCLv5wftu3THUA==", "dev": true }, "node_modules/table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", "dev": true, "dependencies": { "ajv": "^8.0.1", "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", "string-width": "^4.2.3", "strip-ansi": "^6.0.1" }, "engines": { "node": ">=10.0.0" } }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { "is-number": "^7.0.0" }, "engines": { "node": ">=8.0" } }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true, "engines": { "node": ">=8" } }, "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "node_modules/tsutils": { "version": "3.21.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", "dev": true, "dependencies": { "tslib": "^1.8.1" }, "engines": { "node": ">= 6" }, "peerDependencies": { "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/type-fest": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/typed-array-length": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "for-each": "^0.3.3", "is-typed-array": "^1.1.9" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/typescript": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { "node": ">=12.20" } }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "dependencies": { "punycode": "^2.1.0" } }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", "dev": true }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "node_modules/which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { "isexe": "^2.0.0" }, "bin": { "which": "bin/which" } }, "node_modules/which-boxed-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/which-typed-array": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", "dev": true, "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.0", "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, "node_modules/write-file-atomic": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", "dev": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^4.0.1" }, "engines": { "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, "node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, "engines": { "node": ">=10" } }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } } } }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/npm
#!/bin/bash # Copyright 2022 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. docker run \ --rm \ --volume $(pwd):/workspace \ --workdir /workspace \ --env NODE_OPTIONS="--dns-result-order=ipv4first" \ --entrypoint npm \ node:18.16.0-slim \ $@
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/LICENSE
Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/.stylelintrc.json
{ "extends": ["stylelint-config-standard"], "rules": { "declaration-property-value-allowed-list": { "/color/": ["/^var\\(--/", "transparent"] }, "unit-disallowed-list": ["px"], "selector-class-pattern": "^[a-zA-Z\\-]+$" }, "ignoreFiles": ["**/*.min.css"] }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/.dockerignore
.git .localstorage node_modules devtools .eslint* .gitignore .prettier* .stylelint* CONTRIBUTING.md LICENSE npm npx package-lock.json package.json PATENTS README.md tsconfig.json
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/.eslintrc.json
{ "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier" ], "parser": "@typescript-eslint/parser", "plugins": ["@typescript-eslint"], "root": true, "ignorePatterns": ["*.min.js"] }
telemetry
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/mode.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package telemetry import "golang.org/x/telemetry/internal/telemetry" // Mode returns the current telemetry mode. // // The telemetry mode is a global value that controls both the local collection // and uploading of telemetry data. Possible mode values are: // - "on": both collection and uploading is enabled // - "local": collection is enabled, but uploading is disabled // - "off": both collection and uploading are disabled // // When mode is "on", or "local", telemetry data is written to the local file // system and may be inspected with the [gotelemetry] command. // // If an error occurs while reading the telemetry mode from the file system, // Mode returns the default value "local". // // [gotelemetry]: https://pkg.go.dev/golang.org/x/telemetry/cmd/gotelemetry func Mode() string { mode, _ := telemetry.Default.Mode() return mode } // SetMode sets the global telemetry mode to the given value. // // See the documentation of [Mode] for a description of the supported mode // values. // // An error is returned if the provided mode value is invalid, or if an error // occurs while persisting the mode value to the file system. func SetMode(mode string) error { return telemetry.Default.SetMode(mode) }
counter
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/counter/doc.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package counter implements a simple counter system for collecting // totally public telemetry data. // // There are two kinds of counters, basic counters and stack counters. // Basic counters are created by [New]. // Stack counters are created by [NewStack]. // Both are incremented by calling Inc(). // // Basic counters are very cheap. Stack counters are more expensive, as they // require parsing the stack. (Stack counters are implemented as basic counters // whose names are the concatenation of the name and the stack trace. There is // an upper limit on the size of this name, about 4K bytes. If the name is too // long the stack will be truncated and "truncated" appended.) // // When counter files expire they are turned into reports by the upload // package. The first time any counter file is created for a user, a random day // of the week is selected on which counter files will expire. For the first // week, that day is more than 7 days (but not more than two weeks) in the // future. After that the counter files expire weekly on the same day of the // week. // // # Counter Naming // // Counter names passed to [New] and [NewStack] should follow these // conventions: // // - Names cannot contain whitespace or newlines. // // - Names must be valid unicode, with no unprintable characters. // // - Names may contain at most one ':'. In the counter "foo:bar", we refer to // "foo" as the "chart name" and "bar" as the "bucket name". // // - The '/' character should partition counter names into a hierarchy. The // root of this hierarchy should identify the logical entity that "owns" // the counter. This could be an application, such as "gopls" in the case // of "gopls/client:vscode", or a shared library, such as "crash" in the // case of the "crash/crash" counter owned by the crashmonitor library. If // the entity name itself contains a '/', that's ok: "cmd/go/flag" is fine. // // - Words should be '-' separated, as in "gopls/completion/errors-latency" // // - Histograms should use bucket names identifying upper bounds with '<'. // For example given two counters "gopls/completion/latency:<50ms" and // "gopls/completion/latency:<100ms", the "<100ms" bucket counts events // with latency in the half-open interval [50ms, 100ms). // // # Debugging // // The GODEBUG environment variable can enable printing of additional debug // information for counters. Adding GODEBUG=countertrace=1 to the environment // of a process using counters causes the x/telemetry/counter package to log // counter information to stderr. package counter
counter
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/counter/counter.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package counter // The implementation of this package and tests are located in // internal/counter, which can be shared with the upload package. // TODO(hyangah): use of type aliases prevents nice documentation // rendering in go doc or pkgsite. Fix this either by avoiding // type aliasing or restructuring the internal/counter package. import ( "flag" "path" "runtime/debug" "golang.org/x/telemetry/internal/counter" "golang.org/x/telemetry/internal/telemetry" ) // Inc increments the counter with the given name. func Inc(name string) { New(name).Inc() } // Add adds n to the counter with the given name. func Add(name string, n int64) { New(name).Add(n) } // New returns a counter with the given name. // New can be called in global initializers and will be compiled down to // linker-initialized data. That is, calling New to initialize a global // has no cost at program startup. // // See "Counter Naming" in the package doc for a description of counter naming // conventions. func New(name string) *Counter { // Note: not calling DefaultFile.New in order to keep this // function something the compiler can inline and convert // into static data initializations, with no init-time footprint. // TODO(hyangah): is it trivial enough for the compiler to inline? return counter.New(name) } // A Counter is a single named event counter. // A Counter is safe for use by multiple goroutines simultaneously. // // Counters should typically be created using New // and stored as global variables, like: // // package mypackage // var errorCount = counter.New("mypackage/errors") // // (The initialization of errorCount in this example is handled // entirely by the compiler and linker; this line executes no code // at program startup.) // // Then code can call Add to increment the counter // each time the corresponding event is observed. // // Although it is possible to use New to create // a Counter each time a particular event needs to be recorded, // that usage fails to amortize the construction cost over // multiple calls to Add, so it is more expensive and not recommended. type Counter = counter.Counter // A StackCounter is the in-memory knowledge about a stack counter. // StackCounters are more expensive to use than regular Counters, // requiring, at a minimum, a call to runtime.Callers. type StackCounter = counter.StackCounter // NewStack returns a new stack counter with the given name and depth. // // See "Counter Naming" in the package doc for a description of counter naming // conventions. func NewStack(name string, depth int) *StackCounter { return counter.NewStack(name, depth) } // Open prepares telemetry counters for recording to the file system. // // If the telemetry mode is "off", Open is a no-op. Otherwise, it opens the // counter file on disk and starts to mmap telemetry counters to the file. // Open also persists any counters already created in the current process. // // Open should only be called from short-lived processes such as command line // tools. If your process is long-running, use [OpenAndRotate]. func Open() { counter.Open(false) } // OpenAndRotate is like [Open], but also schedules a rotation of the counter // file when it expires. // // See golang/go#68497 for background on why [OpenAndRotate] is a separate API. // // TODO(rfindley): refactor Open and OpenAndRotate for Go 1.24. func OpenAndRotate() { counter.Open(true) } // OpenDir prepares telemetry counters for recording to the file system, using // the specified telemetry directory, if it is not the empty string. // // If the telemetry mode is "off", Open is a no-op. Otherwise, it opens the // counter file on disk and starts to mmap telemetry counters to the file. // Open also persists any counters already created in the current process. func OpenDir(telemetryDir string) { if telemetryDir != "" { telemetry.Default = telemetry.NewDir(telemetryDir) } counter.Open(false) } // CountFlags creates a counter for every flag that is set // and increments the counter. The name of the counter is // the concatenation of prefix and the flag name. // // For instance, CountFlags("gopls/flag:", *flag.CommandLine) func CountFlags(prefix string, fs flag.FlagSet) { fs.Visit(func(f *flag.Flag) { New(prefix + f.Name).Inc() }) } // CountCommandLineFlags creates a counter for every flag // that is set in the default flag.CommandLine FlagSet using // the counter name binaryName+"/flag:"+flagName where // binaryName is the base name of the Path embedded in the // binary's build info. If the binary does not have embedded build // info, the "flag:"+flagName counter will be incremented. // // CountCommandLineFlags must be called after flags are parsed // with flag.Parse. // // For instance, if the -S flag is passed to cmd/compile and // CountCommandLineFlags is called after flags are parsed, // the "compile/flag:S" counter will be incremented. func CountCommandLineFlags() { prefix := "flag:" if buildInfo, ok := debug.ReadBuildInfo(); ok && buildInfo.Path != "" { prefix = path.Base(buildInfo.Path) + "/" + prefix } CountFlags(prefix, *flag.CommandLine) }
counter
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/counter/counter_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package counter_test import ( "os" "os/exec" "testing" "golang.org/x/telemetry/counter" "golang.org/x/telemetry/internal/telemetry" "golang.org/x/telemetry/internal/testenv" ) const telemetryDirEnvVar = "_COUNTER_TEST_TELEMETRY_DIR" func TestMain(m *testing.M) { if dir := os.Getenv(telemetryDirEnvVar); dir != "" { // Run for TestOpenAPIMisuse. telemetry.Default = telemetry.NewDir(dir) counter.Open() counter.OpenAndRotate() // should panic os.Exit(0) } os.Exit(m.Run()) } func TestOpenAPIMisuse(t *testing.T) { testenv.SkipIfUnsupportedPlatform(t) // Test that Open and OpenAndRotate cannot be used simultaneously. exe, err := os.Executable() if err != nil { t.Fatal(err) } cmd := exec.Command(exe) cmd.Env = append(os.Environ(), telemetryDirEnvVar+"="+t.TempDir()) if err := cmd.Run(); err == nil { t.Error("Failed to detect API misuse: no error from calling both Open and OpenAndRotate") } }
countertest
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/counter/countertest/countertest.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // countertest provides testing utilities for counters. // This package cannot be used except for testing. package countertest import ( "sync" "golang.org/x/telemetry/counter" ic "golang.org/x/telemetry/internal/counter" "golang.org/x/telemetry/internal/telemetry" ) var ( openedMu sync.Mutex opened bool ) // SupportedPlatform reports if this platform supports Open() const SupportedPlatform = !telemetry.DisabledOnPlatform func isOpen() bool { openedMu.Lock() defer openedMu.Unlock() return opened } // Open enables telemetry data writing to disk. // This is supposed to be called once during the program execution // (i.e. typically in TestMain), and must not be used with // golang.org/x/telemetry/counter.Open. func Open(telemetryDir string) { openedMu.Lock() defer openedMu.Unlock() if opened { panic("Open was called more than once") } telemetry.Default = telemetry.NewDir(telemetryDir) // TODO(rfindley): reinstate test coverage with counter rotation enabled. // Before the [counter.Open] and [counter.OpenAndRotate] APIs were split, // this called counter.Open (which rotated!). counter.Open() opened = true } // ReadCounter reads the given counter. func ReadCounter(c *counter.Counter) (count uint64, _ error) { return ic.Read(c) } // ReadStackCounter reads the given StackCounter. func ReadStackCounter(c *counter.StackCounter) (stackCounts map[string]uint64, _ error) { return ic.ReadStack(c) } // ReadFile reads the counters and stack counters from the given file. func ReadFile(name string) (counters, stackCounters map[string]uint64, _ error) { return ic.ReadFile(name) }
countertest
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/counter/countertest/countertest_go121.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build go1.21 package countertest import "testing" func init() { // Extra safety check for go1.21+. if !testing.Testing() { panic("use of this package is disallowed in non-testing code") } }
countertest
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/counter/countertest/countertest_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build go1.21 package countertest import ( "fmt" "slices" "strings" "sync" "testing" "golang.org/x/telemetry/counter" "golang.org/x/telemetry/internal/telemetry" "golang.org/x/telemetry/internal/testenv" ) func TestReadCounter(t *testing.T) { testenv.SkipIfUnsupportedPlatform(t) c := counter.New("foobar") got, err := ReadCounter(c) if err != nil { t.Errorf("ReadCounter = (%d, %v), want (0,nil)", got, err) } if got != 0 { t.Fatalf("ReadCounter = %d, want 0", got) } var wg sync.WaitGroup wg.Add(100) for i := 0; i < 100; i++ { go func() { c.Inc() wg.Done() }() } wg.Wait() if got, err := ReadCounter(c); err != nil || got != 100 { t.Errorf("ReadCounter = (%v, %v), want (%v, nil)", got, err, 100) } } func TestReadStackCounter(t *testing.T) { testenv.SkipIfUnsupportedPlatform(t) c := counter.NewStack("foobar", 8) if got, err := ReadStackCounter(c); err != nil || len(got) != 0 { t.Errorf("ReadStackCounter = (%q, %v), want (%v, nil)", got, err, 0) } var wg sync.WaitGroup wg.Add(100) for i := 0; i < 100; i++ { go func() { c.Inc() // one stack! wg.Done() }() } wg.Wait() got, err := ReadStackCounter(c) if err != nil || len(got) != 1 { t.Fatalf("ReadStackCounter = (%v, %v), want to read one entry", stringify(got), err) } for k, v := range got { if !strings.Contains(k, t.Name()) || v != 100 { t.Fatalf("ReadStackCounter = %v, want a stack counter with value 100", got) } } } func TestSupport(t *testing.T) { if SupportedPlatform == telemetry.DisabledOnPlatform { t.Errorf("supported mismatch: us %v, telemetry.internal.Disabled %v", SupportedPlatform, telemetry.DisabledOnPlatform) } } func stringify(m map[string]uint64) string { kv := make([]string, 0, len(m)) for k, v := range m { kv = append(kv, fmt.Sprintf("%q:%v", k, v)) } slices.Sort(kv) return "{" + strings.Join(kv, " ") + "}" }
unionfs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/unionfs/unionfs.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package unionfs allows multiple file systems to be read as a union. package unionfs import ( "io/fs" ) var _ fs.ReadDirFS = FS{} // A FS is an FS presenting the union of the file systems in the slice. If // multiple file systems provide a particular file, Open uses the FS listed // earlier in the slice. type FS []fs.FS // Sub returns an FS corresponding to the merged subtree rooted at a set of // fsys's dirs. func Sub(fsys fs.FS, dirs ...string) (FS, error) { var subs FS for _, dir := range dirs { if _, err := fs.Stat(fsys, dir); err != nil { return nil, err } sub, err := fs.Sub(fsys, dir) if err != nil { return nil, err } subs = append(subs, sub) } return subs, nil } func (fsys FS) Open(name string) (fs.File, error) { var errOut error for _, sub := range fsys { f, err := sub.Open(name) if err == nil { return f, nil } if errOut == nil { errOut = err } } return nil, errOut } func (fsys FS) ReadDir(name string) ([]fs.DirEntry, error) { var all []fs.DirEntry var seen map[string]bool // seen[name] is true if name is listed in all; lazily initialized var errOut error for _, sub := range fsys { list, err := fs.ReadDir(sub, name) if err != nil { errOut = err } if len(all) == 0 { all = append(all, list...) } else { if seen == nil { // Initialize seen only after we get two different directory listings. seen = make(map[string]bool) for _, d := range all { seen[d.Name()] = true } } for _, d := range list { name := d.Name() if !seen[name] { seen[name] = true all = append(all, d) } } } } if len(all) > 0 { return all, nil } return nil, errOut }
unionfs
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/unionfs/unionfs_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package unionfs import ( "io" "os" "reflect" "testing" ) func TestFS_Open(t *testing.T) { fsys, err := Sub(os.DirFS("testdata"), "dir1", "dir2") if err != nil { t.Fatal(err) } type args struct { name string } tests := []struct { name string args args want string wantErr bool }{ { name: "file1 from dir1", args: args{ name: "file1", }, want: "file 1 content from dir 1\n", wantErr: false, }, { name: "file2 from dir2", args: args{ name: "file2", }, want: "file 2 content\n", wantErr: false, }, { name: "file not found", args: args{ name: "file3", }, want: "file3", wantErr: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { file, err := fsys.Open(tt.args.name) if (err != nil) != tt.wantErr { t.Errorf("FS.Open() error = %v, wantErr %v", err, tt.wantErr) return } if !tt.wantErr { bytes, err := io.ReadAll(file) if err != nil { t.Fatal(err) } got := string(bytes) if got != tt.want { t.Errorf("FS.Open() = %v, want %v", got, tt.want) } } }) } } func TestFS_ReadDir(t *testing.T) { var err error fsys, err := Sub(os.DirFS("testdata"), "dir1", "dir2") if err != nil { t.Fatal(err) } type args struct { name string } tests := []struct { name string args args fsys FS wantFiles []string }{ { name: "", args: args{"."}, fsys: fsys, wantFiles: []string{"file1", "file2"}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { dirs, err := tt.fsys.ReadDir(tt.args.name) if err != nil { t.Errorf("FS.ReadDir() error = %v", err) return } var got []string for _, v := range dirs { got = append(got, v.Name()) } if !reflect.DeepEqual(got, tt.wantFiles) { t.Errorf("FS.ReadDir() = %v, want %v", got, tt.wantFiles) } }) } }
dir1
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/unionfs/testdata/dir1/file1
file 1 content from dir 1
dir2
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/unionfs/testdata/dir2/file2
file 2 content
dir2
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/unionfs/testdata/dir2/file1
file 1 content from dir 2
configstore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/configstore/download_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package configstore_test import ( "encoding/json" "fmt" "reflect" "strings" "testing" "golang.org/x/telemetry/internal/configstore" "golang.org/x/telemetry/internal/configtest" "golang.org/x/telemetry/internal/telemetry" "golang.org/x/telemetry/internal/testenv" ) func TestDownload(t *testing.T) { testenv.NeedsGo(t) configVersion := "v0.1.0" in := &telemetry.UploadConfig{ GOOS: []string{"darwin"}, GOARCH: []string{"amd64", "arm64"}, GoVersion: []string{"1.20.3", "1.20.4"}, Programs: []*telemetry.ProgramConfig{{ Name: "gopls", Versions: []string{"v0.11.0"}, Counters: []telemetry.CounterConfig{{ Name: "foobar", Rate: 2, }}, }}, } env := configtest.LocalProxyEnv(t, in, configVersion) testCases := []struct { version string want telemetry.UploadConfig }{ {version: configVersion, want: *in}, {version: "latest", want: *in}, } for _, tc := range testCases { t.Run(tc.version, func(t *testing.T) { got, _, err := configstore.Download(tc.version, env) if err != nil { t.Fatal("failed to download:", err) } want := tc.want if !reflect.DeepEqual(*got, want) { t.Errorf("Download(latest, _) = %v\nwant %v", stringify(got), stringify(want)) } }) } t.Run("invalidversion", func(t *testing.T) { got, ver, err := configstore.Download("nonexisting", env) if err == nil { t.Fatalf("download succeeded unexpectedly: %v %+v", ver, got) } if !strings.Contains(err.Error(), "invalid version") { t.Errorf("unexpected error message: %v", err) } }) } func stringify(x any) string { ret, err := json.MarshalIndent(x, "", " ") if err != nil { return fmt.Sprintf("json.Marshal failed - %v", err) } return string(ret) }
configstore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/configstore/download_windows.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build windows package configstore import ( "os/exec" "syscall" "golang.org/x/sys/windows" ) func init() { needNoConsole = needNoConsoleWindows } func needNoConsoleWindows(cmd *exec.Cmd) { // The uploader main process is likely a daemonized process with no console. // (see x/telemetry/start_windows.go) The console creation behavior when // a parent is a console process without console is not clearly documented // but empirically we observed the new console is created and attached to the // subprocess in the default setup. // // Ensure no new console is attached to the subprocess by setting CREATE_NO_WINDOW. // https://learn.microsoft.com/en-us/windows/console/creation-of-a-console // https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags cmd.SysProcAttr = &syscall.SysProcAttr{ CreationFlags: windows.CREATE_NO_WINDOW, } }
configstore
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/configstore/download.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package configstore abstracts interaction with the telemetry config server. // Telemetry config (golang.org/x/telemetry/config) is distributed as a go // module containing go.mod and config.json. Programs that upload collected // counters download the latest config using `go mod download`. This provides // verification of downloaded configuration and cacheability. package configstore import ( "bytes" "encoding/json" "fmt" "os" "os/exec" "path/filepath" "golang.org/x/telemetry/internal/telemetry" ) const ( ModulePath = "golang.org/x/telemetry/config" configFileName = "config.json" ) // needNoConsole is used on windows to set the windows.CREATE_NO_WINDOW // creation flag. var needNoConsole = func(cmd *exec.Cmd) {} // Download fetches the requested telemetry UploadConfig using "go mod // download". If envOverlay is provided, it is appended to the environment used // for invoking the go command. // // The second result is the canonical version of the requested configuration. func Download(version string, envOverlay []string) (*telemetry.UploadConfig, string, error) { if version == "" { version = "latest" } modVer := ModulePath + "@" + version var stdout, stderr bytes.Buffer cmd := exec.Command("go", "mod", "download", "-json", modVer) needNoConsole(cmd) cmd.Env = append(os.Environ(), envOverlay...) cmd.Stdout = &stdout cmd.Stderr = &stderr if err := cmd.Run(); err != nil { var info struct { Error string } if err := json.Unmarshal(stdout.Bytes(), &info); err == nil && info.Error != "" { return nil, "", fmt.Errorf("failed to download config module: %v", info.Error) } return nil, "", fmt.Errorf("failed to download config module: %w\n%s", err, &stderr) } var info struct { Dir string Version string Error string } if err := json.Unmarshal(stdout.Bytes(), &info); err != nil || info.Dir == "" { return nil, "", fmt.Errorf("failed to download config module (invalid JSON): %w", err) } data, err := os.ReadFile(filepath.Join(info.Dir, configFileName)) if err != nil { return nil, "", fmt.Errorf("invalid config module: %w", err) } cfg := new(telemetry.UploadConfig) if err := json.Unmarshal(data, cfg); err != nil { return nil, "", fmt.Errorf("invalid config: %w", err) } return cfg, info.Version, nil }
chartconfig
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/chartconfig/config.txt
# Note: these are approved chart configs, used to generate the upload config. # For the chart config file format, see chartconfig.go. title: Editor Distribution counter: gopls/client:{vscode,vscodium,vscode-insiders,code-server,eglot,govim,neovim,coc.nvim,sublimetext,other} description: measure editor distribution for gopls users. type: partition issue: https://go.dev/issue/61038 issue: https://go.dev/issue/62214 # add vscode-insiders program: golang.org/x/tools/gopls version: v0.13.0 # temporarily back-version to demonstrate config generation. --- title: Go versions in use for gopls views counter: gopls/goversion:{1.16,1.17,1.18,1.19,1.20,1.21,1.22,1.23,1.24,1.25,1.26,1.27,1.28,1.29,1.30} description: measure go version usage distribution. type: partition issue: https://go.dev/issue/62248 program: golang.org/x/tools/gopls version: v0.13.0 --- title: Number of bug report calls counter: gopls/bug description: count the bugs reported through gopls/internal/bug APIs. type: stack issue: https://go.dev/issue/62249 program: golang.org/x/tools/gopls depth: 16 version: v0.13.0 --- counter: crash/crash title: Unexpected Go crashes description: stacks of goroutines running when the Go program crashed type: stack issue: https://go.dev/issue/65696 program: golang.org/x/tools/gopls depth: 16 version: v0.15.0 --- counter: crash/malformed title: Failure to parse runtime crash output description: count of runtime crash messages that failed to parse type: partition issue: https://go.dev/issue/65696 program: golang.org/x/tools/gopls version: v0.15.0 --- counter: crash/no-running-goroutine title: Failure to identify any running goroutine in the crash output description: count of runtime crash messages that don't have a running goroutine (e.g. deadlock) type: partition issue: https://go.dev/issue/65696 program: golang.org/x/tools/gopls version: v0.15.0 --- counter: go/invocations title: cmd/go invocations description: Number of invocations of the go command type: partition issue: https://go.dev/issue/67244 program: cmd/go version: go1.23rc1 --- counter: go/build/flag:{ buildmode } title: cmd/go flags description: Flag names of flags provided to the go command type: partition issue: https://go.dev/issue/67244 program: cmd/go version: go1.23rc1 --- counter: go/build/flag/buildmode:{ archive, c-archive, c-shared, default, exe, pie, shared, plugin } title: cmd/go buildmode values description: Buildmode values for the go command type: partition issue: https://go.dev/issue/67244 program: cmd/go version: go1.23rc1 --- counter: compile/invocations title: cmd/compile invocations description: Number of invocations of the go compiler type: partition issue: https://go.dev/issue/67244 program: cmd/compile version: go1.23rc1 --- title: Compiler bug report calls counter: compile/bug description: count stacks for cases where cmd/compile has a fatal error type: stack issue: https://go.dev/issue/67244 program: cmd/compile depth: 16 version: go1.23rc1 --- counter: govulncheck/scan:{symbol,package,module} title: Scan Level Distribution description: measure govulncheck scan level distribution type: partition issue: https://go.dev/issue/67678 program: golang.org/x/vuln/cmd/govulncheck --- counter: govulncheck/mode:{source,binary,extract,query,convert} title: Scan Mode Distribution description: measure govulncheck scan mode distribution type: partition issue: https://go.dev/issue/67678 program: golang.org/x/vuln/cmd/govulncheck --- counter: govulncheck/format:{text,json,sarif,openvex} title: Output Format Distribution description: measure govulncheck output format distribution type: partition issue: https://go.dev/issue/67678 program: golang.org/x/vuln/cmd/govulncheck --- counter: govulncheck/show:{none,traces,color,verbose,version} title: Show Options Distribution description: measure govulncheck show flag distribution type: partition issue: https://go.dev/issue/67678 program: golang.org/x/vuln/cmd/govulncheck --- counter: govulncheck/assumptions:{multi-patterns,no-binary-platform,no-relative-path,no-go-root,local-replace,unknown-pkg-mod-path} title: Code Invariants Distribution description: measure distribution of failed govulncheck internal assumptions type: partition issue: https://go.dev/issue/67678 program: golang.org/x/vuln/cmd/govulncheck
chartconfig
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/chartconfig/chartconfig.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The chartconfig package defines the ChartConfig type, representing telemetry // chart configuration, as well as utilities for parsing and validating this // configuration. // // Chart configuration defines the set of aggregations active on the telemetry // server, and are used to derive which data needs to be uploaded by users. // See the original blog post for more details: // // https://research.swtch.com/telemetry-design#configuration // // The record format defined in this package differs slightly from that of the // blog post. This format is still experimental, and subject to change. // // Configuration records consist of fields, comments, and whitespace. A field // is defined by a line starting with a valid key, followed immediately by ":", // and then a textual value, which cannot include the comment separator '#'. // // Comments start with '#', and extend to the end of the line. // // The following keys are supported. Any entry not marked as (optional) must be // provided. // // - title: the chart title. // - description: (optional) a longer description of the chart. // - issue: a go issue tracker URL proposing the chart configuration. // Multiple issues may be provided by including additional 'issue:' lines. // All proposals must be in the 'accepted' state. // - type: the chart type: currently only partition, histogram, and stack are // supported. // - program: the package path of the program for which this chart applies. // - version: (optional) the first version for which this chart applies. Must // be a valid semver value. // - counter: the primary counter this chart illustrates, including buckets // for histogram and partition charts. // - depth: (optional) stack counters only; the maximum stack depth to collect // - error: (optional) the desired error rate for this chart, which // determines collection rate // // Multiple records are separated by "---" lines. // // For example: // // # This config defines an ordinary counter. // counter: gopls/editor:{emacs,vim,vscode,other} # TODO(golang/go#34567): add more editors // title: Editor Distribution // description: measure editor distribution for gopls users. // type: partition // issue: https://go.dev/issue/12345 // program: golang.org/x/tools/gopls // version: v1.0.0 // version: [v2.0.0, v2.3.4] // version: [v3.0.0, ] // // --- // // # This config defines a stack counter. // counter: gopls/bug // title: Gopls bug reports. // description: Stacks of bugs encountered on the gopls server. // issue: https://go.dev/12345 // issue: https://go.dev/23456 # increase stack depth // type: stack // program: golang.org/x/tools/gopls // depth: 10 package chartconfig // A ChartConfig defines the configuration for a single chart/collection on the // telemetry server. // // See the package documentation for field definitions. type ChartConfig struct { Title string Description string Issue []string Type string Program string Counter string Depth int Error float64 // TODO(rfindley) is Error still useful? Version string }
chartconfig
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/chartconfig/load.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package chartconfig import ( _ "embed" "fmt" "reflect" "sort" "strconv" "strings" "unicode" ) //go:embed config.txt var chartConfig []byte func Raw() []byte { return chartConfig } // Load loads and parses the current chart config. func Load() ([]ChartConfig, error) { return Parse(chartConfig) } // Parse parses ChartConfig records from the provided raw data, returning an // error if the config has invalid syntax. See the package documentation for a // description of the record syntax. // // Even with correct syntax, the resulting chart config may not meet all the // requirements described in the package doc. Call [Validate] to check whether // the config data is coherent. func Parse(data []byte) ([]ChartConfig, error) { // Collect field information for the record type. var ( prefixes []string // for parse errors fields = make(map[string]reflect.StructField) // key -> struct field ) { typ := reflect.TypeOf(ChartConfig{}) for i := 0; i < typ.NumField(); i++ { f := typ.Field(i) key := strings.ToLower(f.Name) if _, ok := fieldParsers[key]; !ok { panic(fmt.Sprintf("no parser for field %q", f.Name)) } prefixes = append(prefixes, "'"+key+":'") fields[key] = f } sort.Strings(prefixes) } // Read records, separated by '---' var ( records []ChartConfig inProgress = new(ChartConfig) // record value currently being parsed set = make(map[string]bool) // fields that are set so far; empty records are skipped ) flushRecord := func() { if len(set) > 0 { // only flush non-empty records records = append(records, *inProgress) } inProgress = new(ChartConfig) set = make(map[string]bool) } // Within bucket braces in counter fields, newlines are ignored. // if we're in the middle of a multiline counter field, accumulatedCounterText // contains the joined lines of the field up to the current line. Once // a line containing an end brace is reached, line will be set to the // joined lines of accumulatedCounterText and processed as a single line. var accumulatedCounterText string for lineNum, line := range strings.Split(string(data), "\n") { if line == "---" { if accumulatedCounterText != "" { return nil, fmt.Errorf("line %d: reached end of record while processing multiline counter field", lineNum) } flushRecord() continue } text, _, _ := strings.Cut(line, "#") // trim comments // Processing of counter fields which can appear across multiple lines. // See comment on accumulatedCounterText. if accumulatedCounterText == "" { if oi := strings.Index(text, "{"); oi >= 0 { if strings.Contains(text[:oi], "}") { return nil, fmt.Errorf("line %d: invalid line %q: unexpected '}'", lineNum, line) } if strings.Contains(text[oi+len("{"):], "{") { return nil, fmt.Errorf("line %d: invalid line %q: unexpected '{'", lineNum, line) } if !strings.HasPrefix(text, "counter:") { return nil, fmt.Errorf("line %d: invalid line %q: '{' is only allowed to appear within a counter field", lineNum, line) } accumulatedCounterText = strings.TrimRightFunc(text, unicode.IsSpace) // Don't continue here. If the counter field is a single line // the check for the close brace below will close the line // and process it as text. Set text to "" so when it's appended to // accumulatedCounterText we don't add the line twice. text = "" } else if strings.Contains(text, "}") { return nil, fmt.Errorf("line %d: invalid line %q: unexpected '}'", lineNum, line) } } if accumulatedCounterText != "" { if strings.Contains(text, "{") { return nil, fmt.Errorf("line %d: invalid line %q: '{' is only allowed to appear once within a counter field", lineNum, line) } accumulatedCounterText += strings.TrimSpace(text) if ci := strings.Index(accumulatedCounterText, "}"); ci >= 0 { if strings.Contains(accumulatedCounterText[ci+len("}"):], "}") { return nil, fmt.Errorf("line %d: invalid line %q: unexpected '}'", lineNum, line) } if ci > 0 && strings.HasSuffix(accumulatedCounterText[:ci], ",") { return nil, fmt.Errorf("line %d: invalid line %q: unexpected '}' after ','", lineNum, line) } text = accumulatedCounterText accumulatedCounterText = "" } else { // We're in the middle of a multiline counter field. Continue // processing. continue } } var key string for k := range fields { prefix := k + ":" if strings.HasPrefix(text, prefix) { key = k text = text[len(prefix):] break } } text = strings.TrimSpace(text) if text == "" { // Check for empty lines before the field == nil check below. // Lines consisting only of whitespace and comments are OK. continue } if key == "" { return nil, fmt.Errorf("line %d: invalid line %q: lines must be '---', consist only of whitespace/comments, or start with %s", lineNum, line, strings.Join(prefixes, ", ")) } field := fields[key] v := reflect.ValueOf(inProgress).Elem().FieldByName(field.Name) if set[key] && field.Type.Kind() != reflect.Slice { return nil, fmt.Errorf("line %d: field %s may not be repeated", lineNum, strings.ToLower(field.Name)) } parser := fieldParsers[key] if err := parser(v, text); err != nil { return nil, fmt.Errorf("line %d: field %q: %v", lineNum, field.Name, err) } set[key] = true } if accumulatedCounterText != "" { return nil, fmt.Errorf("reached end of file while processing multiline counter field") } flushRecord() return records, nil } // A fieldParser parses the provided input and writes to v, which must be // addressable. type fieldParser func(v reflect.Value, input string) error var fieldParsers = map[string]fieldParser{ "title": parseString, "description": parseString, "issue": parseSlice(parseString), "type": parseString, "program": parseString, "counter": parseString, "depth": parseInt, "error": parseFloat, "version": parseString, } func parseString(v reflect.Value, input string) error { v.SetString(input) return nil } func parseInt(v reflect.Value, input string) error { i, err := strconv.ParseInt(input, 10, 64) if err != nil { return fmt.Errorf("invalid int value %q", input) } v.SetInt(i) return nil } func parseFloat(v reflect.Value, input string) error { f, err := strconv.ParseFloat(input, 64) if err != nil { return fmt.Errorf("invalid float value %q", input) } v.SetFloat(f) return nil } func parseSlice(elemParser fieldParser) fieldParser { return func(v reflect.Value, input string) error { elem := reflect.New(v.Type().Elem()).Elem() v.Set(reflect.Append(v, elem)) elem = v.Index(v.Len() - 1) if err := elemParser(elem, input); err != nil { return err } return nil } }
chartconfig
/home/linuxreitt/Michinereitt/Tuning/Workshop_Scripts/hf-codegen/data/golang_public_repos/telemetry/internal/chartconfig/load_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package chartconfig_test import ( "reflect" "testing" "golang.org/x/telemetry/internal/chartconfig" ) func TestLoad(t *testing.T) { // Test that we can actually load the chart config. if _, err := chartconfig.Load(); err != nil { t.Errorf("Load() failed: %v", err) } } func TestParse(t *testing.T) { tests := []struct { name string input string want []chartconfig.ChartConfig }{ {"empty", "", nil}, {"single field", "title: A", []chartconfig.ChartConfig{{Title: "A"}}}, { "basic", ` title: A description: B type: C program: D counter: E issue: F1 issue: F2 depth: 2 error: 0.1 version: v2.0.0 `, []chartconfig.ChartConfig{{ Title: "A", Description: "B", Type: "C", Program: "D", Counter: "E", Issue: []string{"F1", "F2"}, Depth: 2, Error: 0.1, Version: "v2.0.0", }}, }, { "partial", ` title: A description: B `, []chartconfig.ChartConfig{ {Title: "A", Description: "B"}, }, }, { "comments and whitespace", ` # A comment title: A # a line comment # Another comment description: B `, []chartconfig.ChartConfig{ {Title: "A", Description: "B"}, }, }, { "multi-record", ` # Empty records are skipped --- title: A description: B --- title: C description: D `, []chartconfig.ChartConfig{ {Title: "A", Description: "B"}, {Title: "C", Description: "D"}, }, }, { "example", ` title: Editor Distribution counter: gopls/editor:{emacs,vim,vscode,other} description: measure editor distribution for gopls users. type: partition issue: TBD program: golang.org/x/tools/gopls `, []chartconfig.ChartConfig{ { Title: "Editor Distribution", Description: "measure editor distribution for gopls users.", Counter: "gopls/editor:{emacs,vim,vscode,other}", Type: "partition", Issue: []string{"TBD"}, Program: "golang.org/x/tools/gopls", }, }, }, { "multiline counter field", ` counter: foo:{ bar, baz } `, []chartconfig.ChartConfig{ {Counter: "foo:{bar,baz}"}, }, }, { "multiline counter field with braces immediately next to text", ` counter: foo:{bar, baz} `, []chartconfig.ChartConfig{ {Counter: "foo:{bar,baz}"}, }, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { got, err := chartconfig.Parse([]byte(test.input)) if err != nil { t.Fatalf("Parse(...) failed: %v", err) } if len(got) != len(test.want) { t.Fatalf("Parse(...) returned %d records, want %d", len(got), len(test.want)) } for i, got := range got { want := test.want[i] if !reflect.DeepEqual(got, want) { t.Errorf("Parse(...): record %d = %#v, want %#v", i, got, want) } } }) } } func TestParseErrors(t *testing.T) { tests := []struct { name string input string }{ { "leading space", ` title: foo `, }, { "unknown key", ` foo: bar `, }, { "bad separator", ` title: foo --- # comments aren't allowed after separators title: bar `, }, { "invalid depth", ` depth: notanint `, }, { "open curly brace not in counter field", ` title: { `, }, { "close curly brace not in counter field", ` title: } `, }, { "end of record within multiline counter field", ` counter: foo{ bar --- title: baz `, }, { "end of file within multiline counter field", ` counter: foo{ bar `, }, { "close curly before open curly", ` counter: }foo{ bar }`, }, { "open curly after close curly", ` counter: foo{ bar } {`, }, { "open curly after open curly same line", ` counter: foo{{ bar }`, }, { "open curly after open curly different line", ` counter: foo{ {bar }`, }, { "close curly after close curly", ` counter: foo{ bar } }`, }, { "comma right before close curly", ` counter: foo{ bar, baz, } }`, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { _, err := chartconfig.Parse([]byte(test.input)) if err == nil { t.Fatalf("Parse(...) succeeded unexpectedly") } }) } }