OLD | NEW |
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1354 /** | 1354 /** |
1355 * A JavaScript function object (ECMA-262, 15.3). | 1355 * A JavaScript function object (ECMA-262, 15.3). |
1356 */ | 1356 */ |
1357 class V8EXPORT Function : public Object { | 1357 class V8EXPORT Function : public Object { |
1358 public: | 1358 public: |
1359 Local<Object> NewInstance() const; | 1359 Local<Object> NewInstance() const; |
1360 Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; | 1360 Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; |
1361 Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]); | 1361 Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]); |
1362 void SetName(Handle<String> name); | 1362 void SetName(Handle<String> name); |
1363 Handle<Value> GetName() const; | 1363 Handle<Value> GetName() const; |
| 1364 |
| 1365 /** |
| 1366 * Returns zero based line number of function body and |
| 1367 * kLineOffsetNotFound if no information available. |
| 1368 */ |
| 1369 int GetScriptLineNumber() const; |
| 1370 ScriptOrigin GetScriptOrigin() const; |
1364 static inline Function* Cast(Value* obj); | 1371 static inline Function* Cast(Value* obj); |
| 1372 static const int kLineOffsetNotFound; |
1365 private: | 1373 private: |
1366 Function(); | 1374 Function(); |
1367 static void CheckCast(Value* obj); | 1375 static void CheckCast(Value* obj); |
1368 }; | 1376 }; |
1369 | 1377 |
1370 | 1378 |
1371 /** | 1379 /** |
1372 * A JavaScript value that wraps a C++ void*. This type of value is | 1380 * A JavaScript value that wraps a C++ void*. This type of value is |
1373 * mainly used to associate C++ data structures with JavaScript | 1381 * mainly used to associate C++ data structures with JavaScript |
1374 * objects. | 1382 * objects. |
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3234 | 3242 |
3235 } // namespace v8 | 3243 } // namespace v8 |
3236 | 3244 |
3237 | 3245 |
3238 #undef V8EXPORT | 3246 #undef V8EXPORT |
3239 #undef V8EXPORT_INLINE | 3247 #undef V8EXPORT_INLINE |
3240 #undef TYPE_CHECK | 3248 #undef TYPE_CHECK |
3241 | 3249 |
3242 | 3250 |
3243 #endif // V8_H_ | 3251 #endif // V8_H_ |
OLD | NEW |