Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.ruby.nodes/src/com/oracle/truffle/ruby/nodes/core/KernelNodes.java @ 13645:497fada09efb
Ruby: remove versioning.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Wed, 15 Jan 2014 19:27:27 +0000 |
parents | 0fbee3eb71f0 |
children | 62bfc12dc9e1 |
comparison
equal
deleted
inserted
replaced
13640:bfe7a8c8c3c6 | 13645:497fada09efb |
---|---|
23 import com.oracle.truffle.ruby.nodes.cast.*; | 23 import com.oracle.truffle.ruby.nodes.cast.*; |
24 import com.oracle.truffle.ruby.nodes.control.*; | 24 import com.oracle.truffle.ruby.nodes.control.*; |
25 import com.oracle.truffle.ruby.nodes.literal.*; | 25 import com.oracle.truffle.ruby.nodes.literal.*; |
26 import com.oracle.truffle.ruby.nodes.yield.*; | 26 import com.oracle.truffle.ruby.nodes.yield.*; |
27 import com.oracle.truffle.ruby.runtime.*; | 27 import com.oracle.truffle.ruby.runtime.*; |
28 import com.oracle.truffle.ruby.runtime.configuration.*; | |
29 import com.oracle.truffle.ruby.runtime.control.*; | 28 import com.oracle.truffle.ruby.runtime.control.*; |
30 import com.oracle.truffle.ruby.runtime.core.*; | 29 import com.oracle.truffle.ruby.runtime.core.*; |
31 import com.oracle.truffle.ruby.runtime.core.array.*; | 30 import com.oracle.truffle.ruby.runtime.core.array.*; |
32 import com.oracle.truffle.ruby.runtime.objects.*; | 31 import com.oracle.truffle.ruby.runtime.objects.*; |
33 import com.oracle.truffle.ruby.runtime.subsystems.*; | 32 import com.oracle.truffle.ruby.runtime.subsystems.*; |
532 return toS.dispatch(frame, self, null); | 531 return toS.dispatch(frame, self, null); |
533 | 532 |
534 } | 533 } |
535 } | 534 } |
536 | 535 |
537 @CoreMethod(names = "proc", isModuleMethod = true, needsBlock = true, maxArgs = 0, versions = RubyVersion.RUBY_18) | 536 @CoreMethod(names = "proc", isModuleMethod = true, needsBlock = true, maxArgs = 0) |
538 public abstract static class Proc18Node extends CoreMethodNode { | |
539 | |
540 public Proc18Node(RubyContext context, SourceSection sourceSection) { | |
541 super(context, sourceSection); | |
542 } | |
543 | |
544 public Proc18Node(Proc18Node prev) { | |
545 super(prev); | |
546 } | |
547 | |
548 @Specialization | |
549 public RubyProc proc(Object self, RubyProc block) { | |
550 return new RubyProc(getContext().getCoreLibrary().getProcClass(), RubyProc.Type.LAMBDA, self, block, block.getMethod()); | |
551 | |
552 } | |
553 } | |
554 | |
555 @CoreMethod(names = "proc", isModuleMethod = true, needsBlock = true, maxArgs = 0, versions = {RubyVersion.RUBY_19, RubyVersion.RUBY_20, RubyVersion.RUBY_21}) | |
556 public abstract static class ProcNode extends CoreMethodNode { | 537 public abstract static class ProcNode extends CoreMethodNode { |
557 | 538 |
558 public ProcNode(RubyContext context, SourceSection sourceSection) { | 539 public ProcNode(RubyContext context, SourceSection sourceSection) { |
559 super(context, sourceSection); | 540 super(context, sourceSection); |
560 } | 541 } |