bazel syntax: remove Location from calling convention

This change removes the Location parameter from StarlarkCallable.call
(built-in functions) and the SkylarkCallable.useLocation feature from
annotated built-in functions.

Lately, the thread's call stack records the position of the program
counter of each active frame, so clients may access it through
StarlarkThread.getCallerLocation.

Numerous parameters that pass Locations merely to construct an
EvalException have been deleted. (This is the bulk of the change.)
Many places that directly constructed an EvalException now call
Starlark.errorf instead. (A few places in Bazel formerly specified a
location other than thread.getCallerLocation, or equivalently, null.)
The evaluator ensures that any exception thrown by Starlark.call
is augmented with the location of the call.

PiperOrigin-RevId: 291009378
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/DefaultInfo.java b/src/main/java/com/google/devtools/build/lib/analysis/DefaultInfo.java
index 290cfa7..dac9043 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/DefaultInfo.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/DefaultInfo.java
@@ -22,6 +22,7 @@
 import com.google.devtools.build.lib.syntax.Depset;
 import com.google.devtools.build.lib.syntax.EvalException;
 import com.google.devtools.build.lib.syntax.Starlark;
+import com.google.devtools.build.lib.syntax.StarlarkThread;
 import javax.annotation.Nullable;
 
 /** DefaultInfo is provided by all targets implicitly and contains all standard fields. */
@@ -131,8 +132,13 @@
     }
 
     @Override
-    public DefaultInfo constructor(Object files, Object runfilesObj,
-        Object dataRunfilesObj, Object defaultRunfilesObj, Object executable, Location loc)
+    public DefaultInfo constructor(
+        Object files,
+        Object runfilesObj,
+        Object dataRunfilesObj,
+        Object defaultRunfilesObj,
+        Object executable,
+        StarlarkThread thread)
         throws EvalException {
 
       Runfiles statelessRunfiles = castNoneToNull(Runfiles.class, runfilesObj);
@@ -140,12 +146,13 @@
       Runfiles defaultRunfiles = castNoneToNull(Runfiles.class, defaultRunfilesObj);
 
       if ((statelessRunfiles != null) && (dataRunfiles != null || defaultRunfiles != null)) {
-        throw new EvalException(loc, "Cannot specify the provider 'runfiles' "
-            + "together with 'data_runfiles' or 'default_runfiles'");
+        throw Starlark.errorf(
+            "Cannot specify the provider 'runfiles' together with 'data_runfiles' or"
+                + " 'default_runfiles'");
       }
 
       return new DefaultInfo(
-          loc,
+          thread.getCallerLocation(),
           castNoneToNull(Depset.class, files),
           statelessRunfiles,
           dataRunfiles,