code: func toInt32(value Value) int32 {
  	{
  		switch value := value.value.(type) {
  		case int8:
  			return int32(value)
  		case int16:
  			return int32(value)
  		case int32:
  			return value
  		}
  	}
  	floatValue := value.float64()
  	if math.IsNaN(floatValue) || math.IsInf(floatValue, 0) {
  		return 0
  	}
  	if floatValue == 0 { // This will work for +0 & -0
  		return 0
  	}
  	remainder := math.Mod(floatValue, float_2_32)
  	if remainder > 0 {
  		remainder = math.Floor(remainder)
  	} else {
  		remainder = math.Ceil(remainder) + float_2_32
  	}
  	if remainder > float_2_31 {
  		return int32(remainder - float_2_32)
  	}
  	return int32(remainder)
  }
docs: // ECMA 262: 9.5