| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 * context in which it was created (ScriptCompiler::CompileBound or | 977 * context in which it was created (ScriptCompiler::CompileBound or |
| 978 * UnboundScript::BindToGlobalContext()). | 978 * UnboundScript::BindToGlobalContext()). |
| 979 */ | 979 */ |
| 980 Local<Value> Run(); | 980 Local<Value> Run(); |
| 981 | 981 |
| 982 /** | 982 /** |
| 983 * Returns the corresponding context-unbound script. | 983 * Returns the corresponding context-unbound script. |
| 984 */ | 984 */ |
| 985 Local<UnboundScript> GetUnboundScript(); | 985 Local<UnboundScript> GetUnboundScript(); |
| 986 | 986 |
| 987 // To be deprecated; use GetUnboundScript()->GetId(); | 987 V8_DEPRECATED("Use GetUnboundScript()->GetId()", |
| 988 int GetId() { | 988 int GetId()) { |
| 989 return GetUnboundScript()->GetId(); | 989 return GetUnboundScript()->GetId(); |
| 990 } | 990 } |
| 991 | |
| 992 // Use GetUnboundScript()->GetId(); | |
| 993 V8_DEPRECATED("Use GetUnboundScript()->GetId()", | |
| 994 Handle<Value> GetScriptName()) { | |
| 995 return GetUnboundScript()->GetScriptName(); | |
| 996 } | |
| 997 | |
| 998 /** | |
| 999 * Returns zero based line number of the code_pos location in the script. | |
| 1000 * -1 will be returned if no information available. | |
| 1001 */ | |
| 1002 V8_DEPRECATED("Use GetUnboundScript()->GetLineNumber()", | |
| 1003 int GetLineNumber(int code_pos)) { | |
| 1004 return GetUnboundScript()->GetLineNumber(code_pos); | |
| 1005 } | |
| 1006 }; | 991 }; |
| 1007 | 992 |
| 1008 | 993 |
| 1009 /** | 994 /** |
| 1010 * For compiling scripts. | 995 * For compiling scripts. |
| 1011 */ | 996 */ |
| 1012 class V8_EXPORT ScriptCompiler { | 997 class V8_EXPORT ScriptCompiler { |
| 1013 public: | 998 public: |
| 1014 /** | 999 /** |
| 1015 * Compilation data that the embedder can cache and pass back to speed up | 1000 * Compilation data that the embedder can cache and pass back to speed up |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1039 int length; | 1024 int length; |
| 1040 BufferPolicy buffer_policy; | 1025 BufferPolicy buffer_policy; |
| 1041 | 1026 |
| 1042 private: | 1027 private: |
| 1043 // Prevent copying. Not implemented. | 1028 // Prevent copying. Not implemented. |
| 1044 CachedData(const CachedData&); | 1029 CachedData(const CachedData&); |
| 1045 CachedData& operator=(const CachedData&); | 1030 CachedData& operator=(const CachedData&); |
| 1046 }; | 1031 }; |
| 1047 | 1032 |
| 1048 /** | 1033 /** |
| 1049 * Source code which can be then compiled to a UnboundScript or | 1034 * Source code which can be then compiled to a UnboundScript or Script. |
| 1050 * BoundScript. | |
| 1051 */ | 1035 */ |
| 1052 class Source { | 1036 class Source { |
| 1053 public: | 1037 public: |
| 1054 // Source takes ownership of CachedData. | 1038 // Source takes ownership of CachedData. |
| 1055 V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origin, | 1039 V8_INLINE Source(Local<String> source_string, const ScriptOrigin& origin, |
| 1056 CachedData* cached_data = NULL); | 1040 CachedData* cached_data = NULL); |
| 1057 V8_INLINE Source(Local<String> source_string, | 1041 V8_INLINE Source(Local<String> source_string, |
| 1058 CachedData* cached_data = NULL); | 1042 CachedData* cached_data = NULL); |
| 1059 V8_INLINE ~Source(); | 1043 V8_INLINE ~Source(); |
| 1060 | 1044 |
| (...skipping 5608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6669 */ | 6653 */ |
| 6670 | 6654 |
| 6671 | 6655 |
| 6672 } // namespace v8 | 6656 } // namespace v8 |
| 6673 | 6657 |
| 6674 | 6658 |
| 6675 #undef TYPE_CHECK | 6659 #undef TYPE_CHECK |
| 6676 | 6660 |
| 6677 | 6661 |
| 6678 #endif // V8_H_ | 6662 #endif // V8_H_ |
| OLD | NEW |