Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(532)

Issue 12311046: code review 12311046: gc: get rid of redundant slice bound check. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by khr
Modified:
11 years, 6 months ago
Reviewers:
r, rsc
CC:
rsc, r, golang-dev
Visibility:
Public.

Description

cmd/gc: get rid of redundant slice bound check. For normal slices a[i:j] we're generating 3 bounds checks: j<={len(string),cap(slice)}, j<=j (!), and i<=j. Somehow snuck in as part of the [i:j:k] implementation where the second check does something. Remove the second check when we don't need it.

Patch Set 1 #

Patch Set 2 : diff -r 564e8c77a065 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 564e8c77a065 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 56696c13acef https://khr%40golang.org@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/cmd/gc/walk.c View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6
khr
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 7 months ago (2013-08-05 05:50:17 UTC) #1
r
LGTM but in CL s/snunk/snuck/, much as I like the coinage.
11 years, 7 months ago (2013-08-05 05:55:33 UTC) #2
rsc
LGTM
11 years, 7 months ago (2013-08-05 18:28:33 UTC) #3
rsc
Change description to say "cmd/gc" not "gc"
11 years, 7 months ago (2013-08-05 18:28:44 UTC) #4
khr
*** Submitted as https://code.google.com/p/go/source/detail?r=0aee4b3eb910 *** cmd/gc: get rid of redundant slice bound check. For normal ...
11 years, 7 months ago (2013-08-05 20:24:36 UTC) #5
khr
11 years, 6 months ago (2013-09-10 16:08:05 UTC) #6
Message was sent while issue was closed.
*** Abandoned ***
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b