From 067a2992ee7962d12b195ad350a074ce89447aca Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 26 Aug 2014 11:08:45 -0400 Subject: [PATCH] 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 --- go/pointer/intrinsics.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/go/pointer/intrinsics.go b/go/pointer/intrinsics.go index 92d0730c..cb0100e9 100644 --- a/go/pointer/intrinsics.go +++ b/go/pointer/intrinsics.go @@ -343,7 +343,7 @@ func (c *timeStartTimerConstraint) solve(a *analysis, delta *nodeset) { t := nodeid(tObj) // 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: // type runtimeTimer struct { @@ -357,9 +357,9 @@ func (c *timeStartTimerConstraint) solve(a *analysis, delta *nodeset) { f := t + 4 arg := t + 5 - // store t.arg to t.f.params[1] - // (offset 2 => skip identity and int64 param) - a.store(f, arg, 2, 1) + // store t.arg to t.f.params[0] + // (offset 1 => skip identity) + a.store(f, arg, 1, 1) // Add dynamic call target. if a.onlineCopy(c.targets, f) {