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

Side by Side Diff: src/factory.cc

Issue 220293002: OrderedHashTable implementation with Set and Map interfaces (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing 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/objects.h » ('j') | src/objects.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) { 136 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) {
137 ASSERT(0 <= at_least_space_for); 137 ASSERT(0 <= at_least_space_for);
138 CALL_HEAP_FUNCTION(isolate(), 138 CALL_HEAP_FUNCTION(isolate(),
139 ObjectHashSet::Allocate(isolate()->heap(), 139 ObjectHashSet::Allocate(isolate()->heap(),
140 at_least_space_for), 140 at_least_space_for),
141 ObjectHashSet); 141 ObjectHashSet);
142 } 142 }
143 143
144 144
145 Handle<OrderedHashSet> Factory::NewOrderedHashSet() {
146 return OrderedHashSet::Allocate(isolate(), 4);
147 }
148
149
150 Handle<OrderedHashMap> Factory::NewOrderedHashMap() {
151 return OrderedHashMap::Allocate(isolate(), 4);
152 }
153
154
145 Handle<ObjectHashTable> Factory::NewObjectHashTable( 155 Handle<ObjectHashTable> Factory::NewObjectHashTable(
146 int at_least_space_for, 156 int at_least_space_for,
147 MinimumCapacity capacity_option) { 157 MinimumCapacity capacity_option) {
148 ASSERT(0 <= at_least_space_for); 158 ASSERT(0 <= at_least_space_for);
149 CALL_HEAP_FUNCTION(isolate(), 159 CALL_HEAP_FUNCTION(isolate(),
150 ObjectHashTable::Allocate(isolate()->heap(), 160 ObjectHashTable::Allocate(isolate()->heap(),
151 at_least_space_for, 161 at_least_space_for,
152 capacity_option), 162 capacity_option),
153 ObjectHashTable); 163 ObjectHashTable);
154 } 164 }
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 return Handle<Object>::null(); 2044 return Handle<Object>::null();
2035 } 2045 }
2036 2046
2037 2047
2038 Handle<Object> Factory::ToBoolean(bool value) { 2048 Handle<Object> Factory::ToBoolean(bool value) {
2039 return value ? true_value() : false_value(); 2049 return value ? true_value() : false_value();
2040 } 2050 }
2041 2051
2042 2052
2043 } } // namespace v8::internal 2053 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.h ('k') | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698