Skip to content

Commit

Permalink
Showing 6 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016 Oracle and/or its affiliates. All rights reserved. This
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
@@ -20,10 +20,8 @@

public class SnippetIfNoBlockNode extends RubyNode {

@Child
private RubyNode method;
@Child
private SnippetNode snippetNode;
@Child private RubyNode method;
@Child private SnippetNode snippetNode;
private final ConditionProfile noBlockProfile = ConditionProfile.createBinaryProfile();
private final String snippet;

Original file line number Diff line number Diff line change
@@ -95,14 +95,14 @@
import static org.jruby.truffle.core.array.ArrayHelpers.getSize;
import static org.jruby.truffle.core.array.ArrayHelpers.getStore;
import static org.jruby.truffle.core.array.ArrayHelpers.setStoreAndSize;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_DELETE_IF_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_EACH_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_EACH_WITH_INDEX_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_MAP_BANG_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_MAP_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_REJECT_BANG_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_REJECT_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.ARRAY_SELECT_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_DELETE_IF_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_EACH_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_EACH_WITH_INDEX_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_MAP_BANG_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_MAP_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_REJECT_BANG_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_REJECT_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.ARRAY_SELECT_TO_ENUM;

@CoreClass("Array")
public abstract class ArrayNodes {
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@
import java.util.Arrays;
import java.util.Map;

import static org.jruby.truffle.core.rubinius.RubiniusSnippets.HASH_EACH_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.HASH_EACH_TO_ENUM;

@CoreClass("Hash")
public abstract class HashNodes {
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
import org.jruby.truffle.language.objects.AllocateObjectNode;
import org.jruby.truffle.language.objects.AllocateObjectNodeGen;

import static org.jruby.truffle.core.rubinius.RubiniusSnippets.RANGE_EACH_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.RANGE_EACH_TO_ENUM;

@CoreClass("Range")
public abstract class RangeNodes {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. This
* Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
* code is released under a tri EPL/GPL/LGPL license. You can use it,
* redistribute it and/or modify it under the terms of the:
*
@@ -36,7 +36,7 @@
*/
package org.jruby.truffle.core.rubinius;

public abstract class RubiniusSnippets {
public abstract class ToEnumSnippets {
public static final String ARRAY_DELETE_IF_TO_ENUM = "to_enum(:delete_if) { size }";
public static final String ARRAY_EACH_TO_ENUM = "to_enum(:each) { size }";
public static final String ARRAY_EACH_WITH_INDEX_TO_ENUM = "to_enum(:each_with_index) { size }";
Original file line number Diff line number Diff line change
@@ -151,8 +151,8 @@
import java.util.Arrays;
import java.util.List;
import static org.jruby.truffle.core.rope.RopeConstants.EMPTY_ASCII_8BIT_ROPE;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.STRING_EACH_BYTE_TO_ENUM;
import static org.jruby.truffle.core.rubinius.RubiniusSnippets.STRING_EACH_CHAR_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.STRING_EACH_BYTE_TO_ENUM;
import static org.jruby.truffle.core.rubinius.ToEnumSnippets.STRING_EACH_CHAR_TO_ENUM;
import static org.jruby.truffle.core.string.StringOperations.encoding;
import static org.jruby.truffle.core.string.StringOperations.rope;

0 comments on commit 348b690

Please sign in to comment.