1. 04 Oct, 2011 6 commits
    • Paul Borman's avatar
      time: make month/day name comparisons case insenstive · 93b8438e
      Paul Borman authored
      Fixes #2324.
      
      R=r, r
      CC=golang-dev
      https://golang.org/cl/5180044
      93b8438e
    • Russ Cox's avatar
      5g, 6g, 8g: fix loop finding bug, squash jmps · e2d326b8
      Russ Cox authored
      The loop recognizer uses the standard dominance
      frontiers but gets confused by dead code, which
      has a (not explicitly set) rpo number of 0, meaning it
      looks like the head of the function, so it dominates
      everything.  If the loop recognizer encounters dead
      code while tracking backward through the graph
      it fails to recognize where it started as a loop, and
      then the optimizer does not registerize values loaded
      inside that loop.  Fix by checking rpo against rpo2r.
      
      Separately, run a quick pass over the generated
      code to squash JMPs to JMP instructions, which
      are convenient to emit during code generation but
      difficult to read when debugging the -S output.
      A side effect of this pass is to eliminate dead code,
      so the output files may be slightly smaller and the
      optimizer may have less work to do.
      There is no semantic effect, because the linkers
      flatten JMP chains and delete dead instructions
      when laying out the final code.  Doing it here too
      just makes the -S output easier to read and more
      like what the final binary will contain.
      
      The "dead code breaks loop finding" bug is thus
      fixed twice over.  It seemed prudent to fix loopit
      separately just in case dead code ever sneaks back
      in for one reason or another.
      
      R=ken2
      CC=golang-dev
      https://golang.org/cl/5190043
      e2d326b8
    • Gustavo Niemeyer's avatar
      path/filepath: added Rel as the complement of Abs · da99a5bc
      Gustavo Niemeyer authored
      R=golang-dev, rsc, gustavo, r, borman
      CC=golang-dev
      https://golang.org/cl/4981049
      da99a5bc
    • Joe Poirier's avatar
      cgo: allow Window's specific path characters in flag directives. · aec89a6d
      Joe Poirier authored
      Example: #cgo windows LDFLAGS: -LC:\\WINDOWS\\system32
      
      R=alex.brainman, go.peter.90, golang-dev, rsc
      CC=golang-dev
      https://golang.org/cl/5154042
      aec89a6d
    • Brad Fitzpatrick's avatar
      Fix build, disabling flaky registerization test. · 2cef85f8
      Brad Fitzpatrick authored
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/5179045
      2cef85f8
    • Nigel Tao's avatar
      image: spin off a new color package out of the image package. · a2846e65
      Nigel Tao authored
      The spin-off renames some types. The new names are simply better:
      image.Color              -> color.Color
      image.ColorModel         -> color.Model
      image.ColorModelFunc     -> color.ModelFunc
      image.PalettedColorModel -> color.Palette
      image.RGBAColor          -> color.RGBA
      image.RGBAColorModel     -> color.RGBAModel
      image.RGBA64Color        -> color.RGBA64
      image.RGBA64ColorModel   -> color.RGBA64Model
      (similarly for NRGBAColor, GrayColorModel, etc)
      
      The image.ColorImage type stays in the image package, but is renamed:
      image.ColorImage -> image.Uniform
      
      The image.Image implementations (image.RGBA, image.RGBA64, image.NRGBA,
      image.Alpha, etc) do not change their name, and gain a nice symmetry:
      an image.RGBA is an image of color.RGBA, etc.
      
      The image.Black, image.Opaque uniform images remain unchanged (although
      their type is renamed from image.ColorImage to image.Uniform). The
      corresponding color types (color.Black, color.Opaque, etc) are new.
      
      Nothing in the image/ycbcr is renamed yet. The ycbcr.YCbCrColor and
      ycbcr.YCbCrImage types will eventually migrate to color.YCbCr and
      image.YCbCr, but that will be a separate CL.
      
      R=r, bsiegert
      CC=golang-dev
      https://golang.org/cl/5132048
      a2846e65
  2. 03 Oct, 2011 5 commits
  3. 01 Oct, 2011 3 commits
  4. 30 Sep, 2011 10 commits
  5. 29 Sep, 2011 10 commits
  6. 28 Sep, 2011 6 commits
    • Mike Samuel's avatar
      exp/template/html: handle custom attrs and HTML5 embedded elements. · f17e3d22
      Mike Samuel authored
      HTML5 allows embedded SVG and MathML.
      Code searches show SVG is used for graphing.
      
      This changes transition to deal with constructs like
         <svg xmlns:xlink="http://www.w3.org/1999/xlink">
      It changes attr and clients to call a single function that combines
      the name lookup and "on" prefix check to determine an attribute
      value type given an attribute name.
      
      That function uses heuristics to recognize that
           xlink:href and svg:href
      have URL content, and that data-url is likely contains URL content,
      since "javascript:" injection is such a problem.
      
      I did a code search over a closure templates codebase to determine
      patterns of custom attribute usage.  I did something like
      
      $ find . -name \*.soy | \
          xargs egrep perl -ne 'while (s/\b((data-|\w+:)\w+)\s*=//) { print "$1\n"; }' | \
          sort | uniq
      
      to produce the list at the bottom.
      
      Filtering that by egrep -i 'src|url|uri' produces
      
      data-docConsumptionUri
      data-docIconUrl
      data-launchUrl
      data-lazySrc
      data-pageUrl
      data-shareurl
      data-suggestServerUrl
      data-tweetUrl
      g:secondaryurls
      g:url
      
      which seem to match all the ones that are likely URL content.
      There are some short words that match that heuristic, but I still think it decent since
      any custom attribute that has a numeric or enumerated keyword value will be unaffected by
      the URL assumption.
      Counterexamples from /usr/share/dict:
      during, hourly, maturity, nourish, purloin, security, surly
      
      Custom attributes present in existing closure templates codebase:
      buzz:aid
      data-a
      data-action
      data-actor
      data-allowEqualityOps
      data-analyticsId
      data-bid
      data-c
      data-cartId
      data-categoryId
      data-cid
      data-command
      data-count
      data-country
      data-creativeId
      data-cssToken
      data-dest
      data-docAttribution
      data-docConsumptionUri
      data-docCurrencyCode
      data-docIconUrl
      data-docId
      data-docPrice
      data-docPriceMicros
      data-docTitle
      data-docType
      data-docid
      data-email
      data-entityid
      data-errorindex
      data-f
      data-feature
      data-fgid
      data-filter
      data-fireEvent
      data-followable
      data-followed
      data-hashChange
      data-height
      data-hover
      data-href
      data-id
      data-index
      data-invitable
      data-isFree
      data-isPurchased
      data-jid
      data-jumpid
      data-launchUrl
      data-lazySrc
      data-listType
      data-maxVisiblePages
      data-name
      data-nid
      data-nodeid
      data-numItems
      data-numPerPage
      data-offerType
      data-oid
      data-opUsesEquality
      data-overflowclass
      data-packageName
      data-pageId
      data-pageUrl
      data-pos
      data-priceBrief
      data-profileIds
      data-query
      data-rating
      data-ref
      data-rentalGrantPeriodDays
      data-rentalactivePeriodHours
      data-reviewId
      data-role
      data-score
      data-shareurl
      data-showGeLe
      data-showLineInclude
      data-size
      data-sortval
      data-suggestServerType
      data-suggestServerUrl
      data-suggestionIndex
      data-tabBarId
      data-tabBarIndex
      data-tags
      data-target
      data-textColor
      data-theme
      data-title
      data-toggletarget
      data-tooltip
      data-trailerId
      data-transactionId
      data-transition
      data-ts
      data-tweetContent
      data-tweetUrl
      data-type
      data-useAjax
      data-value
      data-width
      data-x
      dm:index
      dm:type
      g:aspects
      g:decorateusingsecondary
      g:em
      g:entity
      g:groups
      g:id
      g:istoplevel
      g:li
      g:numresults
      g:oid
      g:parentId
      g:pl
      g:pt
      g:rating_override
      g:secondaryurls
      g:sortby
      g:startindex
      g:target
      g:type
      g:url
      g:value
      ga:barsize
      ga:css
      ga:expandAfterCharsExceed
      ga:initialNumRows
      ga:nocancelicon
      ga:numRowsToExpandTo
      ga:type
      ga:unlockwhenrated
      gw:address
      gw:businessname
      gw:comment
      gw:phone
      gw:source
      ng:controller
      xlink:href
      xml:lang
      xmlns:atom
      xmlns:dc
      xmlns:jstd
      xmlns:ng
      xmlns:og
      xmlns:webstore
      xmlns:xlink
      
      R=nigeltao
      CC=golang-dev
      https://golang.org/cl/5119041
      f17e3d22
    • Mike Samuel's avatar
      exp/template/html: don't normalize '<' in doctypes. · 582bb304
      Mike Samuel authored
      The normalization that prevents element name and comment injection in
        <{{.}}
      by converting it to
        &lt;{{.}}
      breaks
        <!DOCTYPE html>
      
      Instead of splitting states to have a start of document state and a text
      state, I whitelist <!DOCTYPE.
      
      R=nigeltao
      CC=golang-dev
      https://golang.org/cl/5131051
      582bb304
    • Russ Cox's avatar
      go: documentation for new command · 9aae6482
      Russ Cox authored
      *** This is a design review, not a code review. ***
      Feel free to reply to the mail instead of picking out
      individual lines to comment on in Rietveld.
      
      This command, go, will replace both gomake/make and goinstall.
      Make will stick around only for building our C commands
      and perhaps package runtime.
      
      In normal use while developing you'd run commands like
      
              go compile
              go test
              go clean
              go install
      
      which apply to the package in the current directory.
      
      To operate on code written by others, you add an explicit
      package path:
      
              go get gopath.googlecode.com/hg/oauth
              go test gopath.googlecode.com/hg/oauth
      
      The script.txt file is a script showing the output of
      the various help commands that the command has.
      (Right now, all the command can do is print help messages.)
      
      R=golang-dev, bradfitz, kevlar, r, edsrzf, gri, adg, rogpeppe, r
      CC=golang-dev
      https://golang.org/cl/5019045
      9aae6482
    • Brad Fitzpatrick's avatar
      strings: add Replacer, NewReplacer · 7b0f3caa
      Brad Fitzpatrick authored
      This is just a new API to do many replacements at once.
      
      While the point of this API is to be faster than doing replacements one
      at a time, the implementation in this CL has the optimizations removed
      and may actually be slower.
      
      Future CLs will bring back & add optimizations.
      
      R=r, rsc, rogpeppe
      CC=golang-dev
      https://golang.org/cl/5081042
      7b0f3caa
    • Brad Fitzpatrick's avatar
      http: don't send a 400 Bad Request after a client shutdown · 58a5f1e8
      Brad Fitzpatrick authored
      Fixes #2312
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/5143049
      58a5f1e8
    • Russ Cox's avatar
      json: use strings.EqualFold instead of strings.ToLower. · 32d1e460
      Russ Cox authored
      R=golang-dev, bradfitz, iant
      CC=golang-dev
      https://golang.org/cl/5127043
      32d1e460