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

Side by Side Diff: src/objects-inl.h

Issue 1743433002: Revert of [compiler] Drop the CompareNilIC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/objects.h ('k') | src/runtime/runtime.h » ('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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 4668 matching lines...) Expand 10 before | Expand all | Expand 10 after
4679 4679
4680 Code::Kind Code::kind() { 4680 Code::Kind Code::kind() {
4681 return ExtractKindFromFlags(flags()); 4681 return ExtractKindFromFlags(flags());
4682 } 4682 }
4683 4683
4684 4684
4685 bool Code::IsCodeStubOrIC() { 4685 bool Code::IsCodeStubOrIC() {
4686 return kind() == STUB || kind() == HANDLER || kind() == LOAD_IC || 4686 return kind() == STUB || kind() == HANDLER || kind() == LOAD_IC ||
4687 kind() == KEYED_LOAD_IC || kind() == CALL_IC || kind() == STORE_IC || 4687 kind() == KEYED_LOAD_IC || kind() == CALL_IC || kind() == STORE_IC ||
4688 kind() == KEYED_STORE_IC || kind() == BINARY_OP_IC || 4688 kind() == KEYED_STORE_IC || kind() == BINARY_OP_IC ||
4689 kind() == COMPARE_IC || kind() == TO_BOOLEAN_IC; 4689 kind() == COMPARE_IC || kind() == COMPARE_NIL_IC ||
4690 kind() == TO_BOOLEAN_IC;
4690 } 4691 }
4691 4692
4692 4693
4693 bool Code::IsJavaScriptCode() { 4694 bool Code::IsJavaScriptCode() {
4694 return kind() == FUNCTION || kind() == OPTIMIZED_FUNCTION || 4695 return kind() == FUNCTION || kind() == OPTIMIZED_FUNCTION ||
4695 is_interpreter_entry_trampoline(); 4696 is_interpreter_entry_trampoline();
4696 } 4697 }
4697 4698
4698 4699
4699 InlineCacheState Code::ic_state() { 4700 InlineCacheState Code::ic_state() {
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
4969 4970
4970 bool Code::is_debug_stub() { return ic_state() == DEBUG_STUB; } 4971 bool Code::is_debug_stub() { return ic_state() == DEBUG_STUB; }
4971 bool Code::is_handler() { return kind() == HANDLER; } 4972 bool Code::is_handler() { return kind() == HANDLER; }
4972 bool Code::is_load_stub() { return kind() == LOAD_IC; } 4973 bool Code::is_load_stub() { return kind() == LOAD_IC; }
4973 bool Code::is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; } 4974 bool Code::is_keyed_load_stub() { return kind() == KEYED_LOAD_IC; }
4974 bool Code::is_store_stub() { return kind() == STORE_IC; } 4975 bool Code::is_store_stub() { return kind() == STORE_IC; }
4975 bool Code::is_keyed_store_stub() { return kind() == KEYED_STORE_IC; } 4976 bool Code::is_keyed_store_stub() { return kind() == KEYED_STORE_IC; }
4976 bool Code::is_call_stub() { return kind() == CALL_IC; } 4977 bool Code::is_call_stub() { return kind() == CALL_IC; }
4977 bool Code::is_binary_op_stub() { return kind() == BINARY_OP_IC; } 4978 bool Code::is_binary_op_stub() { return kind() == BINARY_OP_IC; }
4978 bool Code::is_compare_ic_stub() { return kind() == COMPARE_IC; } 4979 bool Code::is_compare_ic_stub() { return kind() == COMPARE_IC; }
4980 bool Code::is_compare_nil_ic_stub() { return kind() == COMPARE_NIL_IC; }
4979 bool Code::is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; } 4981 bool Code::is_to_boolean_ic_stub() { return kind() == TO_BOOLEAN_IC; }
4980 bool Code::is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; } 4982 bool Code::is_optimized_code() { return kind() == OPTIMIZED_FUNCTION; }
4981 bool Code::is_wasm_code() { return kind() == WASM_FUNCTION; } 4983 bool Code::is_wasm_code() { return kind() == WASM_FUNCTION; }
4982 4984
4983 bool Code::embeds_maps_weakly() { 4985 bool Code::embeds_maps_weakly() {
4984 Kind k = kind(); 4986 Kind k = kind();
4985 return (k == LOAD_IC || k == STORE_IC || k == KEYED_LOAD_IC || 4987 return (k == LOAD_IC || k == STORE_IC || k == KEYED_LOAD_IC ||
4986 k == KEYED_STORE_IC) && 4988 k == KEYED_STORE_IC || k == COMPARE_NIL_IC) &&
4987 ic_state() == MONOMORPHIC; 4989 ic_state() == MONOMORPHIC;
4988 } 4990 }
4989 4991
4990 4992
4991 Address Code::constant_pool() { 4993 Address Code::constant_pool() {
4992 Address constant_pool = NULL; 4994 Address constant_pool = NULL;
4993 if (FLAG_enable_embedded_constant_pool) { 4995 if (FLAG_enable_embedded_constant_pool) {
4994 int offset = constant_pool_offset(); 4996 int offset = constant_pool_offset();
4995 if (offset < instruction_size()) { 4997 if (offset < instruction_size()) {
4996 constant_pool = FIELD_ADDR(this, kHeaderSize + offset); 4998 constant_pool = FIELD_ADDR(this, kHeaderSize + offset);
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after
7683 #undef WRITE_INT64_FIELD 7685 #undef WRITE_INT64_FIELD
7684 #undef READ_BYTE_FIELD 7686 #undef READ_BYTE_FIELD
7685 #undef WRITE_BYTE_FIELD 7687 #undef WRITE_BYTE_FIELD
7686 #undef NOBARRIER_READ_BYTE_FIELD 7688 #undef NOBARRIER_READ_BYTE_FIELD
7687 #undef NOBARRIER_WRITE_BYTE_FIELD 7689 #undef NOBARRIER_WRITE_BYTE_FIELD
7688 7690
7689 } // namespace internal 7691 } // namespace internal
7690 } // namespace v8 7692 } // namespace v8
7691 7693
7692 #endif // V8_OBJECTS_INL_H_ 7694 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698