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

Side by Side Diff: src/objects-visiting.cc

Issue 390193007: Unify the IsShortcutCandidate predicate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/objects.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ic-inl.h" 7 #include "src/ic-inl.h"
8 #include "src/objects-visiting.h" 8 #include "src/objects-visiting.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 13
14 static inline bool IsShortcutCandidate(int type) {
15 return ((type & kShortcutTypeMask) == kShortcutTypeTag);
16 }
17
18
19 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId( 14 StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
20 int instance_type, 15 int instance_type,
21 int instance_size) { 16 int instance_size) {
22 if (instance_type < FIRST_NONSTRING_TYPE) { 17 if (instance_type < FIRST_NONSTRING_TYPE) {
23 switch (instance_type & kStringRepresentationMask) { 18 switch (instance_type & kStringRepresentationMask) {
24 case kSeqStringTag: 19 case kSeqStringTag:
25 if ((instance_type & kStringEncodingMask) == kOneByteStringTag) { 20 if ((instance_type & kStringEncodingMask) == kOneByteStringTag) {
26 return kVisitSeqOneByteString; 21 return kVisitSeqOneByteString;
27 } else { 22 } else {
28 return kVisitSeqTwoByteString; 23 return kVisitSeqTwoByteString;
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 446
452 447
453 template Object* VisitWeakList<JSArrayBuffer>( 448 template Object* VisitWeakList<JSArrayBuffer>(
454 Heap* heap, Object* list, WeakObjectRetainer* retainer); 449 Heap* heap, Object* list, WeakObjectRetainer* retainer);
455 450
456 451
457 template Object* VisitWeakList<AllocationSite>( 452 template Object* VisitWeakList<AllocationSite>(
458 Heap* heap, Object* list, WeakObjectRetainer* retainer); 453 Heap* heap, Object* list, WeakObjectRetainer* retainer);
459 454
460 } } // namespace v8::internal 455 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698