You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: stack_tags_js.go
    path of file: ./repos/goldfish/vendor/github.com/jtolds/gls
    
    the code of the file until where you have to start completion: // +build js

package gls

// This file is used for GopherJS builds, which don't have normal runtime
// stack trace support

import (
	"strconv"
	"strings"

	"github.com/gopherjs/gopherjs/js"
)

const (
	jsFuncNamePrefix = "github_com_jtolds_gls_mark"
)

func jsMarkStack() (f []uintptr) {
	lines := strings.Split(
		js.Global.Get("Error").New().Get("stack").String(), "\n")
	f = make([]uintptr, 0, len(lines))
	for i, line := range lines {
		line = strings.TrimSpace(line)
		if line == "" {
			continue
		}
		if i == 0 {
			if line != "Error" {
				panic("didn't understand js stack trace")
			}
			continue
		}
		fields := strings.Fields(line)
		if len(fields) < 2 || fields[
    
func jsMarkStack() (f []uintptr) {
	lines := strings.Split(
		js.Global.Get("Error").New().Get("stack").String(), "\n")
	f = make([]uintptr, 0, len(lines))
	for i, line := range lines {
		line = strings.TrimSpace(line)
		if line == "" {
			continue
		}
		if i == 0 {
			if line != "Error" {
				panic("didn't understand js stack trace")
			}
			continue
		}
		fields := strings.Fields(line)
		if len(fields) < 2 || fields[0] != "at" {
			panic("didn't understand js stack trace")
		}

		pos := strings.Index(fields[1], jsFuncNamePrefix)
		if pos < 0 {
			continue
		}
		pos += len(jsFuncNamePrefix)
		if pos >= len(fields[1]) {
			panic("didn't understand js stack trace")
		}
		char := string(fields[1][pos])
		switch char {
		case "S":
			f = append(f, uintptr(0))
		default:
			val, err := strconv.ParseUint(char, 16, 8)
			if err != nil {
				panic("didn't understand js stack trace")
			}
			f = append(f, uintptr(val)+1)
		}
	}
	return f
}