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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 1989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2000 class V8_EXPORT Primitive : public Value { }; | 2000 class V8_EXPORT Primitive : public Value { }; |
2001 | 2001 |
2002 | 2002 |
2003 /** | 2003 /** |
2004 * A primitive boolean value (ECMA-262, 4.3.14). Either the true | 2004 * A primitive boolean value (ECMA-262, 4.3.14). Either the true |
2005 * or false value. | 2005 * or false value. |
2006 */ | 2006 */ |
2007 class V8_EXPORT Boolean : public Primitive { | 2007 class V8_EXPORT Boolean : public Primitive { |
2008 public: | 2008 public: |
2009 bool Value() const; | 2009 bool Value() const; |
| 2010 V8_INLINE static Boolean* Cast(v8::Value* obj); |
2010 V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); | 2011 V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); |
| 2012 private: |
| 2013 static void CheckCast(v8::Value* obj); |
2011 }; | 2014 }; |
2012 | 2015 |
2013 | 2016 |
2014 /** | 2017 /** |
2015 * A superclass for symbols and strings. | 2018 * A superclass for symbols and strings. |
2016 */ | 2019 */ |
2017 class V8_EXPORT Name : public Primitive { | 2020 class V8_EXPORT Name : public Primitive { |
2018 public: | 2021 public: |
2019 /** | 2022 /** |
2020 * Returns the identity hash for this object. The current implementation | 2023 * Returns the identity hash for this object. The current implementation |
(...skipping 5259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7280 | 7283 |
7281 | 7284 |
7282 Local<Uint32> Value::ToUint32() const { | 7285 Local<Uint32> Value::ToUint32() const { |
7283 return ToUint32(Isolate::GetCurrent()); | 7286 return ToUint32(Isolate::GetCurrent()); |
7284 } | 7287 } |
7285 | 7288 |
7286 | 7289 |
7287 Local<Int32> Value::ToInt32() const { return ToInt32(Isolate::GetCurrent()); } | 7290 Local<Int32> Value::ToInt32() const { return ToInt32(Isolate::GetCurrent()); } |
7288 | 7291 |
7289 | 7292 |
| 7293 Boolean* Boolean::Cast(v8::Value* value) { |
| 7294 #ifdef V8_ENABLE_CHECKS |
| 7295 CheckCast(value); |
| 7296 #endif |
| 7297 return static_cast<Boolean*>(value); |
| 7298 } |
| 7299 |
| 7300 |
7290 Name* Name::Cast(v8::Value* value) { | 7301 Name* Name::Cast(v8::Value* value) { |
7291 #ifdef V8_ENABLE_CHECKS | 7302 #ifdef V8_ENABLE_CHECKS |
7292 CheckCast(value); | 7303 CheckCast(value); |
7293 #endif | 7304 #endif |
7294 return static_cast<Name*>(value); | 7305 return static_cast<Name*>(value); |
7295 } | 7306 } |
7296 | 7307 |
7297 | 7308 |
7298 Symbol* Symbol::Cast(v8::Value* value) { | 7309 Symbol* Symbol::Cast(v8::Value* value) { |
7299 #ifdef V8_ENABLE_CHECKS | 7310 #ifdef V8_ENABLE_CHECKS |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7801 */ | 7812 */ |
7802 | 7813 |
7803 | 7814 |
7804 } // namespace v8 | 7815 } // namespace v8 |
7805 | 7816 |
7806 | 7817 |
7807 #undef TYPE_CHECK | 7818 #undef TYPE_CHECK |
7808 | 7819 |
7809 | 7820 |
7810 #endif // V8_H_ | 7821 #endif // V8_H_ |
OLD | NEW |