Permalink
Browse files

Add inlining of ##string->symbol to universal backend

  • Loading branch information...
1 parent 04f241b commit 182604ecd3f0a4cd292323555bb051d7f02cdf3b @feeley feeley committed Feb 21, 2014
Showing with 7 additions and 2 deletions.
  1. +6 −1 gsc/_t-univ.scm
  2. +1 −1 include/stamp.h
View
@@ -7839,13 +7839,18 @@ tanh
;;TODO: ("##type-super" (1) #f () 0 #f extended)
;;TODO: ("##type-fields" (1) #f () 0 #f extended)
-;; TODO: test ##symbol->string primitive
+;; TODO: test ##symbol->string primitive and ##string->symbol primitive
(univ-define-prim "##symbol->string" #f
(make-translated-operand-generator
(lambda (ctx return arg1)
(return (^string-box (^symtostr (^symbol-unbox arg1)))))))
+(univ-define-prim "##string->symbol" #f
+ (make-translated-operand-generator
+ (lambda (ctx return arg1)
+ (return (^symbol-box (^tostr arg1))))))
+
;;TODO: ("##keyword->string" (1) #f () 0 string extended)
;;TODO: ("##closure-length" (1) #f () 0 fixnum extended)
View
@@ -3,4 +3,4 @@
*/
#define ___STAMP_YMD 20140221
-#define ___STAMP_HMS 171339
+#define ___STAMP_HMS 171448

0 comments on commit 182604e

Please sign in to comment.