Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf35c9e42f13
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bde25d29132b
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 13, 2014

  1. Copy the full SHA
    bde25d2 View commit details
Showing with 21 additions and 0 deletions.
  1. +21 −0 core/src/main/java/org/jruby/truffle/nodes/core/BindingNodes.java
21 changes: 21 additions & 0 deletions core/src/main/java/org/jruby/truffle/nodes/core/BindingNodes.java
Original file line number Diff line number Diff line change
@@ -38,4 +38,25 @@ public Object localVariableGet(RubyBinding binding, RubySymbol symbol) {
}
}

@CoreMethod(names = "local_variable_set", required = 2)
public abstract static class LocalVariableSetNode extends CoreMethodNode {

public LocalVariableSetNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public LocalVariableSetNode(LocalVariableSetNode prev) {
super(prev);
}

@Specialization
public Object localVariableSetNode(RubyBinding binding, RubySymbol symbol, Object value) {
notDesignedForCompilation();

final MaterializedFrame frame = binding.getFrame();
frame.setObject(frame.getFrameDescriptor().findFrameSlot(symbol.toString()), value);
return value;
}
}

}