MCPcopy Create free account
hub / github.com/dop251/goja / constant

Method constant

compiler_expr.go:2652–2666  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2650}
2651
2652func (e *compiledLogicalAnd) constant() bool {
2653 if e.left.constant() {
2654 if v, ex := e.c.evalConst(e.left); ex == nil {
2655 if !v.ToBoolean() {
2656 return true
2657 } else {
2658 return e.right.constant()
2659 }
2660 } else {
2661 return true
2662 }
2663 }
2664
2665 return false
2666}
2667
2668func (e *compiledLogicalAnd) emitGetter(putOnStack bool) {
2669 var j int

Callers

nothing calls this directly

Calls 3

evalConstMethod · 0.80
constantMethod · 0.65
ToBooleanMethod · 0.65

Tested by

no test coverage detected