/vm/src/any/fast_compiler/fcompiler.hh

http://github.com/ticking/self · C++ Header · 69 lines · 42 code · 21 blank · 6 comment · 0 complexity · 60ae7a8f47f840ba8941f6663ae9007a MD5 · raw file

  1. /* Sun-$Revision: 30.9 $ */
  2. /* Copyright 1992-2006 Sun Microsystems, Inc. and Stanford University.
  3. See the LICENSE file for license information. */
  4. # ifdef FAST_COMPILER
  5. # ifdef INTERFACE_PRAGMAS
  6. # pragma interface
  7. # endif
  8. // The FCompiler structure holds global state associated with the current
  9. // NIC compilation. (NIC stands for "non-inlining compiler"; for historical
  10. // reasons, the NIC's classes & files start with f for "fast".)
  11. extern FCompiler* theCompiler;
  12. class FCompiler: public AbstractCompiler {
  13. public:
  14. int32 countID;
  15. bool generateDebugCode; // gen code for single-stepping?
  16. bool needRegWindowFlushes; // compile reg-window flushing blocks
  17. bool containsLoop; // method contains _Restart
  18. CodeGen* codeGen;
  19. int32 stackLocCount;
  20. int32 extraArgCount;
  21. int32 stackTempCount() { return stackLocCount + extraArgCount; }
  22. int32 frameSize();
  23. int32 verifiedOffset();
  24. int32 diCheckOffset();
  25. int32 frameCreationOffset();
  26. ScopeDescRecorder* scopeDescRecorder();
  27. Assembler* instructions();
  28. bool isImpure; // code has some inlining
  29. FCompiler(compilingLookup* k, sendDesc* sd, nmln* d);
  30. ~FCompiler() { finalize(); }
  31. protected:
  32. void initialize();
  33. void constantCode();
  34. void dataCode();
  35. void assignmentCode();
  36. void methodCode();
  37. void trace_compile(char *s);
  38. public:
  39. nmethod* compile();
  40. void finalize();
  41. fint name() { return NIC; }
  42. nm_compiler nmName() { return nm_nic; }
  43. fint incoming_arg_count();
  44. void print();
  45. void print_short();
  46. # include "_fcompiler_pd.hh.incl"
  47. };
  48. # endif // FAST_COMPILER