-
-
Notifications
You must be signed in to change notification settings - Fork 924
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Truffle] Allow Rubinius primitives to be written entirely in Ruby wi…
…th Truffle::Primitive.install_rubinius_primitive
1 parent
e44e450
commit 051adb3
Showing
10 changed files
with
167 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
truffle/src/main/java/org/jruby/truffle/nodes/rubinius/ModulePrimitiveNodes.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
truffle/src/main/java/org/jruby/truffle/nodes/rubinius/RubiniusPrimitiveCallConstructor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2015 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: | ||
* | ||
* Eclipse Public License version 1.0 | ||
* GNU General Public License version 2 | ||
* GNU Lesser General Public License version 2.1 | ||
*/ | ||
package org.jruby.truffle.nodes.rubinius; | ||
|
||
import org.jruby.truffle.runtime.core.RubyModule; | ||
|
||
public class RubiniusPrimitiveCallConstructor implements RubiniusPrimitiveConstructor { | ||
|
||
private final RubyModule module; | ||
private final String method; | ||
|
||
public RubiniusPrimitiveCallConstructor(RubyModule module, String method) { | ||
this.module = module; | ||
this.method = method; | ||
} | ||
|
||
public RubyModule getModule() { | ||
return module; | ||
} | ||
|
||
public String getMethod() { | ||
return method; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
truffle/src/main/java/org/jruby/truffle/nodes/rubinius/RubiniusPrimitiveNodeConstructor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) 2015 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: | ||
* | ||
* Eclipse Public License version 1.0 | ||
* GNU General Public License version 2 | ||
* GNU Lesser General Public License version 2.1 | ||
*/ | ||
package org.jruby.truffle.nodes.rubinius; | ||
|
||
import com.oracle.truffle.api.dsl.NodeFactory; | ||
import org.jruby.truffle.nodes.RubyNode; | ||
|
||
public class RubiniusPrimitiveNodeConstructor implements RubiniusPrimitiveConstructor { | ||
|
||
private final RubiniusPrimitive annotation; | ||
private final NodeFactory<? extends RubyNode> factory; | ||
|
||
public RubiniusPrimitiveNodeConstructor(RubiniusPrimitive annotation, NodeFactory<? extends RubyNode> factory) { | ||
this.annotation = annotation; | ||
this.factory = factory; | ||
} | ||
|
||
public RubiniusPrimitive getAnnotation() { | ||
return annotation; | ||
} | ||
|
||
public NodeFactory<? extends RubyNode> getFactory() { | ||
return factory; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters