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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
969 /** | 969 /** |
970 * The origin, within a file, of a script. | 970 * The origin, within a file, of a script. |
971 */ | 971 */ |
972 class ScriptOrigin { | 972 class ScriptOrigin { |
973 public: | 973 public: |
974 V8_INLINE ScriptOrigin( | 974 V8_INLINE ScriptOrigin( |
975 Handle<Value> resource_name, | 975 Handle<Value> resource_name, |
976 Handle<Integer> resource_line_offset = Handle<Integer>(), | 976 Handle<Integer> resource_line_offset = Handle<Integer>(), |
977 Handle<Integer> resource_column_offset = Handle<Integer>(), | 977 Handle<Integer> resource_column_offset = Handle<Integer>(), |
978 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(), | 978 Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>(), |
979 Handle<Integer> script_id = Handle<Integer>()) | 979 Handle<Integer> script_id = Handle<Integer>(), |
980 Handle<Boolean> resource_is_internal_script = Handle<Boolean>()) | |
yurys
2015/01/26 15:41:06
The "internal" term is somewhat confusing. Can we
kozy
2015/01/26 16:42:13
Done.
| |
980 : resource_name_(resource_name), | 981 : resource_name_(resource_name), |
981 resource_line_offset_(resource_line_offset), | 982 resource_line_offset_(resource_line_offset), |
982 resource_column_offset_(resource_column_offset), | 983 resource_column_offset_(resource_column_offset), |
984 resource_is_internal_script_(resource_is_internal_script), | |
yurys
2015/01/26 15:46:43
Would it make sense to have something like Script:
kozy
2015/01/26 16:42:13
Acknowledged.
| |
983 resource_is_shared_cross_origin_(resource_is_shared_cross_origin), | 985 resource_is_shared_cross_origin_(resource_is_shared_cross_origin), |
984 script_id_(script_id) { } | 986 script_id_(script_id) {} |
985 V8_INLINE Handle<Value> ResourceName() const; | 987 V8_INLINE Handle<Value> ResourceName() const; |
986 V8_INLINE Handle<Integer> ResourceLineOffset() const; | 988 V8_INLINE Handle<Integer> ResourceLineOffset() const; |
987 V8_INLINE Handle<Integer> ResourceColumnOffset() const; | 989 V8_INLINE Handle<Integer> ResourceColumnOffset() const; |
990 V8_INLINE Handle<Boolean> ResourceIsInternalScript() const; | |
yurys
2015/01/26 15:41:05
Can you add a comment to the method describing mea
kozy
2015/01/26 16:42:13
Done.
| |
988 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const; | 991 V8_INLINE Handle<Boolean> ResourceIsSharedCrossOrigin() const; |
989 V8_INLINE Handle<Integer> ScriptID() const; | 992 V8_INLINE Handle<Integer> ScriptID() const; |
990 private: | 993 private: |
991 Handle<Value> resource_name_; | 994 Handle<Value> resource_name_; |
992 Handle<Integer> resource_line_offset_; | 995 Handle<Integer> resource_line_offset_; |
993 Handle<Integer> resource_column_offset_; | 996 Handle<Integer> resource_column_offset_; |
997 Handle<Boolean> resource_is_internal_script_; | |
994 Handle<Boolean> resource_is_shared_cross_origin_; | 998 Handle<Boolean> resource_is_shared_cross_origin_; |
995 Handle<Integer> script_id_; | 999 Handle<Integer> script_id_; |
996 }; | 1000 }; |
997 | 1001 |
998 | 1002 |
999 /** | 1003 /** |
1000 * A compiled JavaScript script, not yet tied to a Context. | 1004 * A compiled JavaScript script, not yet tied to a Context. |
1001 */ | 1005 */ |
1002 class V8_EXPORT UnboundScript { | 1006 class V8_EXPORT UnboundScript { |
1003 public: | 1007 public: |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1129 // Prevent copying. Not implemented. | 1133 // Prevent copying. Not implemented. |
1130 Source(const Source&); | 1134 Source(const Source&); |
1131 Source& operator=(const Source&); | 1135 Source& operator=(const Source&); |
1132 | 1136 |
1133 Local<String> source_string; | 1137 Local<String> source_string; |
1134 | 1138 |
1135 // Origin information | 1139 // Origin information |
1136 Handle<Value> resource_name; | 1140 Handle<Value> resource_name; |
1137 Handle<Integer> resource_line_offset; | 1141 Handle<Integer> resource_line_offset; |
1138 Handle<Integer> resource_column_offset; | 1142 Handle<Integer> resource_column_offset; |
1143 Handle<Boolean> resource_is_internal_script; | |
1139 Handle<Boolean> resource_is_shared_cross_origin; | 1144 Handle<Boolean> resource_is_shared_cross_origin; |
1140 | 1145 |
1141 // Cached data from previous compilation (if a kConsume*Cache flag is | 1146 // Cached data from previous compilation (if a kConsume*Cache flag is |
1142 // set), or hold newly generated cache data (kProduce*Cache flags) are | 1147 // set), or hold newly generated cache data (kProduce*Cache flags) are |
1143 // set when calling a compile method. | 1148 // set when calling a compile method. |
1144 CachedData* cached_data; | 1149 CachedData* cached_data; |
1145 }; | 1150 }; |
1146 | 1151 |
1147 /** | 1152 /** |
1148 * For streaming incomplete script data to V8. The embedder should implement a | 1153 * For streaming incomplete script data to V8. The embedder should implement a |
(...skipping 5570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6719 Handle<Integer> ScriptOrigin::ResourceLineOffset() const { | 6724 Handle<Integer> ScriptOrigin::ResourceLineOffset() const { |
6720 return resource_line_offset_; | 6725 return resource_line_offset_; |
6721 } | 6726 } |
6722 | 6727 |
6723 | 6728 |
6724 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { | 6729 Handle<Integer> ScriptOrigin::ResourceColumnOffset() const { |
6725 return resource_column_offset_; | 6730 return resource_column_offset_; |
6726 } | 6731 } |
6727 | 6732 |
6728 | 6733 |
6734 Handle<Boolean> ScriptOrigin::ResourceIsInternalScript() const { | |
6735 return resource_is_internal_script_; | |
6736 } | |
6737 | |
6738 | |
6729 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { | 6739 Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const { |
6730 return resource_is_shared_cross_origin_; | 6740 return resource_is_shared_cross_origin_; |
6731 } | 6741 } |
6732 | 6742 |
6733 | 6743 |
6734 Handle<Integer> ScriptOrigin::ScriptID() const { | 6744 Handle<Integer> ScriptOrigin::ScriptID() const { |
6735 return script_id_; | 6745 return script_id_; |
6736 } | 6746 } |
6737 | 6747 |
6738 | 6748 |
6739 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, | 6749 ScriptCompiler::Source::Source(Local<String> string, const ScriptOrigin& origin, |
6740 CachedData* data) | 6750 CachedData* data) |
6741 : source_string(string), | 6751 : source_string(string), |
6742 resource_name(origin.ResourceName()), | 6752 resource_name(origin.ResourceName()), |
6743 resource_line_offset(origin.ResourceLineOffset()), | 6753 resource_line_offset(origin.ResourceLineOffset()), |
6744 resource_column_offset(origin.ResourceColumnOffset()), | 6754 resource_column_offset(origin.ResourceColumnOffset()), |
6755 resource_is_internal_script(origin.ResourceIsInternalScript()), | |
6745 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()), | 6756 resource_is_shared_cross_origin(origin.ResourceIsSharedCrossOrigin()), |
6746 cached_data(data) {} | 6757 cached_data(data) {} |
6747 | 6758 |
6748 | 6759 |
6749 ScriptCompiler::Source::Source(Local<String> string, | 6760 ScriptCompiler::Source::Source(Local<String> string, |
6750 CachedData* data) | 6761 CachedData* data) |
6751 : source_string(string), cached_data(data) {} | 6762 : source_string(string), cached_data(data) {} |
6752 | 6763 |
6753 | 6764 |
6754 ScriptCompiler::Source::~Source() { | 6765 ScriptCompiler::Source::~Source() { |
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7472 */ | 7483 */ |
7473 | 7484 |
7474 | 7485 |
7475 } // namespace v8 | 7486 } // namespace v8 |
7476 | 7487 |
7477 | 7488 |
7478 #undef TYPE_CHECK | 7489 #undef TYPE_CHECK |
7479 | 7490 |
7480 | 7491 |
7481 #endif // V8_H_ | 7492 #endif // V8_H_ |
OLD | NEW |