go/pointer: fix runtime.startTimer intrinsic.
The test broke because the actual behaviour of time.startTimer changed in https://golang.org/cl/129480043. LGTM=crawshaw R=crawshaw CC=golang-codereviews https://golang.org/cl/131280043
This commit is contained in:
parent
cd6dcd8cb5
commit
067a2992ee
|
|
@ -343,7 +343,7 @@ func (c *timeStartTimerConstraint) solve(a *analysis, delta *nodeset) {
|
||||||
t := nodeid(tObj)
|
t := nodeid(tObj)
|
||||||
|
|
||||||
// We model startTimer as if it was defined thus:
|
// We model startTimer as if it was defined thus:
|
||||||
// func startTimer(t *runtimeTimer) { t.f(0, t.arg) }
|
// func startTimer(t *runtimeTimer) { t.f(t.arg) }
|
||||||
|
|
||||||
// We hard-code the field offsets of time.runtimeTimer:
|
// We hard-code the field offsets of time.runtimeTimer:
|
||||||
// type runtimeTimer struct {
|
// type runtimeTimer struct {
|
||||||
|
|
@ -357,9 +357,9 @@ func (c *timeStartTimerConstraint) solve(a *analysis, delta *nodeset) {
|
||||||
f := t + 4
|
f := t + 4
|
||||||
arg := t + 5
|
arg := t + 5
|
||||||
|
|
||||||
// store t.arg to t.f.params[1]
|
// store t.arg to t.f.params[0]
|
||||||
// (offset 2 => skip identity and int64 param)
|
// (offset 1 => skip identity)
|
||||||
a.store(f, arg, 2, 1)
|
a.store(f, arg, 1, 1)
|
||||||
|
|
||||||
// Add dynamic call target.
|
// Add dynamic call target.
|
||||||
if a.onlineCopy(c.targets, f) {
|
if a.onlineCopy(c.targets, f) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue