func (r *Reference) IsSuperReference() bool {
	return r.thisValue != nil
}
IsSuperReference is used to determine if this reference has a thisValue.
IsSuperReference will return true even the thisValue is Null or Undefined,
since the thisValue is present.
IsSuperReference is specified in 6.2.4.7.
package binding
import (
	"fmt"
	"github.com/gojisvm/gojis/internal/runtime/errors"
	"github.com/gojisvm/gojis/internal/runtime/lang"
)
type Reference struct {
	baseComponent  lang.Value
	referencedName lang.StringOrSymbol
	thisValue      lang.Value
	strict         bool
}
func NewReference(n lang.StringOrSymbol, base lang.Value, strict bool) *Reference {
	r := new(Reference)
	r.referencedName = n
	r.baseComponent = base
	r.strict = strict
	return r
}
func NewSuperReference(n lang.StringOrSymbol, base, this lang.Value, strict bool) *Reference {
	r := NewReference(n, base, strict)
	r.thisValue = this
	return r
}
func (r *Reference) GetBase() lang.Value {
	return r.baseComponent
}
func (r *Reference) GetReferencedName() lang.StringOrSymbol {
	return r.referencedName
}
func (r *Reference) IsStrictReference() bool {
	return r.strict
}
func (r *Reference) HasPrimitiveBase() bool {
	switch r.baseComponent.Type() {
	case lang.TypeBoolean, lang.TypeString, lang.TypeSymbol, lang.TypeNumber:
		return true
	default:
		return false
	}
}
func (r *Reference) IsPropertyReference() bool {
	return r.baseComponent.Type() == lang.TypeObject ||
		r.HasPrimitiveBase()
}
func (r *Reference) IsUnresolvableReference() bool {
	return r.baseComponent == lang.Undefined
}