Created
January 28, 2014 03:57
-
-
Save waywardmonkeys/8662025 to your computer and use it in GitHub Desktop.
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
D Kalloc_testVobjc_test_suiteI () { | |
D c_; | |
D s_; | |
D T3; | |
DWORD T4; | |
DWORD T5; | |
DWORD T6; | |
D o_; | |
D T8_0; | |
D T9; | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:66 | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:67 | |
c_ = KobjcSget_classVobjcI(&K33); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:68 | |
s_ = KobjcSregister_selectorVobjcI(&K34); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:71 | |
T3 = CALL1(&Kraw_classVobjc, c_); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:71 | |
T4 = primitive_unwrap_machine_word(T3); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:72 | |
T9 = SLOT_VALUE_INITD(s_, 0); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:72 | |
T5 = primitive_unwrap_machine_word(T9); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:71 | |
T6 = ((DWORD(*)(DWORD, DWORD))objc_msgSend)(T4, T5); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:70 | |
o_ = primitive_wrap_machine_word(T6); | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:77 | |
T8_0 = o_; | |
// /Users/bruce/Development/dylan/objc-dylan/tests/objc-test-suite.dylan:66 | |
MV_SET_COUNT(1); | |
return(T8_0); | |
} |
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
METHOD alloc-test () => (o :: <machine-word>) | |
{{ c }} := [CALLi ^{<&method> objc/get-class (<string>)}(^"NSObject")] | |
{{ s }} := [CALLi ^{<&method> objc/register-selector (<string>)}(^"alloc")] | |
t5 := [CALLg ^{<&generic> raw-class}({{ c }})] | |
t6 := [PRIMOP unwrap-machine-word(t5)] | |
t14 := SLOT-VALUE-INITD({{ s }}, raw-selector) | |
t8 := [PRIMOP unwrap-machine-word(t14)] | |
t9 := [PRIMOP objc_msgSend(t6, t8)] | |
{{ o }} := [PRIMOP wrap-machine-word(t9)] | |
*t12(1) := [VALUES {{ o }}] | |
return *t12(1) | |
END |
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
define function alloc-test () => (o :: <machine-word>) | |
let c = objc/get-class("NSObject"); | |
let s = objc/register-selector("alloc"); | |
let o | |
= primitive-wrap-machine-word | |
(%objc-msgsend (primitive-unwrap-machine-word(c.raw-class), | |
primitive-unwrap-machine-word(s.raw-selector)) | |
() | |
=> (obj :: <raw-machine-word>) | |
() | |
end); | |
o | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment