Skip to content

Commit 60a68c5

Browse files
committed
Rename __dynamic_object_factory__ to the shorter __layout_allocate__
* Otherwise the Eclipse formatter goes wild and uses 4 lines for CoreMethod.
1 parent 14ae8d6 commit 60a68c5

34 files changed

+36
-36
lines changed

lib/truffle/truffle/cext.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ def rb_eval_string(str)
12811281
end
12821282

12831283
def rb_newobj_of(ruby_class)
1284-
ruby_class.__send__(:__dynamic_object_factory__)
1284+
ruby_class.__send__(:__layout_allocate__)
12851285
end
12861286

12871287
def rb_define_alloc_func(ruby_class, function)
@@ -1456,7 +1456,7 @@ def rb_nativethread_lock_destroy(lock)
14561456

14571457
def rb_data_object_wrap(ruby_class, data, mark, free)
14581458
ruby_class = Object unless ruby_class
1459-
object = ruby_class.__send__(:__dynamic_object_factory__)
1459+
object = ruby_class.__send__(:__layout_allocate__)
14601460
data_holder = DataHolder.new(data)
14611461
hidden_variable_set object, DATA_HOLDER, data_holder
14621462
ObjectSpace.define_finalizer object, data_finalizer(free, data_holder) unless free.nil?
@@ -1466,7 +1466,7 @@ def rb_data_object_wrap(ruby_class, data, mark, free)
14661466

14671467
def rb_data_typed_object_wrap(ruby_class, data, data_type, mark, free, size)
14681468
ruby_class = Object unless ruby_class
1469-
object = ruby_class.__send__(:__dynamic_object_factory__)
1469+
object = ruby_class.__send__(:__layout_allocate__)
14701470
data_holder = DataHolder.new(data)
14711471
hidden_variable_set object, :data_type, data_type
14721472
hidden_variable_set object, DATA_HOLDER, data_holder

src/main/java/org/truffleruby/core/array/ArrayNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
@CoreModule(value = "Array", isClass = true)
8787
public abstract class ArrayNodes {
8888

89-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
89+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
9090
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
9191

9292
@Child private AllocateObjectNode allocateNode = AllocateObjectNode.create();

src/main/java/org/truffleruby/core/basicobject/BasicObjectNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ protected Object send(VirtualFrame frame, Object self, Object name, Object[] arg
509509
// MRI names it the "allocator function" and it's associated per class and follows the ancestor
510510
// chain. We use a normal Ruby method, different that Class#allocate as Class#allocate
511511
// must be able to instantiate any Ruby object and should not be overridden.
512-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
512+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
513513
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
514514

515515
@Child private AllocateObjectNode allocateObjectNode = AllocateObjectNode.create();

src/main/java/org/truffleruby/core/binding/BindingNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ protected Object sourceLocation(DynamicObject binding,
391391
}
392392
}
393393

394-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
394+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
395395
public abstract static class AllocateNode extends UnaryCoreMethodNode {
396396

397397
@TruffleBoundary

src/main/java/org/truffleruby/core/encoding/EncodingConverterNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private int toJCodingFlags(int flags) {
147147

148148
}
149149

150-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
150+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
151151
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
152152

153153
@Child private AllocateObjectNode allocateNode = AllocateObjectNode.create();

src/main/java/org/truffleruby/core/encoding/EncodingNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ protected DynamicObject toS(DynamicObject encoding) {
439439

440440
}
441441

442-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
442+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
443443
public abstract static class AllocateNode extends UnaryCoreMethodNode {
444444

445445
@TruffleBoundary

src/main/java/org/truffleruby/core/exception/ExceptionNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public abstract class ExceptionNodes {
3737

3838
protected final static String CUSTOM_BACKTRACE_FIELD = "@custom_backtrace";
3939

40-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
40+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
4141
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
4242

4343
@Child private AllocateObjectNode allocateObjectNode = AllocateObjectNode.create();

src/main/java/org/truffleruby/core/exception/NameErrorNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
@CoreModule(value = "NameError", isClass = true)
2626
public abstract class NameErrorNodes {
2727

28-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
28+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
2929
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
3030

3131
@Child private AllocateObjectNode allocateObjectNode = AllocateObjectNode.create();

src/main/java/org/truffleruby/core/exception/NoMethodErrorNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@CoreModule(value = "NoMethodError", isClass = true)
2525
public abstract class NoMethodErrorNodes {
2626

27-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
27+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
2828
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
2929

3030
@Child private AllocateObjectNode allocateObjectNode = AllocateObjectNode.create();

src/main/java/org/truffleruby/core/exception/SystemCallErrorNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@CoreModule(value = "SystemCallError", isClass = true)
2525
public abstract class SystemCallErrorNodes {
2626

27-
@CoreMethod(names = {"__allocate__", "__dynamic_object_factory__"}, constructor = true, visibility = Visibility.PRIVATE)
27+
@CoreMethod(names = { "__allocate__", "__layout_allocate__" }, constructor = true, visibility = Visibility.PRIVATE)
2828
public abstract static class AllocateNode extends CoreMethodArrayArgumentsNode {
2929

3030
@Child private AllocateObjectNode allocateObjectNode = AllocateObjectNode.create();

0 commit comments

Comments
 (0)