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

Side by Side Diff: src/api.h

Issue 13626002: ES6 symbols: extend V8 API to support symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added TODO Created 7 years, 8 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 | « include/v8.h ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 V(FunctionTemplate, FunctionTemplateInfo) \ 164 V(FunctionTemplate, FunctionTemplateInfo) \
165 V(ObjectTemplate, ObjectTemplateInfo) \ 165 V(ObjectTemplate, ObjectTemplateInfo) \
166 V(Signature, SignatureInfo) \ 166 V(Signature, SignatureInfo) \
167 V(AccessorSignature, FunctionTemplateInfo) \ 167 V(AccessorSignature, FunctionTemplateInfo) \
168 V(TypeSwitch, TypeSwitchInfo) \ 168 V(TypeSwitch, TypeSwitchInfo) \
169 V(Data, Object) \ 169 V(Data, Object) \
170 V(RegExp, JSRegExp) \ 170 V(RegExp, JSRegExp) \
171 V(Object, JSObject) \ 171 V(Object, JSObject) \
172 V(Array, JSArray) \ 172 V(Array, JSArray) \
173 V(String, String) \ 173 V(String, String) \
174 V(Symbol, Symbol) \
174 V(Script, Object) \ 175 V(Script, Object) \
175 V(Function, JSFunction) \ 176 V(Function, JSFunction) \
176 V(Message, JSObject) \ 177 V(Message, JSObject) \
177 V(Context, Context) \ 178 V(Context, Context) \
178 V(External, Foreign) \ 179 V(External, Foreign) \
179 V(StackTrace, JSArray) \ 180 V(StackTrace, JSArray) \
180 V(StackFrame, JSObject) \ 181 V(StackFrame, JSObject) \
181 V(DeclaredAccessorDescriptor, DeclaredAccessorDescriptor) 182 V(DeclaredAccessorDescriptor, DeclaredAccessorDescriptor)
182 183
183 184
184 class Utils { 185 class Utils {
185 public: 186 public:
186 static bool ReportApiFailure(const char* location, const char* message); 187 static bool ReportApiFailure(const char* location, const char* message);
187 188
188 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); 189 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj);
189 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); 190 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj);
190 191
191 static inline Local<Context> ToLocal( 192 static inline Local<Context> ToLocal(
192 v8::internal::Handle<v8::internal::Context> obj); 193 v8::internal::Handle<v8::internal::Context> obj);
193 static inline Local<Value> ToLocal( 194 static inline Local<Value> ToLocal(
194 v8::internal::Handle<v8::internal::Object> obj); 195 v8::internal::Handle<v8::internal::Object> obj);
195 static inline Local<Function> ToLocal( 196 static inline Local<Function> ToLocal(
196 v8::internal::Handle<v8::internal::JSFunction> obj); 197 v8::internal::Handle<v8::internal::JSFunction> obj);
197 static inline Local<String> ToLocal( 198 static inline Local<String> ToLocal(
198 v8::internal::Handle<v8::internal::String> obj); 199 v8::internal::Handle<v8::internal::String> obj);
200 static inline Local<Symbol> ToLocal(
201 v8::internal::Handle<v8::internal::Symbol> obj);
199 static inline Local<RegExp> ToLocal( 202 static inline Local<RegExp> ToLocal(
200 v8::internal::Handle<v8::internal::JSRegExp> obj); 203 v8::internal::Handle<v8::internal::JSRegExp> obj);
201 static inline Local<Object> ToLocal( 204 static inline Local<Object> ToLocal(
202 v8::internal::Handle<v8::internal::JSObject> obj); 205 v8::internal::Handle<v8::internal::JSObject> obj);
203 static inline Local<Array> ToLocal( 206 static inline Local<Array> ToLocal(
204 v8::internal::Handle<v8::internal::JSArray> obj); 207 v8::internal::Handle<v8::internal::JSArray> obj);
205 static inline Local<Message> MessageToLocal( 208 static inline Local<Message> MessageToLocal(
206 v8::internal::Handle<v8::internal::Object> obj); 209 v8::internal::Handle<v8::internal::Object> obj);
207 static inline Local<StackTrace> StackTraceToLocal( 210 static inline Local<StackTrace> StackTraceToLocal(
208 v8::internal::Handle<v8::internal::JSArray> obj); 211 v8::internal::Handle<v8::internal::JSArray> obj);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 #define MAKE_TO_LOCAL(Name, From, To) \ 264 #define MAKE_TO_LOCAL(Name, From, To) \
262 Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \ 265 Local<v8::To> Utils::Name(v8::internal::Handle<v8::internal::From> obj) { \
263 ASSERT(obj.is_null() || !obj->IsTheHole()); \ 266 ASSERT(obj.is_null() || !obj->IsTheHole()); \
264 return Local<To>(reinterpret_cast<To*>(obj.location())); \ 267 return Local<To>(reinterpret_cast<To*>(obj.location())); \
265 } 268 }
266 269
267 MAKE_TO_LOCAL(ToLocal, Context, Context) 270 MAKE_TO_LOCAL(ToLocal, Context, Context)
268 MAKE_TO_LOCAL(ToLocal, Object, Value) 271 MAKE_TO_LOCAL(ToLocal, Object, Value)
269 MAKE_TO_LOCAL(ToLocal, JSFunction, Function) 272 MAKE_TO_LOCAL(ToLocal, JSFunction, Function)
270 MAKE_TO_LOCAL(ToLocal, String, String) 273 MAKE_TO_LOCAL(ToLocal, String, String)
274 MAKE_TO_LOCAL(ToLocal, Symbol, Symbol)
271 MAKE_TO_LOCAL(ToLocal, JSRegExp, RegExp) 275 MAKE_TO_LOCAL(ToLocal, JSRegExp, RegExp)
272 MAKE_TO_LOCAL(ToLocal, JSObject, Object) 276 MAKE_TO_LOCAL(ToLocal, JSObject, Object)
273 MAKE_TO_LOCAL(ToLocal, JSArray, Array) 277 MAKE_TO_LOCAL(ToLocal, JSArray, Array)
274 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate) 278 MAKE_TO_LOCAL(ToLocal, FunctionTemplateInfo, FunctionTemplate)
275 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate) 279 MAKE_TO_LOCAL(ToLocal, ObjectTemplateInfo, ObjectTemplate)
276 MAKE_TO_LOCAL(ToLocal, SignatureInfo, Signature) 280 MAKE_TO_LOCAL(ToLocal, SignatureInfo, Signature)
277 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature) 281 MAKE_TO_LOCAL(AccessorSignatureToLocal, FunctionTemplateInfo, AccessorSignature)
278 MAKE_TO_LOCAL(ToLocal, TypeSwitchInfo, TypeSwitch) 282 MAKE_TO_LOCAL(ToLocal, TypeSwitchInfo, TypeSwitch)
279 MAKE_TO_LOCAL(MessageToLocal, Object, Message) 283 MAKE_TO_LOCAL(MessageToLocal, Object, Message)
280 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace) 284 MAKE_TO_LOCAL(StackTraceToLocal, JSArray, StackTrace)
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 stress_type_ = stress_type; 596 stress_type_ = stress_type;
593 } 597 }
594 598
595 private: 599 private:
596 static v8::Testing::StressType stress_type_; 600 static v8::Testing::StressType stress_type_;
597 }; 601 };
598 602
599 } } // namespace v8::internal 603 } } // namespace v8::internal
600 604
601 #endif // V8_API_H_ 605 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698