Check-in [7d82f2b57d]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add base for array viewer and simple object views.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wip-springcoat-bringup
Files: files | file ages | folders
SHA1: 7d82f2b57dbf993b8669bc8f400a6b67cd5707b3
User & Date: stephanie.gawroriski 2020-03-23 00:17:22
Context
2020-03-26
00:08
Implement allocation of string arrays. check-in: 23cd4679f0 user: stephanie.gawroriski tags: wip-springcoat-bringup
2020-03-23
00:17
Add base for array viewer and simple object views. check-in: 7d82f2b57d user: stephanie.gawroriski tags: wip-springcoat-bringup
00:01
Mass deprecations. check-in: 12bcc22a81 user: stephanie.gawroriski tags: wip-springcoat-bringup
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to .idea/codeStyles/Project.xml.

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
..
52
53
54
55
56
57
58



59
60
61
62
63
64
65
      </formatting-settings>
    </DBN-SQL>
    <JavaCodeStyleSettings>
      <option name="PARAMETER_NAME_PREFIX" value="__" />
      <option name="TEST_NAME_PREFIX" value="Test" />
      <option name="TEST_NAME_SUFFIX" value="" />
      <option name="SUBCLASS_NAME_SUFFIX" value="" />
      <option name="GENERATE_FINAL_LOCALS" value="true" />
      <option name="REPLACE_NULL_CHECK" value="false" />
      <option name="REPLACE_SUM" value="false" />
      <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
      <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
      <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
      <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
        <value />
................................................................................
          <package name="" withSubpackages="true" static="true" />
        </value>
      </option>
      <option name="ENABLE_JAVADOC_FORMATTING" value="false" />
      <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
      <option name="JD_PRESERVE_LINE_FEEDS" value="true" />
      <option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" />



    </JavaCodeStyleSettings>
    <codeStyleSettings language="Groovy">
      <indentOptions>
        <option name="CONTINUATION_INDENT_SIZE" value="4" />
        <option name="USE_TAB_CHARACTER" value="true" />
      </indentOptions>
    </codeStyleSettings>







<







 







>
>
>







33
34
35
36
37
38
39

40
41
42
43
44
45
46
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
      </formatting-settings>
    </DBN-SQL>
    <JavaCodeStyleSettings>
      <option name="PARAMETER_NAME_PREFIX" value="__" />
      <option name="TEST_NAME_PREFIX" value="Test" />
      <option name="TEST_NAME_SUFFIX" value="" />
      <option name="SUBCLASS_NAME_SUFFIX" value="" />

      <option name="REPLACE_NULL_CHECK" value="false" />
      <option name="REPLACE_SUM" value="false" />
      <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
      <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
      <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
      <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
        <value />
................................................................................
          <package name="" withSubpackages="true" static="true" />
        </value>
      </option>
      <option name="ENABLE_JAVADOC_FORMATTING" value="false" />
      <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" />
      <option name="JD_PRESERVE_LINE_FEEDS" value="true" />
      <option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" />
      <REPEAT_ANNOTATIONS>
        <ANNO name="java.lang.Deprecated" />
      </REPEAT_ANNOTATIONS>
    </JavaCodeStyleSettings>
    <codeStyleSettings language="Groovy">
      <indentOptions>
        <option name="CONTINUATION_INDENT_SIZE" value="4" />
        <option name="USE_TAB_CHARACTER" value="true" />
      </indentOptions>
    </codeStyleSettings>

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/ObjectLoader.java.

5
6
7
8
9
10
11

12
13
14
15
16
17
18
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.vm.springcoat;


import java.util.Map;
import net.multiphasicapps.classfile.ClassName;
import net.multiphasicapps.classfile.ConstantValueString;
import net.multiphasicapps.classfile.MethodDescriptor;
import net.multiphasicapps.classfile.MethodNameAndType;

/**







>







5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.vm.springcoat;

import cc.squirreljme.vm.springcoat.objects.ArrayViewer;
import java.util.Map;
import net.multiphasicapps.classfile.ClassName;
import net.multiphasicapps.classfile.ConstantValueString;
import net.multiphasicapps.classfile.MethodDescriptor;
import net.multiphasicapps.classfile.MethodNameAndType;

/**

Added emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/objects/ArrayViewer.java.













































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
//     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.vm.springcoat.objects;

import cc.squirreljme.vm.springcoat.exceptions.SpringArrayIndexOutOfBoundsException;

/**
 * This is an interface for the viewing of array types.
 *
 * @param <T> The type of value to store.
 * @since 2020/03/22
 */
public interface ArrayViewer<T>
	extends ObjectViewer
{
	/**
	 * Returns the value at the given index.
	 *
	 * @param __i The index to get.
	 * @throws SpringArrayIndexOutOfBoundsException If the index is out of
	 * bounds.
	 * @since 2020/03/22
	 */
	T get(int __i)
		throws SpringArrayIndexOutOfBoundsException;
	
	/**
	 * Returns the length of the array.
	 *
	 * @return The array length.
	 * @since 2020/03/22
	 */
	int length();
	
	/**
	 * Sets the given index to the specified value.
	 *
	 * @param __i The index to set.
	 * @param __v The value to set.
	 * @throws NullPointerException On null arguments.
	 * @throws SpringArrayIndexOutOfBoundsException If the index is out of
	 * bounds.
	 * @since 2020/03/22
	 */
	void set(int __i, T __v)
		throws NullPointerException, SpringArrayIndexOutOfBoundsException;
}

Added emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/objects/ArrayViewerAsList.java.























































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// Multi-Phasic Applications: SquirrelJME
//     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
// SquirrelJME is under the GNU General Public License v3+, or later.
// See license.mkd for licensing and copyright information.
// ---------------------------------------------------------------------------

package cc.squirreljme.vm.springcoat.objects;

import cc.squirreljme.runtime.cldc.debug.Debugging;
import java.util.AbstractList;

/**
 * This is a view of an array as a list type.
 *
 * @since 2020/03/22
 */
public final class ArrayViewerAsList<T>
	extends AbstractList<T>
{
	/** The array to view. */
	protected final ArrayViewer<T> array;
	
	/**
	 * Initializes the array viewer as a list.
	 *
	 * @param __array The array to view.
	 * @throws NullPointerException On null arguments.
	 * @since 2020/03/22
	 */
	public ArrayViewerAsList(ArrayViewer<T> __array)
		throws NullPointerException
	{
		if (__array == null)
			throw new NullPointerException("NARG");
		
		this.array = __array;
	}
	
	/**
	 * {@inheritDoc}
	 * @since 2020/03/22
	 */
	@Override
	public T get(int __i)
	{
		return this.array.get(__i);
	}
	
	/**
	 * {@inheritDoc}
	 * @since 2020/03/22
	 */
	@Override
	public T set(int __i, T __v)
	{
		ArrayViewer<T> array = this.array;
		
		T old = array.get(__i);
		array.set(__i, __v);
		return old;
	}
	
	/**
	 * {@inheritDoc}
	 * @since 2020/03/22
	 */
	@Override
	public int size()
	{
		return this.array.length();
	}
}

Changes to emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/objects/SimpleObjectViewer.java.

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	{
		if (__pointer == null)
			throw new NullPointerException("NARG");
		
		this.pointer = __pointer;
	}
	
	/**
	 * Returns an older {@link SpringObject} view of this object.
	 *
	 * @return The older object view.
	 * @since 2020/03/22
	 */
	@Deprecated
	public SpringObject asSpringObject()
	{
		throw Debugging.todo();
	}
	
	/**
	 * {@inheritDoc}
	 * @since 2020/03/22
	 */
	@Override
	public SpringPointer pointer()
	{
		throw Debugging.todo();
	}
}







<
<
<
<
<
<
<
<
<
<
<
<










36
37
38
39
40
41
42












43
44
45
46
47
48
49
50
51
52
	{
		if (__pointer == null)
			throw new NullPointerException("NARG");
		
		this.pointer = __pointer;
	}
	












	/**
	 * {@inheritDoc}
	 * @since 2020/03/22
	 */
	@Override
	public SpringPointer pointer()
	{
		throw Debugging.todo();
	}
}