Skip to content

Instantly share code, notes, and snippets.

View syoyo's full-sized avatar
💗
ray tracing

Syoyo Fujita syoyo

💗
ray tracing
View GitHub Profile
define void @matte() nounwind {
%tmp1.i = load <4 x float>* @genv.2, align 32 ; <<4 x float>> [#uses=1]
store <4 x float> %tmp1.i, <4 x float>* @genv.0, align 32
ret void
}
_func:
pushl %ebp
movl $1000, %eax
movl %esp, %ebp
.align 4,0x90
L2:
decl %eax
jne L2
leave
ret
; ModuleID = '<stdin>'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin9"
define i32 @func(...) nounwind readnone {
entry:
br label %for.inc
for.inc: ; preds = %for.inc, %entry
%i.0.reg2mem.0 = phi float [ 0.000000e+00, %entry ], [ %add, %for.inc ]; <float> [#uses=1]
# -- Begin func
# mark_begin;
.align 2,0x90
.globl func
func:
..B1.1: # Preds ..B1.0
ret #8.1
.align 2,0x90
# LOE
# mark_end;
module Main where
data Expr =
Const Int
| Var String
| Add Expr Expr
deriving (Show, Eq)
data Stmt =
Let Expr Expr
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import Data.Generics
data Expr =
Const Int
| Var String
| Add Expr Expr
class vec
{
float x, y, z;
vec(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
}
/* --- main.c --- */
int func() {
printf("muda\n");
}
int main() {
// JIT compile muda.c and execute dora() here.
##RenderMan RIB-Structure 1.0
version 3.03
Option "searchpath" "shader" ".:&"
Display "muda.tif" "file" "rgb"
Format 256 256 1
WorldBegin
Surface "bora"
PointsPolygons [ 4 ] [ 0 3 2 1 ] "P" [ 0.500000 0.500000 0.500000 0.500000 -0.500000 0.500000 -0.500000 -0.500000 0.500000 -0.500000 0.500000 0.500000 ]
"s" [0.0 1.0 1.0 0.0]
"t" [0.0 0.0 1.0 1.0]
##RenderMan RIB-Structure 1.0
version 3.03
Option "searchpath" "shader" ".:&"
Display "muda.tif" "file" "rgb"
Format 256 256 1
WorldBegin
Surface "bora"
PointsPolygons [ 4 ] [ 0 3 2 1 ] "P" [ 0.500000 0.500000 0.500000 0.500000 -0.500000 0.500000 -0.500000 -0.500000 0.500000 -0.500000 0.500000 0.500000 ]
"facevarying float s" [0.0 1.0 1.0 0.0]
"facevarying float t" [0.0 0.0 1.0 1.0]