| OLD | NEW |
| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
| 10 #include "src/interface-descriptors.h" | 10 #include "src/interface-descriptors.h" |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 | 14 |
| 15 #define __ ACCESS_MASM(masm) | 15 #define __ ACCESS_MASM(masm) |
| 16 | 16 |
| 17 static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm, | 17 static void ProbeTable(StubCache* stub_cache, MacroAssembler* masm, |
| 18 Code::Kind ic_kind, Code::Flags flags, | 18 Code::Kind ic_kind, Code::Flags flags, |
| 19 StubCache::Table table, Register name, Register receiver, | 19 StubCache::Table table, Register name, Register receiver, |
| 20 // Number of the cache entry pointer-size scaled. | 20 // The offset is scaled by 4, based on |
| 21 // kCacheIndexShift, which is two bits |
| 21 Register offset, Register extra) { | 22 Register offset, Register extra) { |
| 22 ExternalReference key_offset(stub_cache->key_reference(table)); | 23 ExternalReference key_offset(stub_cache->key_reference(table)); |
| 23 ExternalReference value_offset(stub_cache->value_reference(table)); | 24 ExternalReference value_offset(stub_cache->value_reference(table)); |
| 24 ExternalReference map_offset(stub_cache->map_reference(table)); | 25 ExternalReference map_offset(stub_cache->map_reference(table)); |
| 25 ExternalReference virtual_register = | 26 ExternalReference virtual_register = |
| 26 ExternalReference::virtual_handler_register(masm->isolate()); | 27 ExternalReference::virtual_handler_register(masm->isolate()); |
| 27 | 28 |
| 28 Label miss; | 29 Label miss; |
| 29 bool is_vector_store = | 30 bool is_vector_store = |
| 30 IC::ICUseVector(ic_kind) && | 31 IC::ICUseVector(ic_kind) && |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 __ bind(&miss); | 208 __ bind(&miss); |
| 208 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); | 209 __ IncrementCounter(counters->megamorphic_stub_cache_misses(), 1); |
| 209 } | 210 } |
| 210 | 211 |
| 211 | 212 |
| 212 #undef __ | 213 #undef __ |
| 213 } // namespace internal | 214 } // namespace internal |
| 214 } // namespace v8 | 215 } // namespace v8 |
| 215 | 216 |
| 216 #endif // V8_TARGET_ARCH_IA32 | 217 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |