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
| typedef unsigned long rb_value_t; | |
| typedef unsigned long rb_id_t; | |
| typedef unsigned long st_data_t; | |
| struct st_table_entry { | |
| unsigned int hash; | |
| st_data_t key; | |
| st_data_t record; | |
| caddr_t next; | |
| }; |
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
| pid$target::st_lookup:entry { | |
| self->arg2 = arg2; | |
| printf("\nKey %d, value %d\n", arg1, *(uint32_t *)copyin(self->arg2, 4)); | |
| } |
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
| require 'rubygems' | |
| require 'ffi' | |
| module Aio | |
| extend FFI::Library | |
| READ_CALLBACK = Proc.new do |sigval| | |
| req = sigval.sival_ptr | |
| if aio_error( req ) == 0 | |
| ret = aio_return( req ); |
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
| Sampling process 3522 for 3 seconds with 1 millisecond of run time between samples | |
| Sampling completed, processing symbols... | |
| Analysis of sampling ruby (pid 3522) every 1 millisecond | |
| Call graph: | |
| 2185 Thread_2507 | |
| 2185 start | |
| 2185 main | |
| 2185 ruby_run_node | |
| 2185 ruby_exec_node | |
| 2185 rb_iseq_eval_main |
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
| void | |
| rb_include_module(klass, module) | |
| VALUE klass, module; | |
| { | |
| VALUE p, c; | |
| int changed = 0; | |
| rb_frozen_class_p(klass); | |
| if (!OBJ_TAINTED(klass)) { | |
| rb_secure(4); |
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
| VALUE | |
| rb_hash_aref(hash, key) | |
| VALUE hash, key; | |
| { | |
| VALUE val; | |
| if (!st_lookup(RHASH(hash)->tbl, key, &val)) { | |
| return rb_funcall(hash, id_default, 1, key); | |
| } | |
| return val; |
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
| /* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ | |
| /* @(#) st.h 5.1 89/12/14 */ | |
| #ifndef RUBY_ST_H | |
| #define RUBY_ST_H 1 | |
| #if defined(__cplusplus) | |
| extern "C" { | |
| #if 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
| /* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ | |
| /* @(#) st.h 5.1 89/12/14 */ | |
| #ifndef ST_INCLUDED | |
| #define ST_INCLUDED | |
| #if SIZEOF_LONG == SIZEOF_VOIDP | |
| typedef unsigned long st_data_t; |
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
| static void | |
| gc_mark(ptr, lev) | |
| VALUE ptr; | |
| int lev; | |
| { | |
| register RVALUE *obj; | |
| obj = RANY(ptr); | |
| if (rb_special_const_p(ptr)) return; /* special const not marked */ | |
| if (obj->as.basic.flags == 0) return; /* free cell */ |
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
| VALUE | |
| rb_str_buf_new(capa) | |
| long capa; | |
| { | |
| VALUE str = str_alloc(rb_cString); | |
| if (capa < STR_BUF_MIN_SIZE) { | |
| capa = STR_BUF_MIN_SIZE; | |
| } | |
| RSTRING(str)->ptr = 0; |