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

Issue 132820043: code review 132820043: runtime: convert NewCallback and NewCallbackCDecl to Go (Closed)

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

Description

runtime: convert NewCallback and NewCallbackCDecl to Go

Patch Set 1 #

Patch Set 2 : diff -r 8e4e7940943a2dfd0b60db75fac44865005b2271 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 8e4e7940943a2dfd0b60db75fac44865005b2271 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 8e4e7940943a2dfd0b60db75fac44865005b2271 https://go.googlecode.com/hg/ #

Total comments: 6

Patch Set 5 : diff -r 582d66a876b7d80ba1b55b67427d0bbb6db08bae https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -99 lines) Patch
M src/cmd/api/goapi.go View 1 2 3 4 1 chunk +3 lines, -2 lines 0 comments Download
M src/cmd/dist/buildruntime.c View 1 1 chunk +5 lines, -0 lines 0 comments Download
R src/pkg/runtime/callback_windows.c View 1 1 chunk +0 lines, -77 lines 0 comments Download
A src/pkg/runtime/syscall_windows.go View 1 2 3 4 1 chunk +92 lines, -0 lines 0 comments Download
M src/pkg/runtime/syscall_windows.goc View 1 1 chunk +0 lines, -8 lines 0 comments Download
M src/pkg/syscall/asm_windows.s View 1 1 chunk +7 lines, -1 line 0 comments Download
R src/pkg/syscall/asm_windows_amd64.s View 1 1 chunk +0 lines, -7 lines 0 comments Download
M src/pkg/syscall/syscall_windows.go View 1 2 3 4 1 chunk +14 lines, -4 lines 0 comments Download

Messages

Total messages: 9
brainman
Hello khr@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
10 years, 6 months ago (2014-08-22 05:41:15 UTC) #1
brainman
I am not sure about two things: 1) I need address of asm runtime.callbackasm in ...
10 years, 6 months ago (2014-08-22 05:41:36 UTC) #2
remyoudompheng
On 2014/08/22 05:41:36, brainman wrote: > I am not sure about two things: > > ...
10 years, 6 months ago (2014-08-22 06:06:50 UTC) #3
brainman
On 2014/08/22 06:06:50, remyoudompheng wrote: > > ... do you have any reason to not ...
10 years, 6 months ago (2014-08-22 06:15:02 UTC) #4
remyoudompheng
2014-08-22 8:15 GMT+02:00 <alex.brainman@gmail.com>: > On 2014/08/22 06:06:50, remyoudompheng wrote: > >> ... do you ...
10 years, 6 months ago (2014-08-22 06:16:29 UTC) #5
brainman
On 2014/08/22 06:16:29, remyoudompheng wrote: > explicit allocation with new or make is allowed. Yes, ...
10 years, 6 months ago (2014-08-22 07:00:15 UTC) #6
brainman
Hello khr@golang.org, remyoudompheng@gmail.com (cc: golang-codereviews@googlegroups.com), Please take another look.
10 years, 6 months ago (2014-08-22 07:00:39 UTC) #7
khr
LGTM. https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/os_windows.c File src/pkg/runtime/os_windows.c (right): https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/os_windows.c#newcode548 src/pkg/runtime/os_windows.c:548: g->m->ptrarg[0] = runtime·callbackasm; Get rid of this https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/syscall_windows.go ...
10 years, 6 months ago (2014-08-25 00:39:07 UTC) #8
brainman
10 years, 6 months ago (2014-08-25 05:59:22 UTC) #9
*** Submitted as https://code.google.com/p/go/source/detail?r=7cc7cc1bc855 ***

runtime: convert NewCallback and NewCallbackCDecl to Go

LGTM=khr
R=khr, remyoudompheng
CC=golang-codereviews
https://codereview.appspot.com/132820043

https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/os_windows.c
File src/pkg/runtime/os_windows.c (right):

https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/os_window...
src/pkg/runtime/os_windows.c:548: g->m->ptrarg[0] = runtime·callbackasm;
On 2014/08/25 00:39:07, khr wrote:
> Get rid of this

Done.

https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/syscall_w...
File src/pkg/runtime/syscall_windows.go (right):

https://codereview.appspot.com/132820043/diff/50001/src/pkg/runtime/syscall_w...
src/pkg/runtime/syscall_windows.go:47: return uintptr(add(addr, uintptr(i*5)))
On 2014/08/25 00:39:07, khr wrote:
> This is overkill.  You can just do:
> 
> var callbackasm byte // type isn't really byte, it's code in runtime
> 
>     addr := add(unsafe.Pointer(&callbackasm), uintptr(i*5))

Done.

https://codereview.appspot.com/132820043/diff/50001/src/pkg/syscall/syscall_w...
File src/pkg/syscall/syscall_windows.go (right):

https://codereview.appspot.com/132820043/diff/50001/src/pkg/syscall/syscall_w...
src/pkg/syscall/syscall_windows.go:108: func compileCallback(fn interface{},
cleanstack bool) uintptr
On 2014/08/25 00:39:07, khr wrote:
> Put a comment here to point a reader to the location of the implementation.

Done. Implemented in asm_windows.s.
Sign in to reply to this message.

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