]> gitweb.factorcode.org Git - factor.git/commitdiff
VM: changing case of code_block_type
authorBjörn Lindqvist <bjourne@gmail.com>
Wed, 19 Oct 2016 07:14:58 +0000 (09:14 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Wed, 19 Oct 2016 07:14:58 +0000 (09:14 +0200)
vm/code_blocks.cpp
vm/code_blocks.hpp
vm/code_heap.cpp
vm/inline_cache.cpp
vm/layouts.hpp
vm/quotations.hpp

index 89ea0a3605837adda15e71187806b2a4d464cd8c..309b2967efe2cc0def5bc4c4380f792c49ac54f6 100644 (file)
@@ -47,7 +47,7 @@ cell code_block::owner_quot() const {
 // scan offset. In all other cases -1 is returned.
 // Allocates memory (quot_code_offset_to_scan)
 cell code_block::scan(factor_vm* vm, cell addr) const {
-  if (type() != code_block_unoptimized) {
+  if (type() != CODE_BLOCK_UNOPTIMIZED) {
     return tag_fixnum(-1);
   }
 
index acc90f7e95e083a3739b77836054f591987efa15..e1fb735191b9d53757141134603775092f4abc2f 100644 (file)
@@ -25,9 +25,9 @@ struct code_block {
     header = ((header & ~0x7) | (type << 1));
   }
 
-  bool pic_p() const { return type() == code_block_pic; }
+  bool pic_p() const { return type() == CODE_BLOCK_PIC; }
 
-  bool optimized_p() const { return type() == code_block_optimized; }
+  bool optimized_p() const { return type() == CODE_BLOCK_OPTIMIZED; }
 
   cell size() const {
     cell size;
index 80d550b2f94f1aade7f8ec60676a548a13ef8629..23a28c07f3240c0478f25d4448e8d490b4d5e744 100644 (file)
@@ -151,7 +151,7 @@ void factor_vm::primitive_modify_code_heap() {
         cell frame_size = untag_fixnum(array_nth(compiled_data, 5));
 
         code_block* compiled =
-            add_code_block(code_block_optimized, code, labels, word.value(),
+            add_code_block(CODE_BLOCK_OPTIMIZED, code, labels, word.value(),
                            relocation, parameters, literals, frame_size);
 
         word->entry_point = compiled->entry_point();
index 3a5d72173320c2e250cf774bd61c43514119fc54..186a905afe51407c28d1adfd998633af83448107 100644 (file)
@@ -33,7 +33,7 @@ void factor_vm::update_pic_count(cell type) {
 
 struct inline_cache_jit : public jit {
   inline_cache_jit(cell generic_word, factor_vm* vm)
-      : jit(code_block_pic, generic_word, vm) {}
+      : jit(CODE_BLOCK_PIC, generic_word, vm) {}
 
   void emit_check_and_jump(cell ic_type, cell i, cell klass, cell method);
   void emit_inline_cache(fixnum index, cell generic_word_, cell methods_,
index 13856b2e63db925fd6334833774aa39e4be19125..7975f4ca92c1c5c8a8257e40d96d0102cb1e1de8 100644 (file)
@@ -76,9 +76,9 @@ static inline const char* type_name(cell type) {
 }
 
 enum code_block_type {
-  code_block_unoptimized,
-  code_block_optimized,
-  code_block_pic
+  CODE_BLOCK_UNOPTIMIZED,
+  CODE_BLOCK_OPTIMIZED,
+  CODE_BLOCK_PIC
 };
 
 // Constants used when floating-point trap exceptions are thrown
index ea4e6e8f4c749b0fa944edfc073fc6b39ef83456..ae76e02d6560736023a6d13c0dcabf754a3e3d91 100644 (file)
@@ -6,7 +6,7 @@ struct quotation_jit : public jit {
 
   // Allocates memory
   quotation_jit(cell owner, bool compiling, bool relocate, factor_vm* vm)
-      : jit(code_block_unoptimized, owner, vm),
+      : jit(CODE_BLOCK_UNOPTIMIZED, owner, vm),
         elements(false_object, vm),
         compiling(compiling),
         relocate(relocate) {}