cache: remove script interpreter

It is unfinished and probably not something I want to complete soon
This commit is contained in:
Adam
2018-01-26 20:30:52 -05:00
parent fdbd4237b9
commit 4624371bf9
26 changed files with 0 additions and 1386 deletions

View File

@@ -1,49 +0,0 @@
/*
* Copyright (c) 2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. 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.
*
* 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.
*/
package net.runelite.cache.script.interpreter;
import java.io.IOException;
import java.io.InputStream;
import net.runelite.cache.definitions.ScriptDefinition;
import net.runelite.cache.script.assembler.Assembler;
import org.junit.Assert;
import org.junit.Test;
public class InterpreterTest
{
@Test
public void testRun() throws IOException
{
InputStream in = InterpreterTest.class.getResourceAsStream("397.rs2asm");
Assert.assertNotNull(in);
Assembler assembler = new Assembler();
ScriptDefinition script = assembler.assemble(in);
Interpreter interpreter = new Interpreter();
interpreter.run(script);
}
}

View File

@@ -1,54 +0,0 @@
.int_stack_count 3
.string_stack_count 0
.int_var_count 3
.string_var_count 0
iload 0
load_int 1
if_icmpne LABEL4
jump LABEL5
LABEL4:
return
LABEL5:
load_int 2871
load_int 1
load_int 0
3200
iload 1
load_int 1
if_icmpeq LABEL13
jump LABEL20
LABEL13:
get_varbit 3985
iload 2
iadd
load_int 4
modulo
set_varbit 3985
jump LABEL41
LABEL20:
iload 1
load_int 2
if_icmpeq LABEL24
jump LABEL31
LABEL24:
get_varbit 3986
iload 2
iadd
load_int 4
modulo
set_varbit 3986
jump LABEL41
LABEL31:
iload 1
load_int 3
if_icmpeq LABEL35
jump LABEL41
LABEL35:
get_varbit 3987
iload 2
iadd
load_int 4
modulo
set_varbit 3987
LABEL41:
return