1. 14 Jun, 2001 7 commits
    • Barry Warsaw's avatar
      Added the IteratorStorage tests. · b976f61c
      Barry Warsaw authored
      b976f61c
    • Barry Warsaw's avatar
      Added support for the `iterator' interface for storages. · 2776efa0
      Barry Warsaw authored
      Specifically,
      
      _loadSerialEx(): New method which is similar to the API method
      loadSerial() except that it returns both the pickle and the version
      string for the specified oid+serial pair.  This is not a public
      method.
      
      loadSerial(): Reimplement in terms of _loadSerialEx() to reduce code
      duplication.
      
      iterator(): Public method to return a "transactions iterator".
      
      _nexttxn(): Helper method to return the transaction metadata for the
      transaction following the given in the argument.  Raises IndexError if
      there is no next transaction.
      
      _alltxnoids(): Helper method to return a list of all the oids modified
      in the given transaction.  Note that the Full Berkeley storage has the
      implied semantics that if an object is modified more than once in a
      transaction, only the last such modification is retained.
      
      Classes _TransactionsIterator, _RecordsIterator, _Record are private
      helper classes to support the iterator interface.
      2776efa0
    • Evan Simpson's avatar
      Benchmarks. · 4cffef54
      Evan Simpson authored
      4cffef54
    • Barry Warsaw's avatar
      Removed unnecessary import. · 604de1df
      Barry Warsaw authored
      604de1df
    • Barry Warsaw's avatar
      Add HistoryStorage unit tests · b2589355
      Barry Warsaw authored
      b2589355
    • Barry Warsaw's avatar
    • Chris McDonough's avatar
      This is the compatibility module to make StructuredTextNG "look like" Classic... · 837fd723
      Chris McDonough authored
      This is the compatibility module to make StructuredTextNG "look like" Classic Structured Text.  I was stupid earlier before and used "ClassicDocumentClass" to represent a Document.  This was failing in some cases when attemtping to use a "ClassicDocument" as input to a StructuredTextNG HTML renderer.  To fix: Use DocumentClass instead of ClassicDocumentClass.
      837fd723
  2. 13 Jun, 2001 4 commits
    • Evan Simpson's avatar
      Make string expressions exception-aware. · 259d3487
      Evan Simpson authored
      259d3487
    • Shane Hathaway's avatar
      - Corrected issues with DateTime. · aa2e2e54
      Shane Hathaway authored
      - Optimized slightly.
      
      - Clarified by using more variable names.
      aa2e2e54
    • Fred Drake's avatar
      · 89de4892
      Fred Drake authored
      Add another optimization stage to detect longer sequences in the bytecode.
      89de4892
    • Fred Drake's avatar
      · bdcf6fb1
      Fred Drake authored
      New opcode:  rawtextBeginScope.  This is equivalent to:
      
      [endScope] rawtextColumn setPosition beginScope
      
      These two sequences are very common in some of the slowest test documents
      I've been using.
      bdcf6fb1
  3. 12 Jun, 2001 9 commits
    • Fred Drake's avatar
      · b9dfefca
      Fred Drake authored
      Lots more micro-optimization of the same sorts as we've been doing.
      b9dfefca
    • Fred Drake's avatar
      · 17f3bdbf
      Fred Drake authored
      Updated to reflect the re-ordering of scope boundaries and text chunks.
      17f3bdbf
    • Fred Drake's avatar
      · d81eb242
      Fred Drake authored
      New optimization of the instruction stream:  beginScope/endScope
      instructions are always pushed in front of text chunks; the affect of
      this is that many text chunks previously separated by scope boundaries
      are now joined together, causing fewer instructions to be generated.
      d81eb242
    • Fred Drake's avatar
      · fa31d627
      Fred Drake authored
      Do not call sys.exc_info() to initialize some locals we don't use.
      fa31d627
    • Fred Drake's avatar
      Some small optimizations: · 8bd69dca
      Fred Drake authored
      SafeMapping.has_get():
          Simplify in order to reduce the number of Python bytecodes.  There
          is no longer a branch, which isn't strictly necessary.
      
      Context.evaluateStructure(), .evaluateMacro():
          Since these methods are essentially synonyms for evaluate(), avoid
          the extra method lookup & call by simply making them aliases.
      
      Context.evaluate():
          Re-arrange the try/except/except to avoid some of the exception
          catching by moving part of the try clause into an else clause.
      8bd69dca
    • Chris McDonough's avatar
      When operating on raw strings which had DOS-style linefeeds (e.g. "\r\n"),... · 88f00992
      Chris McDonough authored
      When operating on raw strings which had DOS-style linefeeds (e.g. "\r\n"), StructuredText would neglect to strip the trailing garbage off the end of a paragraph.  Thus, the test for "examples" and other features that depended on the last characters in a paragraph to not be whitespace for proper operation were failing, causing problems mainly for people who use Windows to author STX content.  This is now fixed.
      88f00992
    • Evan Simpson's avatar
      Use Ken's wording for the upload paragraph, and look for the body in... · 66ea9597
      Evan Simpson authored
      Use Ken's wording for the upload paragraph, and look for the body in REQUEST.other before REQUEST.form, so that errors will show up.
      66ea9597
    • Fred Drake's avatar
      · 2feef0d3
      Fred Drake authored
      Small optimizations to get this a little more out of the way when profiling.
      2feef0d3
    • Fred Drake's avatar
      · 38793800
      Fred Drake authored
      Delay expectation of being able to access the DummyEngine class, allowing
      circular import by the DummyEngine module.
      38793800
  4. 11 Jun, 2001 5 commits
  5. 09 Jun, 2001 1 commit
    • Fred Drake's avatar
      More micro-optimizations. · d05ff27d
      Fred Drake authored
      A (minor) change to the bytecode format: for "extended" attributes
      (handled by TALInterpreter.attrAction()), the instruction contains the
      integer previously retrieved from the actionIndex table; the bytecode
      generator now takes care of the lookup.  This allows attrAction() to
      no longer need to lookup the table that it used to lookup the
      integers.
      
      Many handlers are now separated into TAL and non-TAL versions -- the
      TALInterpreter constructor determines which dispatch table to use when
      it initializes self.tal (which is not changed later).  This allows
      each of the handlers to do only what is needed without having to
      decide based on the self.tal attribute.
      
      TALInterpreter.do_startTag() no longer contains a special case for an
      empty attribute list; that case is already optimized away by the
      bytecode generator.  What remains would actually work in that case,
      but it simply doesn't occur.  This removes one test of the attrList
      parameter.
      d05ff27d
  6. 08 Jun, 2001 14 commits
    • Fred Drake's avatar
      Yet another change to the bytecode format: · adac2175
      Fred Drake authored
      Each bytecode now carries exactly one argument, but the arg is only an
      extra layer of tuple if the handler method needs more than one
      parameter.
      
      The handlers are also modified so that they require exactly one
      argument, which is a tuple only if they need more than one argument
      from the instruction.  This simplifies the dispatch code in
      TALInterpreter.interpret() just slightly.
      
      Changed the version number of the bytecode again, since Guido tells me
      Evan calls this version 1.3.2.
      adac2175
    • Fred Drake's avatar
      · 2e7ac9cc
      Fred Drake authored
      Micro-optimization to avoid function calls.
      2e7ac9cc
    • Fred Drake's avatar
      · 317719b8
      Fred Drake authored
      Update the one instance of affected bytecode to reflect the pre-rendering
      of "normal" attributes.
      317719b8
    • Fred Drake's avatar
      · f93d6c86
      Fred Drake authored
      Two speedups in TALInterpreter.do_startTag():
      
      The bytecode has changed to use a pre-rendered form for "normal"
      attributes; this allows some logic and string formatting to be skipped
      for these attributes.
      
      The self.col value is now maintained in local variables inside do_startTag(),
      reducing the number of instance attribute lookups and assignments
      substantially.  Saving the new value is ensured by a try/finally block
      since the attrAction() method can raise an exception.
      
      Added a few ultra-micro speedups as well to avoid instance attribute
      lookups.
      f93d6c86
    • Fred Drake's avatar
      · c307e88f
      Fred Drake authored
      Changing the bytecode slightly once again:
      
      For startTag and startEndTag instructions that cannot be optimized away,
      "normal" attributes are now represented by their rendered form, allowing
      TALInterpreter.do_startTag() to do less work when it can be done ahead of
      time.
      c307e88f
    • Evan Simpson's avatar
    • Evan Simpson's avatar
      Fixed minor bug in attribute formatting. · 4dacfebc
      Evan Simpson authored
      4dacfebc
    • Evan Simpson's avatar
      Add Zope-style change logging · ba40ed5c
      Evan Simpson authored
      ba40ed5c
    • Shane Hathaway's avatar
      ... · 05fbc5ed
      Shane Hathaway authored
      05fbc5ed
    • Evan Simpson's avatar
      59e52ad7
    • Fred Drake's avatar
      · 5414aa55
      Fred Drake authored
      Use string concatenation where that's simpler and faster than
      sprintf-style formatting.
      5414aa55
    • Evan Simpson's avatar
      Made meta-type in the management interface of ZClass instances into a link to... · ce057e8a
      Evan Simpson authored
      Made meta-type in the management interface of ZClass instances into a link to the ZClass definition.
      ce057e8a
    • Shane Hathaway's avatar
      Corrected a formerly obscure bug in the compiler module; Python Scripts · a399b1ae
      Shane Hathaway authored
      revealed it.  "print" with output to a stream and a trailing comma needs to
      end with a POP_TOP instruction.
      a399b1ae
    • Fred Drake's avatar
      · b3041d62
      Fred Drake authored
      Update the expected bytecodes to reflect the merger of the beginScope and
      rawAttrs bytecodes.
      b3041d62