OLD | NEW |
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 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 ENTER_V8(isolate); | 2094 ENTER_V8(isolate); |
2095 i::HandleScope scope(isolate); | 2095 i::HandleScope scope(isolate); |
2096 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 2096 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
2097 i::Handle<i::Object> is_constructor = GetProperty(self, "isConstructor"); | 2097 i::Handle<i::Object> is_constructor = GetProperty(self, "isConstructor"); |
2098 return is_constructor->IsTrue(); | 2098 return is_constructor->IsTrue(); |
2099 } | 2099 } |
2100 | 2100 |
2101 | 2101 |
2102 // --- D a t a --- | 2102 // --- D a t a --- |
2103 | 2103 |
2104 bool Value::IsUndefined() const { | 2104 bool Value::FullIsUndefined() const { |
2105 if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsUndefined()")) { | 2105 if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsUndefined()")) { |
2106 return false; | 2106 return false; |
2107 } | 2107 } |
2108 return Utils::OpenHandle(this)->IsUndefined(); | 2108 bool result = Utils::OpenHandle(this)->IsUndefined(); |
| 2109 ASSERT_EQ(result, QuickIsUndefined()); |
| 2110 return result; |
2109 } | 2111 } |
2110 | 2112 |
2111 | 2113 |
2112 bool Value::IsNull() const { | 2114 bool Value::FullIsNull() const { |
2113 if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsNull()")) return false; | 2115 if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsNull()")) return false; |
2114 return Utils::OpenHandle(this)->IsNull(); | 2116 bool result = Utils::OpenHandle(this)->IsNull(); |
| 2117 ASSERT_EQ(result, QuickIsNull()); |
| 2118 return result; |
2115 } | 2119 } |
2116 | 2120 |
2117 | 2121 |
2118 bool Value::IsTrue() const { | 2122 bool Value::IsTrue() const { |
2119 if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsTrue()")) return false; | 2123 if (IsDeadCheck(i::Isolate::Current(), "v8::Value::IsTrue()")) return false; |
2120 return Utils::OpenHandle(this)->IsTrue(); | 2124 return Utils::OpenHandle(this)->IsTrue(); |
2121 } | 2125 } |
2122 | 2126 |
2123 | 2127 |
2124 bool Value::IsFalse() const { | 2128 bool Value::IsFalse() const { |
(...skipping 4283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6408 | 6412 |
6409 | 6413 |
6410 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6414 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6411 HandleScopeImplementer* scope_implementer = | 6415 HandleScopeImplementer* scope_implementer = |
6412 reinterpret_cast<HandleScopeImplementer*>(storage); | 6416 reinterpret_cast<HandleScopeImplementer*>(storage); |
6413 scope_implementer->IterateThis(v); | 6417 scope_implementer->IterateThis(v); |
6414 return storage + ArchiveSpacePerThread(); | 6418 return storage + ArchiveSpacePerThread(); |
6415 } | 6419 } |
6416 | 6420 |
6417 } } // namespace v8::internal | 6421 } } // namespace v8::internal |
OLD | NEW |