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

Side by Side Diff: src/objects.cc

Issue 2052763003: [ic] [stubs] Remove InlineCacheState field from the code flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/objects-inl.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 13921 matching lines...) Expand 10 before | Expand all | Expand 10 after
13932 DCHECK(kind() == OPTIMIZED_FUNCTION); 13932 DCHECK(kind() == OPTIMIZED_FUNCTION);
13933 Object* weak_cell_cache = 13933 Object* weak_cell_cache =
13934 DeoptimizationInputData::cast(deoptimization_data())->WeakCellCache(); 13934 DeoptimizationInputData::cast(deoptimization_data())->WeakCellCache();
13935 if (weak_cell_cache->IsWeakCell()) { 13935 if (weak_cell_cache->IsWeakCell()) {
13936 DCHECK(this == WeakCell::cast(weak_cell_cache)->value()); 13936 DCHECK(this == WeakCell::cast(weak_cell_cache)->value());
13937 return WeakCell::cast(weak_cell_cache); 13937 return WeakCell::cast(weak_cell_cache);
13938 } 13938 }
13939 return NULL; 13939 return NULL;
13940 } 13940 }
13941 13941
13942 InlineCacheState Code::ic_state() {
13943 switch (kind()) {
13944 case Code::BINARY_OP_IC: {
13945 BinaryOpICState state(GetIsolate(), extra_ic_state());
13946 return state.GetICState();
13947 }
13948 case Code::COMPARE_IC: {
13949 CompareICStub stub(GetIsolate(), extra_ic_state());
13950 return stub.GetICState();
13951 }
13952 case Code::TO_BOOLEAN_IC: {
13953 ToBooleanICStub stub(GetIsolate(), extra_ic_state());
13954 return stub.GetICState();
13955 }
13956 case Code::DEBUG_STUB:
13957 return UNINITIALIZED;
13958
13959 default:
13960 DCHECK(is_inline_cache_stub() || !IC::ICUseVector(kind()));
13961 return UNINITIALIZED;
Toon Verwaest 2016/06/09 13:49:12 This looks weird, this case should be unreachable
Igor Sheludko 2016/06/09 15:18:21 Done.
13962 }
13963 }
13942 13964
13943 #ifdef ENABLE_DISASSEMBLER 13965 #ifdef ENABLE_DISASSEMBLER
13944 13966
13945 void DeoptimizationInputData::DeoptimizationInputDataPrint( 13967 void DeoptimizationInputData::DeoptimizationInputDataPrint(
13946 std::ostream& os) { // NOLINT 13968 std::ostream& os) { // NOLINT
13947 disasm::NameConverter converter; 13969 disasm::NameConverter converter;
13948 int const inlined_function_count = InlinedFunctionCount()->value(); 13970 int const inlined_function_count = InlinedFunctionCount()->value();
13949 os << "Inlined functions (count = " << inlined_function_count << ")\n"; 13971 os << "Inlined functions (count = " << inlined_function_count << ")\n";
13950 for (int id = 0; id < inlined_function_count; ++id) { 13972 for (int id = 0; id < inlined_function_count; ++id) {
13951 Object* info = LiteralArray()->get(id); 13973 Object* info = LiteralArray()->get(id);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
14195 const char* Code::ICState2String(InlineCacheState state) { 14217 const char* Code::ICState2String(InlineCacheState state) {
14196 switch (state) { 14218 switch (state) {
14197 case UNINITIALIZED: return "UNINITIALIZED"; 14219 case UNINITIALIZED: return "UNINITIALIZED";
14198 case PREMONOMORPHIC: return "PREMONOMORPHIC"; 14220 case PREMONOMORPHIC: return "PREMONOMORPHIC";
14199 case MONOMORPHIC: return "MONOMORPHIC"; 14221 case MONOMORPHIC: return "MONOMORPHIC";
14200 case RECOMPUTE_HANDLER: 14222 case RECOMPUTE_HANDLER:
14201 return "RECOMPUTE_HANDLER"; 14223 return "RECOMPUTE_HANDLER";
14202 case POLYMORPHIC: return "POLYMORPHIC"; 14224 case POLYMORPHIC: return "POLYMORPHIC";
14203 case MEGAMORPHIC: return "MEGAMORPHIC"; 14225 case MEGAMORPHIC: return "MEGAMORPHIC";
14204 case GENERIC: return "GENERIC"; 14226 case GENERIC: return "GENERIC";
14205 case DEBUG_STUB: return "DEBUG_STUB";
14206 } 14227 }
14207 UNREACHABLE(); 14228 UNREACHABLE();
14208 return NULL; 14229 return NULL;
14209 } 14230 }
14210 14231
14211 14232
14212 void Code::PrintExtraICState(std::ostream& os, // NOLINT 14233 void Code::PrintExtraICState(std::ostream& os, // NOLINT
14213 Kind kind, ExtraICState extra) { 14234 Kind kind, ExtraICState extra) {
14214 os << "extra_ic_state = "; 14235 os << "extra_ic_state = ";
14215 if ((kind == STORE_IC || kind == KEYED_STORE_IC) && 14236 if ((kind == STORE_IC || kind == KEYED_STORE_IC) &&
(...skipping 4645 matching lines...) Expand 10 before | Expand all | Expand 10 after
18861 if (cell->value() != *new_value) { 18882 if (cell->value() != *new_value) {
18862 cell->set_value(*new_value); 18883 cell->set_value(*new_value);
18863 Isolate* isolate = cell->GetIsolate(); 18884 Isolate* isolate = cell->GetIsolate();
18864 cell->dependent_code()->DeoptimizeDependentCodeGroup( 18885 cell->dependent_code()->DeoptimizeDependentCodeGroup(
18865 isolate, DependentCode::kPropertyCellChangedGroup); 18886 isolate, DependentCode::kPropertyCellChangedGroup);
18866 } 18887 }
18867 } 18888 }
18868 18889
18869 } // namespace internal 18890 } // namespace internal
18870 } // namespace v8 18891 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698