Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Side by Side Diff: src/factory.cc

Issue 225183009: Use OrderedHashTables as the backing store of JSSet and JSMap (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Get rid of IsOrderedHashSet/Map methods Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698