Permalink
Browse files

Implement new R15 DTrace bifs

  • Loading branch information...
1 parent b62dbb5 commit 64499b23e695b212b446d9232d6415470b54edfd @krestenkrab krestenkrab committed Mar 22, 2013
Showing with 30 additions and 0 deletions.
  1. +30 −0 src/main/java/erjang/m/erlang/ErlBif.java
@@ -2007,4 +2007,34 @@ public static ESeq registered() {
public static EAtom breakpoint() {
return ERT.am_ok;
}
+
+ @BIF
+ public static EObject dt_spread_tag(EAtom bool) {
+ return new ETuple2(ERT.box(0), ERT.NIL);
+ }
+
+ @BIF
+ public static EObject dt_append_vm_tag_data(EObject val) {
+ return val;
+ }
+
+ @BIF
+ public static EObject dt_prepend_vm_tag_data(EObject o) {
+ return o;
+ }
+
+ @BIF
+ public static EObject dt_restore_tag(EObject val) {
+ return val;
+ }
+
+ @BIF
+ public static EAtom check_old_code(EObject obj) {
+ EAtom module = obj.testAtom();
+ if (module == null)
+ throw ERT.badarg(obj);
+
+ boolean result = EModuleManager.module_loaded(module);
+ return ERT.box(result);
+ }
}

0 comments on commit 64499b2

Please sign in to comment.