MCPcopy Index your code
hub / github.com/yuin/gopher-lua / objectRational

Function objectRational

vm.go:2451–2465  ·  view source on GitHub ↗
(L *LState, lhs, rhs LValue, event string)

Source from the content-addressed store, hash-verified

2449}
2450
2451func objectRational(L *LState, lhs, rhs LValue, event string) int {
2452 m1 := L.metaOp1(lhs, event)
2453 m2 := L.metaOp1(rhs, event)
2454 if m1.Type() == LTFunction && m1 == m2 {
2455 L.reg.Push(m1)
2456 L.reg.Push(lhs)
2457 L.reg.Push(rhs)
2458 L.Call(2, 1)
2459 if LVAsBool(L.reg.Pop()) {
2460 return 1
2461 }
2462 return 0
2463 }
2464 return -1
2465}

Callers 3

initFunction · 0.70
equalsFunction · 0.70
objectRationalWithErrorFunction · 0.70

Calls 6

LVAsBoolFunction · 0.85
TypeMethod · 0.65
PushMethod · 0.65
PopMethod · 0.65
metaOp1Method · 0.45
CallMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…