| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "factory.h" | 5 #include "factory.h" |
| 6 | 6 |
| 7 #include "isolate-inl.h" | 7 #include "isolate-inl.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 Handle<UnseededNumberDictionary> Factory::NewUnseededNumberDictionary( | 93 Handle<UnseededNumberDictionary> Factory::NewUnseededNumberDictionary( |
| 94 int at_least_space_for) { | 94 int at_least_space_for) { |
| 95 ASSERT(0 <= at_least_space_for); | 95 ASSERT(0 <= at_least_space_for); |
| 96 CALL_HEAP_FUNCTION(isolate(), | 96 CALL_HEAP_FUNCTION(isolate(), |
| 97 UnseededNumberDictionary::Allocate(isolate()->heap(), | 97 UnseededNumberDictionary::Allocate(isolate()->heap(), |
| 98 at_least_space_for), | 98 at_least_space_for), |
| 99 UnseededNumberDictionary); | 99 UnseededNumberDictionary); |
| 100 } | 100 } |
| 101 | 101 |
| 102 | 102 |
| 103 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) { | |
| 104 ASSERT(0 <= at_least_space_for); | |
| 105 CALL_HEAP_FUNCTION(isolate(), | |
| 106 ObjectHashSet::Allocate(isolate()->heap(), | |
| 107 at_least_space_for), | |
| 108 ObjectHashSet); | |
| 109 } | |
| 110 | |
| 111 | |
| 112 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { | 103 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { |
| 113 return OrderedHashSet::Allocate(isolate(), 4); | 104 return OrderedHashSet::Allocate(isolate(), 4); |
| 114 } | 105 } |
| 115 | 106 |
| 116 | 107 |
| 117 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { | 108 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { |
| 118 return OrderedHashMap::Allocate(isolate(), 4); | 109 return OrderedHashMap::Allocate(isolate(), 4); |
| 119 } | 110 } |
| 120 | 111 |
| 121 | 112 |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1958 if (name->Equals(h->infinity_string())) return infinity_value(); | 1949 if (name->Equals(h->infinity_string())) return infinity_value(); |
| 1959 return Handle<Object>::null(); | 1950 return Handle<Object>::null(); |
| 1960 } | 1951 } |
| 1961 | 1952 |
| 1962 | 1953 |
| 1963 Handle<Object> Factory::ToBoolean(bool value) { | 1954 Handle<Object> Factory::ToBoolean(bool value) { |
| 1964 return value ? true_value() : false_value(); | 1955 return value ? true_value() : false_value(); |
| 1965 } | 1956 } |
| 1966 | 1957 |
| 1967 } } // namespace v8::internal | 1958 } } // namespace v8::internal |
| OLD | NEW |