2 * Copyright 2013 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @fileoverview This file describes the externs API for V8-specific objects.
25 * Stack frame elements in V8.
28 function CallSite() {}
32 * Returns the value of this.
33 * @return {Object|undefined}
35 CallSite.prototype.getThis = function() {};
39 * Returns the type of this as a string. This is the name of the function stored
40 * in the constructor field of this, if available, otherwise the object's
41 * [[Class]] internal property.
42 * @return {string|undefined}
44 CallSite.prototype.getTypeName = function() {};
48 * Returns the current function.
49 * @return {!Function|undefined}
51 CallSite.prototype.getFunction = function() {};
55 * Returns the name of the current function, typically its name property. If a
56 * name property is not available an attempt will be made to try to infer a name
57 * from the function's context.
58 * @return {string|undefined}
60 CallSite.prototype.getFunctionName = function() {};
64 * Returns the name of the property of this or one of its prototypes that holds
65 * the current function.
66 * @return {string|undefined}
68 CallSite.prototype.getMethodName = function() {};
72 * If this function was defined in a script returns the name of the script
73 * @return {string|undefined}
75 CallSite.prototype.getFileName = function() {};
79 * If this function was defined in a script returns the current line number.
80 * @return {number|undefined}
82 CallSite.prototype.getLineNumber = function() {};
86 * If this function was defined in a script returns the current column number.
87 * @return {number|undefined}
89 CallSite.prototype.getColumnNumber = function() {};
93 * If this function was created using a call to eval, returns a CallSite object
94 * representing the location where eval was called
95 * @return {CallSite|undefined}
97 CallSite.prototype.getEvalOrigin = function() {};
101 * Is this a toplevel invocation, that is, is this the global object?
104 CallSite.prototype.isToplevel = function() {};
108 * Does this call take place in code defined by a call to eval?
111 CallSite.prototype.isEval = function() {};
115 * Is this call in native V8 code?
118 CallSite.prototype.isNative = function() {};
122 * Is this a constructor call?
125 CallSite.prototype.isConstructor = function() {};