This file contains hidden or 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
private boolean updateEntrySet(BitSet entrySet, BitSet exitSet, | |
BitSet useBeforeDef, BitSet notDef) { | |
int card = entrySet.cardinality(); | |
entrySet.or(exitSet); | |
entrySet.and(notDef); | |
entrySet.or(useBeforeDef); | |
return entrySet.cardinality() != card; | |
} |
This file contains hidden or 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
case Do_getParamOrVarConst: | |
// Push name of parameter using another switch | |
// over paramAndVarCount | |
paramAndVarCount = n.getParamAndVarCount(); | |
boolean [] constness = n.getParamAndVarConst(); | |
if (paramAndVarCount == 0) { | |
// The runtime should never call the method in this | |
// case but to make bytecode verifier happy return null | |
// as throwing execption takes more code | |
cfw.add(ByteCode.ICONST_0); |
This file contains hidden or 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
function bench(x) { | |
for (var i = 0; i < 10000000; i++) { | |
x.foo = x.baz; | |
x.bar = x.mur; | |
x.dng = x.foo; | |
x.baz = x.bar; | |
x.mur = x.dng; | |
} | |
} |
This file contains hidden or 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
function bench(x) { | |
for (var i = 0; i < 10000000; i++) { | |
if (x.foo) x.baz; | |
if (x.bar) x.mur; | |
if (x.dng) x.foo; | |
if (x.baz) x.bar; | |
if (x.mur) x.dng; | |
} | |
} |
This file contains hidden or 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
$ java -version | |
java version "1.7.0" | |
Java(TM) SE Runtime Environment (build 1.7.0-b147) | |
Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode) | |
$ time ringo -J-client test/most.js | |
(...) | |
real 0m1.897s | |
user 0m2.140s | |
sys 0m0.156s |
This file contains hidden or 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
package jsr292.cookbook.lazyinit; | |
import sun.misc.BASE64Encoder; | |
import java.io.IOException; | |
import java.lang.invoke.CallSite; | |
import java.lang.invoke.MethodType; | |
import java.lang.invoke.MethodHandles.Lookup; | |
import java.nio.ByteBuffer; | |
import java.nio.file.Files; |
This file contains hidden or 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
// Pseudo code for a driver that enables doing asynchronous I/O using generators and promises. | |
// See the following URLs for actual code: | |
// https://github.com/hns/stick/blob/master/lib/stick/middleware/continuation.js | |
// https://github.com/hns/stick/blob/master/examples/continuation/app.js | |
// If app is a generator and yields promises, the result of those promises | |
// will be passed back into the generator as soon as they're resolved. | |
function handle(app, request) { |
This file contains hidden or 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
# run from the jack directory - adjust paths as necessary | |
java -cp ../rhino/js.jar:jars/simple-4.1.10.jar org.mozilla.javascript.tools.shell.Main \ | |
-modules ../narwhal/engines/rhino/lib/ -modules ../narwhal/engines/default/lib/ \ | |
-modules ../narwhal/lib/ -modules lib/ run-jack.js |
This file contains hidden or 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
Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(646,806),absolute(1092,919),button=1,modifiers=Button1,clickCount=1] on frame1 | |
java.lang.NullPointerException | |
at com.intellij.openapi.roots.ModuleRootManager.getInstance(ModuleRootManager.java:35) | |
at com.intellij.openapi.roots.CompilerModuleExtension.getInstance(CompilerModuleExtension.java:34) | |
at org.objectweb.asm.idea.ShowBytecodeOutlineAction.actionPerformed(ShowBytecodeOutlineAction.java:89) | |
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter$1.run(ActionMenuItem.java:242) | |
at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:645) | |
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:104) | |
at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:228) | |
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) |
This file contains hidden or 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
<% subskin content %> | |
<p>Logs for the <a href="irc://irc.freenode.net/ringojs">RingoJS IRC channel</a>, | |
as logged by <a href="http://github.com/earl/ringobot"><code>ringostarr</code></a>.</p> | |
<h1><% day %></h1> | |
<% for record in <% records %> render record %> | |
<% subskin record %> | |
<p class="utterance"> | |
<span class="time">[<% record.datetime | substring 11 16 %>]</span> |