]> Cypherpunks repositories - gostls13.git/commitdiff
time: add wasm architecture
authorRichard Musiol <mail@richard-musiol.de>
Sun, 4 Mar 2018 12:41:30 +0000 (13:41 +0100)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 13 Apr 2018 21:12:31 +0000 (21:12 +0000)
This commit adds the wasm architecture to the time package.

Updates #18892

Change-Id: I86841e096894eacf7f972add9a532491e4d00014
Reviewed-on: https://go-review.googlesource.com/106997
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/syscall/time_js_wasm.s [new file with mode: 0644]
src/syscall/timestruct.go
src/time/sys_unix.go
src/time/zoneinfo_unix.go

diff --git a/src/syscall/time_js_wasm.s b/src/syscall/time_js_wasm.s
new file mode 100644 (file)
index 0000000..f08b170
--- /dev/null
@@ -0,0 +1,11 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+#include "textflag.h"
+
+TEXT ·startTimer(SB),NOSPLIT,$0
+       JMP time·startTimer(SB)
+
+TEXT ·stopTimer(SB),NOSPLIT,$0
+       JMP time·stopTimer(SB)
index 49c3383b4f7faafe666f58f3e34a46174b86e576..84a00a77d8be9c557d5c2b086be98e99fbfffbba 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
 
 package syscall
 
index 0ef597fd9b8b419a7290a77b98bc1450be08b14e..e064e0046cb4e00b3cafb6c4df99cfe268a84bb9 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
+// +build darwin dragonfly freebsd js,wasm linux nacl netbsd openbsd solaris
 
 package time
 
index 88313aa0edd9a3d78e73497b5e23ca701872ea78..a37fd742dfd009270a9d630583e1c6bda8d63eef 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin,386 darwin,amd64 dragonfly freebsd linux,!android nacl netbsd openbsd solaris
+// +build darwin,386 darwin,amd64 dragonfly freebsd js,wasm linux,!android nacl netbsd openbsd solaris
 
 // Parse "zoneinfo" time zone file.
 // This is a fairly standard file format used on OS X, Linux, BSD, Sun, and others.