| 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 #ifndef V8_API_H_ | 5 #ifndef V8_API_H_ |
| 6 #define V8_API_H_ | 6 #define V8_API_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "include/v8-testing.h" | 10 #include "include/v8-testing.h" |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 V(Uint8Array, JSTypedArray) \ | 151 V(Uint8Array, JSTypedArray) \ |
| 152 V(Uint8ClampedArray, JSTypedArray) \ | 152 V(Uint8ClampedArray, JSTypedArray) \ |
| 153 V(Int8Array, JSTypedArray) \ | 153 V(Int8Array, JSTypedArray) \ |
| 154 V(Uint16Array, JSTypedArray) \ | 154 V(Uint16Array, JSTypedArray) \ |
| 155 V(Int16Array, JSTypedArray) \ | 155 V(Int16Array, JSTypedArray) \ |
| 156 V(Uint32Array, JSTypedArray) \ | 156 V(Uint32Array, JSTypedArray) \ |
| 157 V(Int32Array, JSTypedArray) \ | 157 V(Int32Array, JSTypedArray) \ |
| 158 V(Float32Array, JSTypedArray) \ | 158 V(Float32Array, JSTypedArray) \ |
| 159 V(Float64Array, JSTypedArray) \ | 159 V(Float64Array, JSTypedArray) \ |
| 160 V(DataView, JSDataView) \ | 160 V(DataView, JSDataView) \ |
| 161 V(Name, Name) \ |
| 161 V(String, String) \ | 162 V(String, String) \ |
| 162 V(Symbol, Symbol) \ | 163 V(Symbol, Symbol) \ |
| 163 V(Script, JSFunction) \ | 164 V(Script, JSFunction) \ |
| 164 V(UnboundScript, SharedFunctionInfo) \ | 165 V(UnboundScript, SharedFunctionInfo) \ |
| 165 V(Function, JSFunction) \ | 166 V(Function, JSFunction) \ |
| 166 V(Message, JSMessageObject) \ | 167 V(Message, JSMessageObject) \ |
| 167 V(Context, Context) \ | 168 V(Context, Context) \ |
| 168 V(External, Object) \ | 169 V(External, Object) \ |
| 169 V(StackTrace, JSArray) \ | 170 V(StackTrace, JSArray) \ |
| 170 V(StackFrame, JSObject) \ | 171 V(StackFrame, JSObject) \ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 182 | 183 |
| 183 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); | 184 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); |
| 184 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); | 185 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); |
| 185 | 186 |
| 186 static inline Local<Context> ToLocal( | 187 static inline Local<Context> ToLocal( |
| 187 v8::internal::Handle<v8::internal::Context> obj); | 188 v8::internal::Handle<v8::internal::Context> obj); |
| 188 static inline Local<Value> ToLocal( | 189 static inline Local<Value> ToLocal( |
| 189 v8::internal::Handle<v8::internal::Object> obj); | 190 v8::internal::Handle<v8::internal::Object> obj); |
| 190 static inline Local<Function> ToLocal( | 191 static inline Local<Function> ToLocal( |
| 191 v8::internal::Handle<v8::internal::JSFunction> obj); | 192 v8::internal::Handle<v8::internal::JSFunction> obj); |
| 193 static inline Local<Name> ToLocal( |
| 194 v8::internal::Handle<v8::internal::Name> obj); |
| 192 static inline Local<String> ToLocal( | 195 static inline Local<String> ToLocal( |
| 193 v8::internal::Handle<v8::internal::String> obj); | 196 v8::internal::Handle<v8::internal::String> obj); |
| 194 static inline Local<Symbol> ToLocal( | 197 static inline Local<Symbol> ToLocal( |
| 195 v8::internal::Handle<v8::internal::Symbol> obj); | 198 v8::internal::Handle<v8::internal::Symbol> obj); |
| 196 static inline Local<RegExp> ToLocal( | 199 static inline Local<RegExp> ToLocal( |
| 197 v8::internal::Handle<v8::internal::JSRegExp> obj); | 200 v8::internal::Handle<v8::internal::JSRegExp> obj); |
| 198 static inline Local<Object> ToLocal( | 201 static inline Local<Object> ToLocal( |
| 199 v8::internal::Handle<v8::internal::JSObject> obj); | 202 v8::internal::Handle<v8::internal::JSObject> obj); |
| 200 static inline Local<Array> ToLocal( | 203 static inline Local<Array> ToLocal( |
| 201 v8::internal::Handle<v8::internal::JSArray> obj); | 204 v8::internal::Handle<v8::internal::JSArray> obj); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 Local<v8::Type##Array> Utils::ToLocal##Type##Array( \ | 329 Local<v8::Type##Array> Utils::ToLocal##Type##Array( \ |
| 327 v8::internal::Handle<v8::internal::JSTypedArray> obj) { \ | 330 v8::internal::Handle<v8::internal::JSTypedArray> obj) { \ |
| 328 DCHECK(obj->type() == kExternal##Type##Array); \ | 331 DCHECK(obj->type() == kExternal##Type##Array); \ |
| 329 return Convert<v8::internal::JSTypedArray, v8::Type##Array>(obj); \ | 332 return Convert<v8::internal::JSTypedArray, v8::Type##Array>(obj); \ |
| 330 } | 333 } |
| 331 | 334 |
| 332 | 335 |
| 333 MAKE_TO_LOCAL(ToLocal, Context, Context) | 336 MAKE_TO_LOCAL(ToLocal, Context, Context) |
| 334 MAKE_TO_LOCAL(ToLocal, Object, Value) | 337 MAKE_TO_LOCAL(ToLocal, Object, Value) |
| 335 MAKE_TO_LOCAL(ToLocal, JSFunction, Function) | 338 MAKE_TO_LOCAL(ToLocal, JSFunction, Function) |
| 339 MAKE_TO_LOCAL(ToLocal, Name, Name) |
| 336 MAKE_TO_LOCAL(ToLocal, String, String) | 340 MAKE_TO_LOCAL(ToLocal, String, String) |
| 337 MAKE_TO_LOCAL(ToLocal, Symbol, Symbol) | 341 MAKE_TO_LOCAL(ToLocal, Symbol, Symbol) |
| 338 MAKE_TO_LOCAL(ToLocal, JSRegExp, RegExp) | 342 MAKE_TO_LOCAL(ToLocal, JSRegExp, RegExp) |
| 339 MAKE_TO_LOCAL(ToLocal, JSObject, Object) | 343 MAKE_TO_LOCAL(ToLocal, JSObject, Object) |
| 340 MAKE_TO_LOCAL(ToLocal, JSArray, Array) | 344 MAKE_TO_LOCAL(ToLocal, JSArray, Array) |
| 341 MAKE_TO_LOCAL(ToLocal, JSArrayBuffer, ArrayBuffer) | 345 MAKE_TO_LOCAL(ToLocal, JSArrayBuffer, ArrayBuffer) |
| 342 MAKE_TO_LOCAL(ToLocal, JSArrayBufferView, ArrayBufferView) | 346 MAKE_TO_LOCAL(ToLocal, JSArrayBufferView, ArrayBufferView) |
| 343 MAKE_TO_LOCAL(ToLocal, JSDataView, DataView) | 347 MAKE_TO_LOCAL(ToLocal, JSDataView, DataView) |
| 344 MAKE_TO_LOCAL(ToLocal, JSTypedArray, TypedArray) | 348 MAKE_TO_LOCAL(ToLocal, JSTypedArray, TypedArray) |
| 345 | 349 |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 spare_ = block_start; | 668 spare_ = block_start; |
| 665 } | 669 } |
| 666 DCHECK((blocks_.is_empty() && prev_limit == NULL) || | 670 DCHECK((blocks_.is_empty() && prev_limit == NULL) || |
| 667 (!blocks_.is_empty() && prev_limit != NULL)); | 671 (!blocks_.is_empty() && prev_limit != NULL)); |
| 668 } | 672 } |
| 669 | 673 |
| 670 | 674 |
| 671 // Interceptor functions called from generated inline caches to notify | 675 // Interceptor functions called from generated inline caches to notify |
| 672 // CPU profiler that external callbacks are invoked. | 676 // CPU profiler that external callbacks are invoked. |
| 673 void InvokeAccessorGetterCallback( | 677 void InvokeAccessorGetterCallback( |
| 674 v8::Local<v8::String> property, | 678 v8::Local<v8::Name> property, |
| 675 const v8::PropertyCallbackInfo<v8::Value>& info, | 679 const v8::PropertyCallbackInfo<v8::Value>& info, |
| 676 v8::AccessorGetterCallback getter); | 680 v8::AccessorNameGetterCallback getter); |
| 677 | 681 |
| 678 void InvokeFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>& info, | 682 void InvokeFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>& info, |
| 679 v8::FunctionCallback callback); | 683 v8::FunctionCallback callback); |
| 680 | 684 |
| 681 class Testing { | 685 class Testing { |
| 682 public: | 686 public: |
| 683 static v8::Testing::StressType stress_type() { return stress_type_; } | 687 static v8::Testing::StressType stress_type() { return stress_type_; } |
| 684 static void set_stress_type(v8::Testing::StressType stress_type) { | 688 static void set_stress_type(v8::Testing::StressType stress_type) { |
| 685 stress_type_ = stress_type; | 689 stress_type_ = stress_type; |
| 686 } | 690 } |
| 687 | 691 |
| 688 private: | 692 private: |
| 689 static v8::Testing::StressType stress_type_; | 693 static v8::Testing::StressType stress_type_; |
| 690 }; | 694 }; |
| 691 | 695 |
| 692 } } // namespace v8::internal | 696 } } // namespace v8::internal |
| 693 | 697 |
| 694 #endif // V8_API_H_ | 698 #endif // V8_API_H_ |
| OLD | NEW |