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

Issue 105280047: code review 105280047: cmd/gc: in the runtime package, don't promote any decls... (Closed)

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

Description

cmd/gc: in the runtime package, don't promote any decls to the heap. In the runtime, we want to control where allocations happen. In particular, we don't want the code implementing malloc to itself trigger a malloc. This change prevents the compiler from inserting mallocs on our behalf (due to escaping declarations). This check does not trigger on the current runtime code. Note: Composite literals are still allowed.

Patch Set 1 #

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

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

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

Messages

Total messages: 3
khr
Hello rsc@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
10 years, 10 months ago (2014-07-22 03:22:41 UTC) #1
rsc
LGTM but drop prescription. "%N escapes to heap, not allowed in runtime"
10 years, 10 months ago (2014-07-22 03:30:52 UTC) #2
khr
10 years, 10 months ago (2014-07-22 03:56:47 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=f4cc6d66d10c ***

cmd/gc: in the runtime package, don't promote any decls to the heap.

In the runtime, we want to control where allocations happen.
In particular, we don't want the code implementing malloc to
itself trigger a malloc.  This change prevents the compiler
from inserting mallocs on our behalf (due to escaping declarations).

This check does not trigger on the current runtime code.

Note: Composite literals are still allowed.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/105280047
Sign in to reply to this message.

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