<commit_before>package main

import (
    "log"
    "jvmgo/rtda"
    "jvmgo/instructions"
)

// todo
func loop(thread *rtda.Thread) {
    bcr := instructions.NewBytecodeReader()
    for {
        frame := thread.CurrentFrame() 

        // decode
        bcr.SetPC(thread.PC())
        bcr.SetCode(frame.Method().Code())
        _, inst := instructions.Decode(bcr)
        frame.SetNextPC(bcr.PC())

        // execute
        //pc := thread.PC()
        //logInstruction(frame, pc, opcode, inst)
        inst.Execute(frame)
        if !thread.IsStackEmpty() {
            topFrame := thread.TopFrame()<commit_msg>code refactor<commit_after>package main

import (
    "log"
    "jvmgo/rtda"
    "jvmgo/instructions"
)

// todo
func loop(thread *rtda.Thread) {
    bcr := instructions.NewBytecodeReader()
    for {
        frame := thread.CurrentFrame() 

        // decode
        bcr.SetPC(thread.PC())
        bcr.SetCode(frame.Method().Code())
        _, inst := instructions.Decode(bcr)
        frame.SetNextPC(bcr.PC())

        // execute
        //logInstruction(frame, thread.PC(), opcode, inst)
        inst.Execute(frame)
        if !thread.IsStackEmpty() {
            topFrame := thread.TopFrame()
{'fraction_non_alphanumeric': 0.14392059553349876, 'fraction_numerical': 0.0, 'mean_word_length': 2.142857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '739208', 'n_tokens_mistral': 390, 'n_tokens_neox': 385, 'n_words': 64}