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

Side by Side Diff: src/factory.cc

Issue 1949493004: Use Null as "no accessor" in AccessorPair instead of TheHole (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | src/objects.cc » ('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 "src/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 184
185 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { 185 Handle<OrderedHashMap> Factory::NewOrderedHashMap() {
186 return OrderedHashMap::Allocate(isolate(), OrderedHashMap::kMinCapacity); 186 return OrderedHashMap::Allocate(isolate(), OrderedHashMap::kMinCapacity);
187 } 187 }
188 188
189 189
190 Handle<AccessorPair> Factory::NewAccessorPair() { 190 Handle<AccessorPair> Factory::NewAccessorPair() {
191 Handle<AccessorPair> accessors = 191 Handle<AccessorPair> accessors =
192 Handle<AccessorPair>::cast(NewStruct(ACCESSOR_PAIR_TYPE)); 192 Handle<AccessorPair>::cast(NewStruct(ACCESSOR_PAIR_TYPE));
193 accessors->set_getter(*the_hole_value(), SKIP_WRITE_BARRIER); 193 accessors->set_getter(*null_value(), SKIP_WRITE_BARRIER);
194 accessors->set_setter(*the_hole_value(), SKIP_WRITE_BARRIER); 194 accessors->set_setter(*null_value(), SKIP_WRITE_BARRIER);
195 return accessors; 195 return accessors;
196 } 196 }
197 197
198 198
199 Handle<TypeFeedbackInfo> Factory::NewTypeFeedbackInfo() { 199 Handle<TypeFeedbackInfo> Factory::NewTypeFeedbackInfo() {
200 Handle<TypeFeedbackInfo> info = 200 Handle<TypeFeedbackInfo> info =
201 Handle<TypeFeedbackInfo>::cast(NewStruct(TYPE_FEEDBACK_INFO_TYPE)); 201 Handle<TypeFeedbackInfo>::cast(NewStruct(TYPE_FEEDBACK_INFO_TYPE));
202 info->initialize_storage(); 202 info->initialize_storage();
203 return info; 203 return info;
204 } 204 }
(...skipping 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2371 } 2371 }
2372 2372
2373 2373
2374 Handle<Object> Factory::ToBoolean(bool value) { 2374 Handle<Object> Factory::ToBoolean(bool value) {
2375 return value ? true_value() : false_value(); 2375 return value ? true_value() : false_value();
2376 } 2376 }
2377 2377
2378 2378
2379 } // namespace internal 2379 } // namespace internal
2380 } // namespace v8 2380 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698