OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1785 } | 1785 } |
1786 | 1786 |
1787 | 1787 |
1788 bool Value::IsDate() const { | 1788 bool Value::IsDate() const { |
1789 if (IsDeadCheck("v8::Value::IsDate()")) return false; | 1789 if (IsDeadCheck("v8::Value::IsDate()")) return false; |
1790 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 1790 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
1791 return obj->HasSpecificClassOf(i::Heap::Date_symbol()); | 1791 return obj->HasSpecificClassOf(i::Heap::Date_symbol()); |
1792 } | 1792 } |
1793 | 1793 |
1794 | 1794 |
| 1795 bool Value::IsRegExp() const { |
| 1796 if (IsDeadCheck("v8::Value::IsRegExp()")) return false; |
| 1797 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
| 1798 return obj->IsJSRegExp(); |
| 1799 } |
| 1800 |
| 1801 |
1795 Local<String> Value::ToString() const { | 1802 Local<String> Value::ToString() const { |
1796 if (IsDeadCheck("v8::Value::ToString()")) return Local<String>(); | 1803 if (IsDeadCheck("v8::Value::ToString()")) return Local<String>(); |
1797 LOG_API("ToString"); | 1804 LOG_API("ToString"); |
1798 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 1805 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
1799 i::Handle<i::Object> str; | 1806 i::Handle<i::Object> str; |
1800 if (obj->IsString()) { | 1807 if (obj->IsString()) { |
1801 str = obj; | 1808 str = obj; |
1802 } else { | 1809 } else { |
1803 ENTER_V8; | 1810 ENTER_V8; |
1804 EXCEPTION_PREAMBLE(); | 1811 EXCEPTION_PREAMBLE(); |
(...skipping 2995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4800 | 4807 |
4801 | 4808 |
4802 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4809 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
4803 HandleScopeImplementer* thread_local = | 4810 HandleScopeImplementer* thread_local = |
4804 reinterpret_cast<HandleScopeImplementer*>(storage); | 4811 reinterpret_cast<HandleScopeImplementer*>(storage); |
4805 thread_local->IterateThis(v); | 4812 thread_local->IterateThis(v); |
4806 return storage + ArchiveSpacePerThread(); | 4813 return storage + ArchiveSpacePerThread(); |
4807 } | 4814 } |
4808 | 4815 |
4809 } } // namespace v8::internal | 4816 } } // namespace v8::internal |
OLD | NEW |