Skip to content

Instantly share code, notes, and snippets.

@YujiSoftware
YujiSoftware / liveness_failure.asm
Last active December 11, 2015 19:28
Effective Java の「項目66 共有された可変データへのアクセスを同期する」で、活性エラーについて記載があります。 この現象が起こった時の x86 アセンブリコードを見てみました。 http://d.hatena.ne.jp/chiheisen/20130127/1359290291
{method}
VM option '+PrintOptoAssembly'
- klass: {other class}
- this oop: 0x10251ed8
- method holder: 'StopThread'
- constants: 0x10251b00 constant pool [53] for 'StopThread' cache=0x10252108
- access: 0x81001008 static synthetic
- name: 'access$0'
- signature: '()Z'
- max stack: 1
@YujiSoftware
YujiSoftware / AbstractShiritori.java
Created January 19, 2012 15:30
Java7 の Fork/Join を使ったしりとりと、普通の再帰を使ったしりとりです。
package jp.chiheisen.shiritori.impl;
import java.util.Collection;
import java.util.List;
import jp.chiheisen.shiritori.Shiritori;
public abstract class AbstractShiritori implements Shiritori{
@Override
@YujiSoftware
YujiSoftware / MaxConstArrayTest.java
Created January 8, 2012 14:58
Source crashes eclipse.
public class MaxConstArrayTest {
public static String[] MAX_CONST_ARRAY = new String[]{
"⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔", "⇔"
@YujiSoftware
YujiSoftware / MaxConstArrayTest.java
Created January 7, 2012 16:22
定数配列を限界の長さちょうどで初期化しました。これより一つでも配列を大きくすると、コンパイルエラーです。
public class MaxConstArrayTest {
public static String[] MAX_CONST_ARRAY = new String[]{
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "", "", "",
@YujiSoftware
YujiSoftware / FF7.java
Created June 13, 2011 15:55
FINAL FANTASY 7
package ff;
public class FF7 {
private static final Fantasy VII = new Cloud("興味ないね");
public static interface Fantasy {
}
public static class Sephiroth implements Fantasy {