]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/dispatch.cpp
Put brackets around ipv6 addresses in `inet6 present`
[factor.git] / vm / dispatch.cpp
index f1a4dd8acdf09f3241574fd97aada77c64684ef0..810f5eb83ee79543c3a0826378316cbc789b9d82 100644 (file)
@@ -82,7 +82,7 @@ cell factor_vm::object_class(cell obj) {
   return tag_fixnum(tag);
 }
 
-cell factor_vm::method_cache_hashcode(cell klass, array* array) {
+static cell method_cache_hashcode(cell klass, array* array) {
   cell capacity = (array_capacity(array) >> 1) - 1;
   return ((klass >> TAG_BITS) & capacity) << 1;
 }
@@ -114,35 +114,9 @@ void factor_vm::primitive_reset_dispatch_stats() {
   memset(&dispatch_stats, 0, sizeof(dispatch_statistics));
 }
 
-/* Allocates memory */
+// Allocates memory
 void factor_vm::primitive_dispatch_stats() {
   ctx->push(tag<byte_array>(byte_array_from_value(&dispatch_stats)));
 }
 
-/* Allocates memory */
-void quotation_jit::emit_mega_cache_lookup(cell methods_, fixnum index,
-                                           cell cache_) {
-  data_root<array> methods(methods_, parent);
-  data_root<array> cache(cache_, parent);
-
-  /* The object must be on the top of the datastack at this point. */
-
-  /* Do a cache lookup. */
-  emit_with_literal(parent->special_objects[MEGA_LOOKUP], cache.value());
-
-  /* If we end up here, the cache missed. */
-  emit(parent->special_objects[JIT_PROLOG]);
-
-  /* Push index, method table and cache on the stack. */
-  push(methods.value());
-  push(tag_fixnum(index));
-  push(cache.value());
-  word_call(parent->special_objects[MEGA_MISS_WORD]);
-
-  /* Now the new method has been stored into the cache, and its on
-     the stack. */
-  emit(parent->special_objects[JIT_EPILOG]);
-  emit(parent->special_objects[JIT_EXECUTE]);
-}
-
 }