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

Issue 6812079: code review 6812079: cmd/gc, runtime: avoid unnecessary copy on type assertion. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 5 months ago by DMorsing
Modified:
11 years, 5 months ago
Reviewers:
CC:
golang-dev, bradfitz, rsc
Visibility:
Public.

Description

cmd/gc, runtime: avoid unnecessary copy on type assertion. When the first result of a type assertion is blank, the compiler would still copy out a potentially large non-interface type. Fixes issue 1021.

Patch Set 1 #

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

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

Total comments: 4

Patch Set 4 : diff -r 9fd632db8de2 https://code.google.com/p/go/ #

Patch Set 5 : diff -r 9cfe59382e2d https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -0 lines) Patch
M src/cmd/gc/builtin.c View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/gc/runtime.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/gc/walk.c View 1 1 chunk +25 lines, -0 lines 0 comments Download
M src/pkg/runtime/iface.c View 1 2 3 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 6
DMorsing
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 5 months ago (2012-11-04 14:56:33 UTC) #1
bradfitz
Out of curiosity, have you tried to simplify the regexp package as the original issue ...
11 years, 5 months ago (2012-11-04 23:05:21 UTC) #2
DMorsing
On Mon, Nov 5, 2012 at 12:05 AM, Brad Fitzpatrick <bradfitz@golang.org> wrote: > Out of ...
11 years, 5 months ago (2012-11-05 06:11:56 UTC) #3
rsc
LGTM https://codereview.appspot.com/6812079/diff/5001/src/pkg/runtime/iface.c File src/pkg/runtime/iface.c (right): https://codereview.appspot.com/6812079/diff/5001/src/pkg/runtime/iface.c#newcode284 src/pkg/runtime/iface.c:284: if(i.tab == nil || i.tab->type != t) { ...
11 years, 5 months ago (2012-11-06 18:41:40 UTC) #4
DMorsing
https://codereview.appspot.com/6812079/diff/5001/src/pkg/runtime/iface.c File src/pkg/runtime/iface.c (right): https://codereview.appspot.com/6812079/diff/5001/src/pkg/runtime/iface.c#newcode284 src/pkg/runtime/iface.c:284: if(i.tab == nil || i.tab->type != t) { On ...
11 years, 5 months ago (2012-11-06 19:37:11 UTC) #5
DMorsing
11 years, 5 months ago (2012-11-06 19:40:45 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=ae0310fd287b ***

cmd/gc, runtime: avoid unnecessary copy on type assertion.

When the first result of a type assertion is blank, the compiler would still
copy out a potentially large non-interface type.

Fixes issue 1021.

R=golang-dev, bradfitz, rsc
CC=golang-dev
http://codereview.appspot.com/6812079
Sign in to reply to this message.

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