From 782797c84241fc14c46f10fb39bc139882683cbc Mon Sep 17 00:00:00 2001 From: Andreas Woess Date: Fri, 22 Jan 2016 02:35:36 +0100 Subject: [PATCH 1/2] fix method links in javadoc of Source --- .../src/com/oracle/truffle/api/source/Source.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java index 3369695c44e1..ff945af43137 100644 --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/source/Source.java @@ -87,8 +87,8 @@ *

*

  • Sub-Source: A representation of the contents of a sub-range of another * {@link Source}.
    - * See @link {@link Source#subSource(Source, int, int)}
    - * See @link {@link Source#subSource(Source, int)}
  • + * See {@link Source#subSource(Source, int, int)}
    + * See {@link Source#subSource(Source, int)} *

    *

  • AppendableSource: Literal contents are provided by the client, * incrementally, after the instance is created.
    @@ -112,7 +112,7 @@ public abstract class Source { private static final Logger LOG = Logger.getLogger(Source.class.getName()); // TODO (mlvdv) consider canonicalizing and reusing SourceSection instances - // TOOD (mlvdv) connect SourceSections into a spatial tree for fast geometric lookup + // TODO (mlvdv) connect SourceSections into a spatial tree for fast geometric lookup /** * Index of all named sources. @@ -411,8 +411,8 @@ private Source() { /** * Returns a short version of the name of the resource holding a guest language program (as - * described in @getName). For example, this could be just the name of the file, rather than a - * full path. + * described in {@link #getName()}). For example, this could be just the name of the file, + * rather than a full path. * * @return the short name of the guest language program */ From 2341199fab8d0e049903255e1085c819b318f165 Mon Sep 17 00:00:00 2001 From: Andreas Woess Date: Fri, 22 Jan 2016 03:09:47 +0100 Subject: [PATCH 2/2] reduce visibility of some object model implementation classes --- .../src/com/oracle/truffle/object/basic/BasicAllocator.java | 2 +- .../src/com/oracle/truffle/object/basic/DefaultStrategy.java | 2 +- .../com/oracle/truffle/object/basic/DynamicObjectBasic.java | 2 +- .../src/com/oracle/truffle/object/basic/ShapeBasic.java | 4 ++-- .../src/com/oracle/truffle/object/DynamicObjectImpl.java | 2 +- .../src/com/oracle/truffle/object/ObjectStorageOptions.java | 5 ++++- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/BasicAllocator.java b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/BasicAllocator.java index f8322a318d95..ee429127c052 100644 --- a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/BasicAllocator.java +++ b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/BasicAllocator.java @@ -45,7 +45,7 @@ import static com.oracle.truffle.object.basic.BasicLocations.OBJECT_SIZE; import com.oracle.truffle.object.basic.BasicLocations.ObjectArrayLocation; -public abstract class BasicAllocator extends ShapeImpl.BaseAllocator { +abstract class BasicAllocator extends ShapeImpl.BaseAllocator { public BasicAllocator(LayoutImpl layout) { super(layout); diff --git a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DefaultStrategy.java b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DefaultStrategy.java index d7d2f1f309b0..4ad388a285e5 100644 --- a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DefaultStrategy.java +++ b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DefaultStrategy.java @@ -85,7 +85,7 @@ public BaseAllocator createAllocator(LayoutImpl layout) { return new DefaultAllocatorImpl(layout); } - public static class DefaultAllocatorImpl extends BasicAllocator { + static class DefaultAllocatorImpl extends BasicAllocator { protected DefaultAllocatorImpl(LayoutImpl layout) { super(layout); } diff --git a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DynamicObjectBasic.java b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DynamicObjectBasic.java index ba8f1f23d475..294d40b18e5a 100644 --- a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DynamicObjectBasic.java +++ b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/DynamicObjectBasic.java @@ -47,7 +47,7 @@ public class DynamicObjectBasic extends DynamicObjectImpl { private Object[] objext; private long[] primext; - public DynamicObjectBasic(Shape shape) { + protected DynamicObjectBasic(Shape shape) { super(shape); } diff --git a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java index 30386ec267e8..cc17e6835261 100644 --- a/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java +++ b/truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java @@ -29,11 +29,11 @@ import com.oracle.truffle.object.Transition; public final class ShapeBasic extends ShapeImpl { - public ShapeBasic(Layout layout, Object sharedData, ObjectType objectType, int id) { + ShapeBasic(Layout layout, Object sharedData, ObjectType objectType, int id) { super(layout, objectType, sharedData, id); } - public ShapeBasic(Layout layout, Object sharedData, ShapeImpl parent, ObjectType objectType, PropertyMap propertyMap, Transition transition, Allocator allocator, int id) { + ShapeBasic(Layout layout, Object sharedData, ShapeImpl parent, ObjectType objectType, PropertyMap propertyMap, Transition transition, Allocator allocator, int id) { super(layout, parent, objectType, sharedData, propertyMap, transition, allocator, id); } diff --git a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java index 4526401ff480..a0660f4eedc3 100644 --- a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java +++ b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/DynamicObjectImpl.java @@ -35,7 +35,7 @@ public abstract class DynamicObjectImpl extends DynamicObject implements Cloneab public static final DebugCounter reshapeCount = DebugCounter.create("Reshape count"); - public DynamicObjectImpl(Shape shape) { + protected DynamicObjectImpl(Shape shape) { assert shape instanceof ShapeImpl; initialize(shape); setShape(shape); diff --git a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/ObjectStorageOptions.java b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/ObjectStorageOptions.java index be8d8cec379e..74a29ec12ea9 100644 --- a/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/ObjectStorageOptions.java +++ b/truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/ObjectStorageOptions.java @@ -24,7 +24,10 @@ import static com.oracle.truffle.api.object.Layout.OPTION_PREFIX; -public class ObjectStorageOptions { +public final class ObjectStorageOptions { + private ObjectStorageOptions() { + } + // Shape configuration /** Primitive location switch. */ public static boolean PrimitiveLocations = booleanOption(OPTION_PREFIX + "PrimitiveLocations", true);