Permalink
Browse files

Track changes in HLL library loading API.

  • Loading branch information...
1 parent 3d6959d commit e3d7404c384c971dd36a81849792eebfcff9ca26 @tene tene committed May 31, 2009
Showing with 5 additions and 7 deletions.
  1. +3 −3 cardinal.pir
  2. +2 −4 src/builtins/eval.pir
View
@@ -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
View
@@ -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

0 comments on commit e3d7404

Please sign in to comment.