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

Side by Side Diff: src/api.h

Issue 3585010: API: expose RegExp. (Closed)
Patch Set: Created 10 years, 2 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
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); 167 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj);
168 168
169 static inline Local<Context> ToLocal( 169 static inline Local<Context> ToLocal(
170 v8::internal::Handle<v8::internal::Context> obj); 170 v8::internal::Handle<v8::internal::Context> obj);
171 static inline Local<Value> ToLocal( 171 static inline Local<Value> ToLocal(
172 v8::internal::Handle<v8::internal::Object> obj); 172 v8::internal::Handle<v8::internal::Object> obj);
173 static inline Local<Function> ToLocal( 173 static inline Local<Function> ToLocal(
174 v8::internal::Handle<v8::internal::JSFunction> obj); 174 v8::internal::Handle<v8::internal::JSFunction> obj);
175 static inline Local<String> ToLocal( 175 static inline Local<String> ToLocal(
176 v8::internal::Handle<v8::internal::String> obj); 176 v8::internal::Handle<v8::internal::String> obj);
177 static inline Local<RegExp> ToLocal(
178 v8::internal::Handle<v8::internal::JSRegExp> obj);
177 static inline Local<Object> ToLocal( 179 static inline Local<Object> ToLocal(
178 v8::internal::Handle<v8::internal::JSObject> obj); 180 v8::internal::Handle<v8::internal::JSObject> obj);
179 static inline Local<Array> ToLocal( 181 static inline Local<Array> ToLocal(
180 v8::internal::Handle<v8::internal::JSArray> obj); 182 v8::internal::Handle<v8::internal::JSArray> obj);
181 static inline Local<External> ToLocal( 183 static inline Local<External> ToLocal(
182 v8::internal::Handle<v8::internal::Proxy> obj); 184 v8::internal::Handle<v8::internal::Proxy> obj);
183 static inline Local<Message> MessageToLocal( 185 static inline Local<Message> MessageToLocal(
184 v8::internal::Handle<v8::internal::Object> obj); 186 v8::internal::Handle<v8::internal::Object> obj);
185 static inline Local<StackTrace> StackTraceToLocal( 187 static inline Local<StackTrace> StackTraceToLocal(
186 v8::internal::Handle<v8::internal::JSArray> obj); 188 v8::internal::Handle<v8::internal::JSArray> obj);
(...skipping 15 matching lines...) Expand all
202 v8::internal::Handle<v8::internal::TypeSwitchInfo> obj); 204 v8::internal::Handle<v8::internal::TypeSwitchInfo> obj);
203 205
204 static inline v8::internal::Handle<v8::internal::TemplateInfo> 206 static inline v8::internal::Handle<v8::internal::TemplateInfo>
205 OpenHandle(const Template* that); 207 OpenHandle(const Template* that);
206 static inline v8::internal::Handle<v8::internal::FunctionTemplateInfo> 208 static inline v8::internal::Handle<v8::internal::FunctionTemplateInfo>
207 OpenHandle(const FunctionTemplate* that); 209 OpenHandle(const FunctionTemplate* that);
208 static inline v8::internal::Handle<v8::internal::ObjectTemplateInfo> 210 static inline v8::internal::Handle<v8::internal::ObjectTemplateInfo>
209 OpenHandle(const ObjectTemplate* that); 211 OpenHandle(const ObjectTemplate* that);
210 static inline v8::internal::Handle<v8::internal::Object> 212 static inline v8::internal::Handle<v8::internal::Object>
211 OpenHandle(const Data* data); 213 OpenHandle(const Data* data);
214 static inline v8::internal::Handle<v8::internal::JSRegExp>
215 OpenHandle(const RegExp* data);
212 static inline v8::internal::Handle<v8::internal::JSObject> 216 static inline v8::internal::Handle<v8::internal::JSObject>
213 OpenHandle(const v8::Object* data); 217 OpenHandle(const v8::Object* data);
214 static inline v8::internal::Handle<v8::internal::JSArray> 218 static inline v8::internal::Handle<v8::internal::JSArray>
215 OpenHandle(const v8::Array* data); 219 OpenHandle(const v8::Array* data);
216 static inline v8::internal::Handle<v8::internal::String> 220 static inline v8::internal::Handle<v8::internal::String>
217 OpenHandle(const String* data); 221 OpenHandle(const String* data);
218 static inline v8::internal::Handle<v8::internal::Object> 222 static inline v8::internal::Handle<v8::internal::Object>
219 OpenHandle(const Script* data); 223 OpenHandle(const Script* data);
220 static inline v8::internal::Handle<v8::internal::JSFunction> 224 static inline v8::internal::Handle<v8::internal::JSFunction>
221 OpenHandle(const Function* data); 225 OpenHandle(const Function* data);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 #define MAKE_TO_LOCAL(Name, From, To) \ 262 #define MAKE_TO_LOCAL(Name, From, To) \
259 Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \ 263 Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
260 ASSERT(obj.is_null() || !obj->IsTheHole()); \ 264 ASSERT(obj.is_null() || !obj->IsTheHole()); \
261 return Local<To>(reinterpret_cast<To*>(obj.location())); \ 265 return Local<To>(reinterpret_cast<To*>(obj.location())); \
262 } 266 }
263 267
264 MAKE_TO_LOCAL(ToLocal, Context, Context) 268 MAKE_TO_LOCAL(ToLocal, Context, Context)
265 MAKE_TO_LOCAL(ToLocal, Object, Value) 269 MAKE_TO_LOCAL(ToLocal, Object, Value)
266 MAKE_TO_LOCAL(ToLocal, JSFunction, Function) 270 MAKE_TO_LOCAL(ToLocal, JSFunction, Function)
267 MAKE_TO_LOCAL(ToLocal, String, String) 271 MAKE_TO_LOCAL(ToLocal, String, String)
272 MAKE_TO_LOCAL(ToLocal, JSRegExp, RegExp)
268 MAKE_TO_LOCAL(ToLocal, JSObject, Object) 273 MAKE_TO_LOCAL(ToLocal, JSObject, Object)
269 MAKE_TO_LOCAL(ToLocal, JSArray, Array) 274 MAKE_TO_LOCAL(ToLocal, JSArray, Array)
270 MAKE_TO_LOCAL(ToLocal, Proxy, External) 275 MAKE_TO_LOCAL(ToLocal, Proxy, External)
271 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) 276 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate)
272 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) 277 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate)
273 MAKE_TO_LOCAL(ToLocal, SignatureInfo, Signature) 278 MAKE_TO_LOCAL(ToLocal, SignatureInfo, Signature)
274 MAKE_TO_LOCAL(ToLocal, TypeSwitchInfo, TypeSwitch) 279 MAKE_TO_LOCAL(ToLocal, TypeSwitchInfo, TypeSwitch)
275 MAKE_TO_LOCAL(MessageToLocal, Object, Message) 280 MAKE_TO_LOCAL(MessageToLocal, Object, Message)
276 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) 281 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace)
277 MAKE_TO_LOCAL(StackFrameToLocal, JSObject, StackFrame) 282 MAKE_TO_LOCAL(StackFrameToLocal, JSObject, StackFrame)
(...skipping 12 matching lines...) Expand all
290 return v8::internal::Handle<v8::internal::To>( \ 295 return v8::internal::Handle<v8::internal::To>( \
291 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \ 296 reinterpret_cast<v8::internal::To**>(const_cast<v8::From*>(that))); \
292 } 297 }
293 298
294 MAKE_OPEN_HANDLE(Template, TemplateInfo) 299 MAKE_OPEN_HANDLE(Template, TemplateInfo)
295 MAKE_OPEN_HANDLE(FunctionTemplate, FunctionTemplateInfo) 300 MAKE_OPEN_HANDLE(FunctionTemplate, FunctionTemplateInfo)
296 MAKE_OPEN_HANDLE(ObjectTemplate, ObjectTemplateInfo) 301 MAKE_OPEN_HANDLE(ObjectTemplate, ObjectTemplateInfo)
297 MAKE_OPEN_HANDLE(Signature, SignatureInfo) 302 MAKE_OPEN_HANDLE(Signature, SignatureInfo)
298 MAKE_OPEN_HANDLE(TypeSwitch, TypeSwitchInfo) 303 MAKE_OPEN_HANDLE(TypeSwitch, TypeSwitchInfo)
299 MAKE_OPEN_HANDLE(Data, Object) 304 MAKE_OPEN_HANDLE(Data, Object)
305 MAKE_OPEN_HANDLE(RegExp, JSRegExp)
300 MAKE_OPEN_HANDLE(Object, JSObject) 306 MAKE_OPEN_HANDLE(Object, JSObject)
301 MAKE_OPEN_HANDLE(Array, JSArray) 307 MAKE_OPEN_HANDLE(Array, JSArray)
302 MAKE_OPEN_HANDLE(String, String) 308 MAKE_OPEN_HANDLE(String, String)
303 MAKE_OPEN_HANDLE(Script, Object) 309 MAKE_OPEN_HANDLE(Script, Object)
304 MAKE_OPEN_HANDLE(Function, JSFunction) 310 MAKE_OPEN_HANDLE(Function, JSFunction)
305 MAKE_OPEN_HANDLE(Message, JSObject) 311 MAKE_OPEN_HANDLE(Message, JSObject)
306 MAKE_OPEN_HANDLE(Context, Context) 312 MAKE_OPEN_HANDLE(Context, Context)
307 MAKE_OPEN_HANDLE(External, Proxy) 313 MAKE_OPEN_HANDLE(External, Proxy)
308 MAKE_OPEN_HANDLE(StackTrace, JSArray) 314 MAKE_OPEN_HANDLE(StackTrace, JSArray)
309 MAKE_OPEN_HANDLE(StackFrame, JSObject) 315 MAKE_OPEN_HANDLE(StackFrame, JSObject)
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 #ifdef DEBUG 482 #ifdef DEBUG
477 v8::ImplementationUtilities::ZapHandleRange( 483 v8::ImplementationUtilities::ZapHandleRange(
478 spare_, 484 spare_,
479 &spare_[kHandleBlockSize]); 485 &spare_[kHandleBlockSize]);
480 #endif 486 #endif
481 } 487 }
482 488
483 } } // namespace v8::internal 489 } } // namespace v8::internal
484 490
485 #endif // V8_API_H_ 491 #endif // V8_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698