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

Side by Side Diff: src/ic/x64/stub-cache-x64.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_NULL/NOT_NULL is back. Created 5 years, 10 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 | « src/ic/ic-state.h ('k') | src/isolate.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 12 matching lines...) Expand all
23 // The offset is scaled by 4, based on 23 // The offset is scaled by 4, based on
24 // kCacheIndexShift, which is two bits 24 // kCacheIndexShift, which is two bits
25 Register offset) { 25 Register offset) {
26 // We need to scale up the pointer by 2 when the offset is scaled by less 26 // We need to scale up the pointer by 2 when the offset is scaled by less
27 // than the pointer size. 27 // than the pointer size.
28 DCHECK(kPointerSize == kInt64Size 28 DCHECK(kPointerSize == kInt64Size
29 ? kPointerSizeLog2 == StubCache::kCacheIndexShift + 1 29 ? kPointerSizeLog2 == StubCache::kCacheIndexShift + 1
30 : kPointerSizeLog2 == StubCache::kCacheIndexShift); 30 : kPointerSizeLog2 == StubCache::kCacheIndexShift);
31 ScaleFactor scale_factor = kPointerSize == kInt64Size ? times_2 : times_1; 31 ScaleFactor scale_factor = kPointerSize == kInt64Size ? times_2 : times_1;
32 32
33 DCHECK_EQ(3 * kPointerSize, sizeof(StubCache::Entry)); 33 DCHECK_EQ(3u * kPointerSize, sizeof(StubCache::Entry));
34 // The offset register holds the entry offset times four (due to masking 34 // The offset register holds the entry offset times four (due to masking
35 // and shifting optimizations). 35 // and shifting optimizations).
36 ExternalReference key_offset(isolate->stub_cache()->key_reference(table)); 36 ExternalReference key_offset(isolate->stub_cache()->key_reference(table));
37 ExternalReference value_offset(isolate->stub_cache()->value_reference(table)); 37 ExternalReference value_offset(isolate->stub_cache()->value_reference(table));
38 Label miss; 38 Label miss;
39 39
40 // Multiply by 3 because there are 3 fields per entry (name, code, map). 40 // Multiply by 3 because there are 3 fields per entry (name, code, map).
41 __ leap(offset, Operand(offset, offset, times_2, 0)); 41 __ leap(offset, Operand(offset, offset, times_2, 0));
42 42
43 __ LoadAddress(kScratchRegister, key_offset); 43 __ LoadAddress(kScratchRegister, key_offset);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 __ bind(&miss); 158 __ bind(&miss);
159 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); 159 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1);
160 } 160 }
161 161
162 162
163 #undef __ 163 #undef __
164 } 164 }
165 } // namespace v8::internal 165 } // namespace v8::internal
166 166
167 #endif // V8_TARGET_ARCH_X64 167 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/ic-state.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698