Skip to content

Commit

Permalink
[Truffle] Fixing if statement spacing in Array#pop
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish committed Mar 21, 2015
1 parent 9adef06 commit 412f0ad
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
Expand Up @@ -2685,7 +2685,7 @@ public Object popNilWithNum(VirtualFrame frame, RubyArray array, Object object)

@Specialization(guards = "isIntegerFixnum", rewriteOn = UnexpectedResultException.class)
public RubyArray popIntegerFixnumInBoundsWithNum(VirtualFrame frame, RubyArray array, int num) throws UnexpectedResultException {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2704,7 +2704,7 @@ public RubyArray popIntegerFixnumInBoundsWithNum(VirtualFrame frame, RubyArray a

@Specialization(contains = "popIntegerFixnumInBoundsWithNum", guards = "isIntegerFixnum")
public Object popIntegerFixnumWithNum(VirtualFrame frame, RubyArray array, int num) {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2723,7 +2723,7 @@ public Object popIntegerFixnumWithNum(VirtualFrame frame, RubyArray array, int n

@Specialization(guards = "isLongFixnum", rewriteOn = UnexpectedResultException.class)
public RubyArray popLongFixnumInBoundsWithNum(VirtualFrame frame, RubyArray array, int num) throws UnexpectedResultException {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2742,7 +2742,7 @@ public RubyArray popLongFixnumInBoundsWithNum(VirtualFrame frame, RubyArray arra

@Specialization(contains = "popLongFixnumInBoundsWithNum", guards = "isLongFixnum")
public Object popLongFixnumWithNum(VirtualFrame frame, RubyArray array, int num) {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2760,7 +2760,7 @@ public Object popLongFixnumWithNum(VirtualFrame frame, RubyArray array, int num)

@Specialization(guards = "isFloat", rewriteOn = UnexpectedResultException.class)
public RubyArray popFloatInBoundsWithNum(VirtualFrame frame, RubyArray array, int num) throws UnexpectedResultException {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2778,7 +2778,7 @@ public RubyArray popFloatInBoundsWithNum(VirtualFrame frame, RubyArray array, in

@Specialization(contains = "popFloatInBoundsWithNum", guards = "isFloat")
public Object popFloatWithNum(VirtualFrame frame, RubyArray array, int num) {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2796,7 +2796,7 @@ public Object popFloatWithNum(VirtualFrame frame, RubyArray array, int num) {

@Specialization(guards = "isObject")
public Object popObjectWithNum(VirtualFrame frame, RubyArray array, int num) {
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2820,7 +2820,7 @@ public RubyArray popIntegerFixnumInBoundsWithNumObj(VirtualFrame frame, RubyArra
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2844,7 +2844,7 @@ public Object popIntegerFixnumWithNumObj(VirtualFrame frame, RubyArray array, Ob
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2868,7 +2868,7 @@ public RubyArray popLongFixnumInBoundsWithNumObj(VirtualFrame frame, RubyArray a
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2892,7 +2892,7 @@ public Object popLongFixnumWithNumObj(VirtualFrame frame, RubyArray array, Objec
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2915,7 +2915,7 @@ public RubyArray popFloatInBoundsWithNumObj(VirtualFrame frame, RubyArray array,
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2938,7 +2938,7 @@ public Object popFloatWithNumObj(VirtualFrame frame, RubyArray array, Object obj
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand All @@ -2961,7 +2961,7 @@ public Object popObjectWithNumObj(VirtualFrame frame, RubyArray array, Object ob
toIntNode = insert(ToIntNodeFactory.create(getContext(), getSourceSection(), null));
}
final int num = toIntNode.executeIntegerFixnum(frame, object);
if(num < 0){
if (num < 0) {
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().argumentError("negative array size", this));
}
Expand Down

0 comments on commit 412f0ad

Please sign in to comment.