Skip to content

Commit

Permalink
Track changes in HLL library loading API.
Browse files Browse the repository at this point in the history
  • Loading branch information
tene committed May 31, 2009
1 parent 3d6959d commit e3d7404
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cardinal.pir
Expand Up @@ -108,10 +108,10 @@ to the cardinal compiler.
iter_end:
.end
.sub 'fetch-library' :method
.param pmc request
.sub 'load_library' :method
.param pmc name
.param pmc request :named :slurpy
.local pmc name, retval, library, inc_hash
name = request['name']
$S0 = join '/', name
retval = 'require'($S0, 'module'=>1)
if null retval goto fail
Expand Down
6 changes: 2 additions & 4 deletions src/builtins/eval.pir
Expand Up @@ -139,15 +139,13 @@ such as C<eval>, C<require>, and C<use>.
.sub 'foreign_load'
.param string lang
.param string module
.local pmc compiler, request, library, imports, callerns
.local pmc compiler, library, imports, callerns
$P0 = getinterp
callerns = $P0['namespace';1]
'load-language'(lang)
compiler = compreg lang
request = new 'Hash'
$P0 = split '/', module
request['name'] = $P0
library = compiler.'fetch-library'(request)
library = compiler.'load_library'($P0)
imports = library['symbols']
imports = imports['DEFAULT']
.local pmc iter, item
Expand Down

0 comments on commit e3d7404

Please sign in to comment.