فهرست منبع

Fix a couple of inaccurate comments in cfg_ir.py

jonathanvdc 8 سال پیش
والد
کامیت
45ca3610e4
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      kernel/modelverse_jit/cfg_ir.py
  2. 1 1
      kernel/modelverse_kernel/request_handler.py

+ 2 - 2
kernel/modelverse_jit/cfg_ir.py

@@ -1078,7 +1078,7 @@ def get_directly_reachable_blocks(block):
 
 
 def get_reachable_blocks(entry_point):
 def get_reachable_blocks(entry_point):
     """Constructs the set of all reachable vertices from the given block."""
     """Constructs the set of all reachable vertices from the given block."""
-    # This is a simple O(n^2) algorithm. Maybe a faster algorithm is more appropriate here.
+    # This is a simple O(n) algorithm.
     def __add_block_children(block, results):
     def __add_block_children(block, results):
         for child in get_directly_reachable_blocks(block):
         for child in get_directly_reachable_blocks(block):
             if child not in results:
             if child not in results:
@@ -1092,7 +1092,7 @@ def get_reachable_blocks(entry_point):
 def get_all_reachable_blocks(entry_point):
 def get_all_reachable_blocks(entry_point):
     """Constructs the set of all reachable vertices, for every block that is
     """Constructs the set of all reachable vertices, for every block that is
        reachable from the given entry point."""
        reachable from the given entry point."""
-    # This is a simple O(n^3) algorithm. Maybe a faster algorithm is more appropriate here.
+    # This is a simple O(n^2) algorithm. Maybe a faster algorithm is more appropriate here.
     results = {}
     results = {}
     all_blocks = get_reachable_blocks(entry_point)
     all_blocks = get_reachable_blocks(entry_point)
     results[entry_point] = all_blocks
     results[entry_point] = all_blocks

+ 1 - 1
kernel/modelverse_kernel/request_handler.py

@@ -66,7 +66,7 @@ class RequestHandler(object):
         # (generator_stack index, [(exception type, handler function)])
         # (generator_stack index, [(exception type, handler function)])
         # tuples.
         # tuples.
         self.exception_handlers = []
         self.exception_handlers = []
-        self.produce_stack_trace = True
+        self.produce_stack_trace = False
         self.handlers = {
         self.handlers = {
             'CALL' : self.execute_call,
             'CALL' : self.execute_call,
             'CALL_ARGS' : self.execute_call_args,
             'CALL_ARGS' : self.execute_call_args,