]> git.eshelyaron.com Git - emacs.git/commitdiff
* cedet/semantic/analyze/fcn.el (semantic-analyze-dereference-metatype-1)
authorChong Yidong <cyd@stupidchicken.com>
Sun, 13 Sep 2009 16:12:23 +0000 (16:12 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 13 Sep 2009 16:12:23 +0000 (16:12 +0000)
(semantic-analyze-type): Require semantic/scope.
(semantic-analyze-select-best-tag): Require semantic/db-typecache.
(semantic-analyze-dereference-metatype): Move up to avoid compiler warning.

* cedet/semantic/analyze.el (semantic-adebug-analyze): Require data-debug.

lisp/ChangeLog
lisp/cedet/semantic/analyze.el
lisp/cedet/semantic/analyze/fcn.el

index 984110fd65e4f5e3894ea41b41aa98bc8b78d1eb..a0a291a9a616f1158a0bf750acf9d18ec4451352 100644 (file)
@@ -2,6 +2,12 @@
 
        Synch to Eric Ludlam's upstream CEDET repository.
 
+       * cedet/semantic/analyze/fcn.el (semantic-analyze-dereference-metatype-1)
+       (semantic-analyze-type): Require semantic/scope.
+       (semantic-analyze-select-best-tag): Require semantic/db-typecache.
+       (semantic-analyze-dereference-metatype): Move up to avoid compiler
+       warning.
+
        * cedet/semantic/wisent/java-tags.el:
        * cedet/semantic/wisent/javat-wy.el: New files.
 
@@ -31,7 +37,7 @@
        * cedet/semantic/elp.el: File removed.
 
        * cedet/semantic/analyze.el (semantic-adebug-analyze): New
-       function, moved here from semantic/adebug.
+       function, moved here from semantic/adebug.  Require data-debug.
 
        * cedet/semantic/adebug.el: Declare external semanticdb functions.
        (semantic-adebug-analyze, semantic-adebug-edebug-expr): Deleted.
index 7d8143e3a699be7d5fed0e484be03d0ca1c513e5..55f8db4aaad4170a854aff99facdd98790a79f5a 100644 (file)
@@ -72,6 +72,9 @@
 (require 'semantic/scope)
 (require 'semantic/analyze/fcn)
 
+(declare-function data-debug-new-buffer "data-debug")
+(declare-function data-debug-insert-object-slots "eieio-datadebug")
+
 ;;; Code:
 (defvar semantic-analyze-error-stack nil
   "Collection of any errors thrown during analysis.")
@@ -680,6 +683,7 @@ Returns an object based on symbol `semantic-analyze-context'."
 Display the results as a debug list.
 Optional argument CTXT is the context to show."
   (interactive)
+  (require 'data-debug)
   (let ((start (current-time))
        (ctxt (or ctxt (semantic-analyze-current-context)))
        (end (current-time)))
index 6fe5c49b0bc3e2b1c67dc6008c64167bba7f6a7a..e0059896fb3091797368a42ec0d8c94afac8339a 100644 (file)
 (require 'semantic)
 (require 'semantic/tag)
 
+(eval-when-compile (require 'semantic/find))
+
+(declare-function semanticdb-typecache-merge-streams "semantic/db-typecache")
+(declare-function semantic-scope-find name "semantic/scope")
+(declare-function semantic-scope-set-typecache "semantic/scope")
+(declare-function semantic-scope-tag-get-scope "semantic/scope")
+
 ;;; Small Mode Specific Options
 ;;
 ;; These queries allow a major mode to help the analyzer make decisions.
@@ -105,6 +112,7 @@ tags of TAGCLASS."
     ;;
     ;; 2)
     ;; It will also remove prototypes.
+    (require 'semantic/db-typecache)
     (setq sequence (semanticdb-typecache-merge-streams sequence nil))
 
     (if (< (length sequence) 2)
@@ -150,6 +158,27 @@ Almost all searches use the same arguments."
 
 ;;; Finding Datatypes
 ;;
+
+(define-overloadable-function semantic-analyze-dereference-metatype (type scope &optional type-declaration)
+  ;; todo - move into typecahe!!
+  "Return a concrete type tag based on input TYPE tag.
+A concrete type is an actual declaration of a memory description,
+such as a structure, or class.  A meta type is an alias,
+or a typedef in C or C++.  If TYPE is concrete, it
+is returned.  If it is a meta type, it will return the concrete
+type defined by TYPE.
+The default behavior always returns TYPE.
+Override functions need not return a real semantic tag.
+Just a name, or short tag will be ok.  It will be expanded here.
+SCOPE is the scope object with additional items in which to search for names."
+  (catch 'default-behavior
+    (let* ((ans-tuple (:override
+                       ;; Nothing fancy, just return type by default.
+                       (throw 'default-behavior (list type type-declaration))))
+           (ans-type (car ans-tuple))
+           (ans-type-declaration (cadr ans-tuple)))
+       (list (semantic-analyze-dereference-metatype-1 ans-type scope) ans-type-declaration))))
+
 ;; Finding a data type by name within a project.
 ;;
 (defun semantic-analyze-type-to-name (type)
@@ -184,6 +213,7 @@ Optional SCOPE represents a calculated scope in which the
 types might be found.  This can be nil.
 If NOMETADEREF, then do not dereference metatypes.  This is
 used by the analyzer debugger."
+  (require 'semantic/scope)
   (let ((name nil)
        (typetag nil)
        )
@@ -257,32 +287,13 @@ Optional argument TYPE-DECLARATION is how TYPE was found referenced."
        ))
     lasttype))
 
-(define-overloadable-function semantic-analyze-dereference-metatype (type scope &optional type-declaration)
-  ;; todo - move into typecahe!!
-  "Return a concrete type tag based on input TYPE tag.
-A concrete type is an actual declaration of a memory description,
-such as a structure, or class.  A meta type is an alias,
-or a typedef in C or C++.  If TYPE is concrete, it
-is returned.  If it is a meta type, it will return the concrete
-type defined by TYPE.
-The default behavior always returns TYPE.
-Override functions need not return a real semantic tag.
-Just a name, or short tag will be ok.  It will be expanded here.
-SCOPE is the scope object with additional items in which to search for names."
-  (catch 'default-behavior
-    (let* ((ans-tuple (:override
-                       ;; Nothing fancy, just return type by default.
-                       (throw 'default-behavior (list type type-declaration))))
-           (ans-type (car ans-tuple))
-           (ans-type-declaration (cadr ans-tuple)))
-       (list (semantic-analyze-dereference-metatype-1 ans-type scope) ans-type-declaration))))
-
 ;; @ TODO - the typecache can also return a stack of scope names.
 
 (defun semantic-analyze-dereference-metatype-1 (ans scope)
   "Do extra work after dereferencing a metatype.
 ANS is the answer from the the language specific query.
 SCOPE is the current scope."
+  (require 'semantic/scope)
   ;; If ANS is a string, or if ANS is a short tag, we
   ;; need to do some more work to look it up.
   (if (stringp ans)