=== modified file 'includes/module.inc'
--- includes/module.inc	2010-10-03 02:04:55 +0000
+++ includes/module.inc	2010-11-24 01:39:24 +0000
@@ -611,9 +611,7 @@ function module_implements($hook, $sort 
   if ($reset) {
     $implementations = array();
     cache_set('module_implements', array(), 'cache_bootstrap');
-    drupal_static_reset('module_hook_info');
     drupal_static_reset('drupal_alter');
-    cache_clear_all('hook_info', 'cache_bootstrap');
     return;
   }
 
@@ -632,13 +630,11 @@ function module_implements($hook, $sort 
     // The hook is not cached, so ensure that whether or not it has
     // implementations, that the cache is updated at the end of the request.
     $implementations['#write_cache'] = TRUE;
-    $hook_info = module_hook_info();
     $implementations[$hook] = array();
     $list = module_list(FALSE, FALSE, $sort);
     foreach ($list as $module) {
-      $include_file = isset($hook_info[$hook]['group']) && module_load_include('inc', $module, $module . '.' . $hook_info[$hook]['group']);
       if (module_hook($module, $hook)) {
-        $implementations[$hook][$module] = $include_file ? $hook_info[$hook]['group'] : FALSE;
+        $implementations[$hook][$module] = $module;
       }
     }
     // Allow modules to change the weight of specific implementations but avoid
@@ -648,12 +644,7 @@ function module_implements($hook, $sort 
     }
   }
   else {
-    foreach ($implementations[$hook] as $module => $group) {
-      // If this hook implementation is stored in a lazy-loaded file, so include
-      // that file first.
-      if ($group) {
-        module_load_include('inc', $module, "$module.$group");
-      }
+    foreach ($implementations[$hook] as $module) {
       // It is possible that a module removed a hook implementation without the
       // implementations cache being rebuilt yet, so we check module_hook() on
       // each request to avoid undefined function errors.
@@ -670,44 +661,6 @@ function module_implements($hook, $sort 
 }
 
 /**
- * Retrieve a list of what hooks are explicitly declared.
- */
-function module_hook_info() {
-  $hook_info = &drupal_static(__FUNCTION__, array());
-
-  if (empty($hook_info)) {
-    $cache = cache_get('hook_info', 'cache_bootstrap');
-    if ($cache === FALSE) {
-      // Rebuild the cache and save it.
-      // We can't use module_invoke_all() here or it would cause an infinite
-      // loop.
-      foreach (module_list() as $module) {
-        $function = $module . '_hook_info';
-        if (function_exists($function)) {
-          $result = $function();
-          if (isset($result) && is_array($result)) {
-            $hook_info = array_merge_recursive($hook_info, $result);
-          }
-        }
-      }
-      // We can't use drupal_alter() for the same reason as above.
-      foreach (module_list() as $module) {
-        $function = $module . '_hook_info_alter';
-        if (function_exists($function)) {
-          $function($hook_info);
-        }
-      }
-      cache_set('hook_info', $hook_info, 'cache_bootstrap');
-    }
-    else {
-      $hook_info = $cache->data;
-    }
-  }
-
-  return $hook_info;
-}
-
-/**
  * Writes the hook implementation cache.
  *
  * @see module_implements()

=== modified file 'includes/token.inc'
--- includes/token.inc	2010-10-18 01:13:07 +0000
+++ includes/token.inc	2010-11-24 01:36:31 +0000
@@ -158,6 +158,8 @@ function token_scan($text) {
  */
 function token_generate($type, array $tokens, array $data = array(), array $options = array()) {
   $options += array('sanitize' => TRUE);
+  _token_initialize();
+
   $replacements = module_invoke_all('tokens', $type, $tokens, $data, $options);
 
   // Allow other modules to alter the replacements.
@@ -236,8 +238,25 @@ function token_find_with_prefix(array $t
 function token_info() {
   $data = &drupal_static(__FUNCTION__);
   if (!isset($data)) {
+    _token_initialize();
     $data = module_invoke_all('token_info');
     drupal_alter('token_info', $data);
   }
   return $data;
 }
+
+/**
+ * Load modulename.tokens.inc for all enabled modules.
+ */
+function _token_initialize() {
+  $initialized = &drupal_static(__FUNCTION__);
+  if (!$initialized) {
+    foreach (module_list() as $module) {
+      $filename = DRUPAL_ROOT . '/' . drupal_get_path('module', $module) . "/$module.tokens.inc";
+      if (file_exists($filename)) {
+        include_once $filename;
+      }
+    }
+    $initialized = TRUE;
+  }
+}

=== modified file 'modules/system/system.api.php'
--- modules/system/system.api.php	2010-11-15 08:29:03 +0000
+++ modules/system/system.api.php	2010-11-24 01:35:02 +0000
@@ -12,55 +12,6 @@
  */
 
 /**
- * Defines one or more hooks that are exposed by a module.
- *
- * Normally hooks do not need to be explicitly defined. However, by declaring a
- * hook explicitly, a module may define a "group" for it. Modules that implement
- * a hook may then place their implementation in either $module.module or in
- * $module.$group.inc. If the hook is located in $module.$group.inc, then that
- * file will be automatically loaded when needed.
- * In general, hooks that are rarely invoked and/or are very large should be
- * placed in a separate include file, while hooks that are very short or very
- * frequently called should be left in the main module file so that they are
- * always available.
- *
- * @return
- *   An associative array whose keys are hook names and whose values are an
- *   associative array containing:
- *   - group: A string defining the group to which the hook belongs. The module
- *     system will determine whether a file with the name $module.$group.inc
- *     exists, and automatically load it when required.
- *
- * See system_hook_info() for all hook groups defined by Drupal core.
- *
- * @see hook_hook_info_alter().
- */
-function hook_hook_info() {
-  $hooks['token_info'] = array(
-    'group' => 'tokens',
-  );
-  $hooks['tokens'] = array(
-    'group' => 'tokens',
-  );
-  return $hooks;
-}
-
-/**
- * Alter information from hook_hook_info().
- *
- * @param $hooks
- *   Information gathered by module_hook_info() from other modules'
- *   implementations of hook_hook_info(). Alter this array directly.
- *   See hook_hook_info() for information on what this may contain.
- */
-function hook_hook_info_alter(&$hooks) {
-  // Our module wants to completely override the core tokens, so make
-  // sure the core token hooks are not found.
-  $hooks['token_info']['group'] = 'mytokens';
-  $hooks['tokens']['group'] = 'mytokens';
-}
-
-/**
  * Inform the base system and the Field API about one or more entity types.
  *
  * Inform the system about one or more entity types (i.e., object types that

=== modified file 'modules/system/system.module'
--- modules/system/system.module	2010-11-12 01:36:08 +0000
+++ modules/system/system.module	2010-11-24 01:35:26 +0000
@@ -239,26 +239,6 @@ function system_permission() {
 }
 
 /**
- * Implements hook_hook_info().
- */
-function system_hook_info() {
-  $hooks['token_info'] = array(
-    'group' => 'tokens',
-  );
-  $hooks['token_info_alter'] = array(
-    'group' => 'tokens',
-  );
-  $hooks['tokens'] = array(
-    'group' => 'tokens',
-  );
-  $hooks['tokens_alter'] = array(
-    'group' => 'tokens',
-  );
-
-  return $hooks;
-}
-
-/**
  * Implements hook_entity_info().
  */
 function system_entity_info() {

