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

Unified Diff: src/ic/ic-inl.h

Issue 2676583002: [ic] Encode [Keyed]StoreIC's language mode in slot kind instead of code object's flags. (Closed)
Patch Set: Rebasing Created 3 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 side-by-side diff with in-line comments
Download patch
Index: src/ic/ic-inl.h
diff --git a/src/ic/ic-inl.h b/src/ic/ic-inl.h
index 74b1404f9697ab3aa6f9aa87438b1ec696fd93f4..9e5efa18befd19b9c43ad79ed5c9d66e1b7f6323 100644
--- a/src/ic/ic-inl.h
+++ b/src/ic/ic-inl.h
@@ -54,25 +54,13 @@ void IC::SetTargetAtAddress(Address address, Code* target,
Address constant_pool) {
if (AddressIsDeoptimizedCode(target->GetIsolate(), address)) return;
- DCHECK(target->is_inline_cache_stub() || target->is_compare_ic_stub());
-
- DCHECK(!target->is_inline_cache_stub() ||
- (target->kind() != Code::LOAD_IC &&
- target->kind() != Code::KEYED_LOAD_IC &&
- target->kind() != Code::STORE_IC &&
- target->kind() != Code::KEYED_STORE_IC));
+ // Only these three old-style ICs still do code patching.
+ DCHECK(target->is_binary_op_stub() || target->is_compare_ic_stub() ||
+ target->is_to_boolean_ic_stub());
Heap* heap = target->GetHeap();
Code* old_target = GetTargetAtAddress(address, constant_pool);
-#ifdef DEBUG
- // STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark
- // ICs as language mode. The language mode of the IC must be preserved.
- if (old_target->kind() == Code::STORE_IC ||
- old_target->kind() == Code::KEYED_STORE_IC) {
- DCHECK(StoreICState::GetLanguageMode(old_target->extra_ic_state()) ==
- StoreICState::GetLanguageMode(target->extra_ic_state()));
- }
-#endif
+
Assembler::set_target_address_at(heap->isolate(), address, constant_pool,
target->instruction_start());
if (heap->gc_state() == Heap::MARK_COMPACT) {
« src/compiler/bytecode-graph-builder.cc ('K') | « src/ic/ic.cc ('k') | src/ic/ic-state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698