Lines Matching refs:v8
1 // Copyright 2012 the V8 project authors. All rights reserved.
31 #include "v8.h"
33 #include "../include/v8-testing.h"
40 namespace v8 {
44 // we want to keep them out of v8.h because it is an externally
60 explicit inline NeanderObject(v8::internal::Handle<v8::internal::Object> obj);
61 explicit inline NeanderObject(v8::internal::Object* obj);
62 inline v8::internal::Object* get(int index);
63 inline void set(int index, v8::internal::Object* value);
64 inline v8::internal::Handle<v8::internal::JSObject> value() { return value_; }
67 v8::internal::Handle<v8::internal::JSObject> value_;
76 explicit inline NeanderArray(v8::internal::Handle<v8::internal::Object> obj);
77 inline v8::internal::Handle<v8::internal::JSObject> value() {
81 void add(v8::internal::Handle<v8::internal::Object> value);
85 v8::internal::Object* get(int index);
88 void set(int index, v8::internal::Object* value);
94 NeanderObject::NeanderObject(v8::internal::Handle<v8::internal::Object> obj)
95 : value_(v8::internal::Handle<v8::internal::JSObject>::cast(obj)) { }
98 NeanderObject::NeanderObject(v8::internal::Object* obj)
99 : value_(v8::internal::Handle<v8::internal::JSObject>(
100 v8::internal::JSObject::cast(obj))) { }
103 NeanderArray::NeanderArray(v8::internal::Handle<v8::internal::Object> obj)
107 v8::internal::Object* NeanderObject::get(int offset) {
109 return v8::internal::FixedArray::cast(value()->elements())->get(offset);
113 void NeanderObject::set(int offset, v8::internal::Object* value) {
115 v8::internal::FixedArray::cast(value_->elements())->set(offset, value);
119 template <typename T> inline T ToCData(v8::internal::Object* obj) {
120 STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address));
123 v8::internal::Foreign::cast(obj)->foreign_address()));
128 inline v8::internal::Handle<v8::internal::Object> FromCData(T obj) {
129 STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address));
131 reinterpret_cast<v8::internal::Address>(reinterpret_cast<intptr_t>(obj)));
137 explicit ApiFunction(v8::internal::Address addr) : addr_(addr) { }
138 v8::internal::Address address() { return addr_; }
140 v8::internal::Address addr_;
169 v8::internal::Handle<v8::internal::Context> obj);
171 v8::internal::Handle<v8::internal::Object> obj);
173 v8::internal::Handle<v8::internal::JSFunction> obj);
175 v8::internal::Handle<v8::internal::String> obj);
177 v8::internal::Handle<v8::internal::JSRegExp> obj);
179 v8::internal::Handle<v8::internal::JSObject> obj);
181 v8::internal::Handle<v8::internal::JSArray> obj);
183 v8::internal::Handle<v8::internal::Foreign> obj);
185 v8::internal::Handle<v8::internal::Object> obj);
187 v8::internal::Handle<v8::internal::JSArray> obj);
189 v8::internal::Handle<v8::internal::JSObject> obj);
191 v8::internal::Handle<v8::internal::Object> obj);
193 v8::internal::Handle<v8::internal::Object> obj);
195 v8::internal::Handle<v8::internal::Object> obj);
197 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj);
199 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj);
201 v8::internal::Handle<v8::internal::SignatureInfo> obj);
203 v8::internal::Handle<v8::internal::TypeSwitchInfo> obj);
205 static inline v8::internal::Handle<v8::internal::TemplateInfo>
207 static inline v8::internal::Handle<v8::internal::FunctionTemplateInfo>
209 static inline v8::internal::Handle<v8::internal::ObjectTemplateInfo>
211 static inline v8::internal::Handle<v8::internal::Object>
213 static inline v8::internal::Handle<v8::internal::JSRegExp>
215 static inline v8::internal::Handle<v8::internal::JSObject>
216 OpenHandle(const v8::Object* data);
217 static inline v8::internal::Handle<v8::internal::JSArray>
218 OpenHandle(const v8::Array* data);
219 static inline v8::internal::Handle<v8::internal::String>
221 static inline v8::internal::Handle<v8::internal::Object>
223 static inline v8::internal::Handle<v8::internal::JSFunction>
225 static inline v8::internal::Handle<v8::internal::JSObject>
227 static inline v8::internal::Handle<v8::internal::JSArray>
229 static inline v8::internal::Handle<v8::internal::JSObject>
231 static inline v8::internal::Handle<v8::internal::Context>
232 OpenHandle(const v8::Context* context);
233 static inline v8::internal::Handle<v8::internal::SignatureInfo>
234 OpenHandle(const v8::Signature* sig);
235 static inline v8::internal::Handle<v8::internal::TypeSwitchInfo>
236 OpenHandle(const v8::TypeSwitch* that);
237 static inline v8::internal::Handle<v8::internal::Foreign>
238 OpenHandle(const v8::External* that);
243 inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) {
249 v8::internal::Handle<T> v8::internal::Handle<T>::EscapeFrom(
250 v8::HandleScope* scope) {
251 v8::internal::Handle<T> handle;
262 Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
292 v8::internal::Handle<v8::internal::To> Utils::OpenHandle(\
293 const v8::From* that) { \
294 return v8::internal::Handle<v8::internal::To>( \
295 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \
394 // data. In multithreaded V8 programs this data is copied in and out of storage
418 void Iterate(v8::internal::ObjectVisitor* v);
419 static char* Iterate(v8::internal::ObjectVisitor* v, char* data);
474 v8::ImplementationUtilities::HandleScopeData handle_scope_data_;
484 const int kHandleBlockSize = v8::internal::KB - 2; // fit in one page
543 v8::ImplementationUtilities::ZapHandleRange(block_start, block_limit);
557 static v8::Testing::StressType stress_type() { return stress_type_; }
558 static void set_stress_type(v8::Testing::StressType stress_type) {
563 static v8::Testing::StressType stress_type_;
566 } } // namespace v8::internal