Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Side by Side Diff: src/api.h

Issue 18096: Experimental: merge from bleeding_edge. Merge up to and including... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/SConscript ('k') | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 static inline Local<FunctionTemplate> ToLocal( 230 static inline Local<FunctionTemplate> ToLocal(
231 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj); 231 v8::internal::Handle<v8::internal::FunctionTemplateInfo> obj);
232 static inline Local<ObjectTemplate> ToLocal( 232 static inline Local<ObjectTemplate> ToLocal(
233 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj); 233 v8::internal::Handle<v8::internal::ObjectTemplateInfo> obj);
234 static inline Local<Signature> ToLocal( 234 static inline Local<Signature> ToLocal(
235 v8::internal::Handle<v8::internal::SignatureInfo> obj); 235 v8::internal::Handle<v8::internal::SignatureInfo> obj);
236 static inline Local<TypeSwitch> ToLocal( 236 static inline Local<TypeSwitch> ToLocal(
237 v8::internal::Handle<v8::internal::TypeSwitchInfo> obj); 237 v8::internal::Handle<v8::internal::TypeSwitchInfo> obj);
238 238
239 static inline v8::internal::Handle<v8::internal::TemplateInfo> 239 static inline v8::internal::Handle<v8::internal::TemplateInfo>
240 OpenHandle(Template* that); 240 OpenHandle(const Template* that);
241 static inline v8::internal::Handle<v8::internal::FunctionTemplateInfo> 241 static inline v8::internal::Handle<v8::internal::FunctionTemplateInfo>
242 OpenHandle(FunctionTemplate* that); 242 OpenHandle(const FunctionTemplate* that);
243 static inline v8::internal::Handle<v8::internal::ObjectTemplateInfo> 243 static inline v8::internal::Handle<v8::internal::ObjectTemplateInfo>
244 OpenHandle(ObjectTemplate* that); 244 OpenHandle(const ObjectTemplate* that);
245 static inline v8::internal::Handle<v8::internal::Object> 245 static inline v8::internal::Handle<v8::internal::Object>
246 OpenHandle(Data* data); 246 OpenHandle(const Data* data);
247 static inline v8::internal::Handle<v8::internal::JSObject> 247 static inline v8::internal::Handle<v8::internal::JSObject>
248 OpenHandle(v8::Object* data); 248 OpenHandle(const v8::Object* data);
249 static inline v8::internal::Handle<v8::internal::JSArray> 249 static inline v8::internal::Handle<v8::internal::JSArray>
250 OpenHandle(v8::Array* data); 250 OpenHandle(const v8::Array* data);
251 static inline v8::internal::Handle<v8::internal::String> 251 static inline v8::internal::Handle<v8::internal::String>
252 OpenHandle(String* data); 252 OpenHandle(const String* data);
253 static inline v8::internal::Handle<v8::internal::JSFunction> 253 static inline v8::internal::Handle<v8::internal::JSFunction>
254 OpenHandle(Script* data); 254 OpenHandle(const Script* data);
255 static inline v8::internal::Handle<v8::internal::JSFunction> 255 static inline v8::internal::Handle<v8::internal::JSFunction>
256 OpenHandle(Function* data); 256 OpenHandle(const Function* data);
257 static inline v8::internal::Handle<v8::internal::JSObject> 257 static inline v8::internal::Handle<v8::internal::JSObject>
258 OpenHandle(Message* message); 258 OpenHandle(const Message* message);
259 static inline v8::internal::Handle<v8::internal::Context> 259 static inline v8::internal::Handle<v8::internal::Context>
260 OpenHandle(v8::Context* context); 260 OpenHandle(const v8::Context* context);
261 static inline v8::internal::Handle<v8::internal::SignatureInfo> 261 static inline v8::internal::Handle<v8::internal::SignatureInfo>
262 OpenHandle(v8::Signature* sig); 262 OpenHandle(const v8::Signature* sig);
263 static inline v8::internal::Handle<v8::internal::TypeSwitchInfo> 263 static inline v8::internal::Handle<v8::internal::TypeSwitchInfo>
264 OpenHandle(v8::TypeSwitch* that); 264 OpenHandle(const v8::TypeSwitch* that);
265 static inline v8::internal::Handle<v8::internal::Proxy> 265 static inline v8::internal::Handle<v8::internal::Proxy>
266 OpenHandle(v8::External* that); 266 OpenHandle(const v8::External* that);
267 }; 267 };
268 268
269 269
270 template <class T> 270 template <class T>
271 static inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) { 271 static inline T* ToApi(v8::internal::Handle<v8::internal::Object> obj) {
272 return reinterpret_cast<T*>(obj.location()); 272 return reinterpret_cast<T*>(obj.location());
273 } 273 }
274 274
275 275
276 template <class T> 276 template <class T>
(...skipping 25 matching lines...) Expand all
302 MAKE_TO_LOCAL(NumberToLocal, Object, Number) 302 MAKE_TO_LOCAL(NumberToLocal, Object, Number)
303 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer) 303 MAKE_TO_LOCAL(IntegerToLocal, Object, Integer)
304 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32) 304 MAKE_TO_LOCAL(Uint32ToLocal, Object, Uint32)
305 305
306 #undef MAKE_TO_LOCAL 306 #undef MAKE_TO_LOCAL
307 307
308 308
309 // Implementations of OpenHandle 309 // Implementations of OpenHandle
310 310
311 #define MAKE_OPEN_HANDLE(From, To) \ 311 #define MAKE_OPEN_HANDLE(From, To) \
312 v8::internal::Handle<v8::internal::To> Utils::OpenHandle(v8::From* that) { \ 312 v8::internal::Handle<v8::internal::To> Utils::OpenHandle(\
313 const v8::From* that) { \
313 return v8::internal::Handle<v8::internal::To>( \ 314 return v8::internal::Handle<v8::internal::To>( \
314 reinterpret_cast<v8::internal::To**>(that)); \ 315 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \
315 } 316 }
316 317
317 MAKE_OPEN_HANDLE(Template, TemplateInfo) 318 MAKE_OPEN_HANDLE(Template, TemplateInfo)
318 MAKE_OPEN_HANDLE(FunctionTemplate, FunctionTemplateInfo) 319 MAKE_OPEN_HANDLE(FunctionTemplate, FunctionTemplateInfo)
319 MAKE_OPEN_HANDLE(ObjectTemplate, ObjectTemplateInfo) 320 MAKE_OPEN_HANDLE(ObjectTemplate, ObjectTemplateInfo)
320 MAKE_OPEN_HANDLE(Signature, SignatureInfo) 321 MAKE_OPEN_HANDLE(Signature, SignatureInfo)
321 MAKE_OPEN_HANDLE(TypeSwitch, TypeSwitchInfo) 322 MAKE_OPEN_HANDLE(TypeSwitch, TypeSwitchInfo)
322 MAKE_OPEN_HANDLE(Data, Object) 323 MAKE_OPEN_HANDLE(Data, Object)
323 MAKE_OPEN_HANDLE(Object, JSObject) 324 MAKE_OPEN_HANDLE(Object, JSObject)
324 MAKE_OPEN_HANDLE(Array, JSArray) 325 MAKE_OPEN_HANDLE(Array, JSArray)
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 #ifdef DEBUG 482 #ifdef DEBUG
482 ImplementationUtilities::ZapHandleRange( 483 ImplementationUtilities::ZapHandleRange(
483 reinterpret_cast<void**>(spare), 484 reinterpret_cast<void**>(spare),
484 reinterpret_cast<void**>(&spare[kHandleBlockSize])); 485 reinterpret_cast<void**>(&spare[kHandleBlockSize]));
485 #endif 486 #endif
486 } 487 }
487 488
488 } } // namespace v8::internal 489 } } // namespace v8::internal
489 490
490 #endif // V8_API_H_ 491 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698