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

Side by Side Diff: src/ic/ic.cc

Issue 866493003: Retry "Use a WeakCell in the CallIC type vector." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. 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/ia32/interface-descriptors-ia32.cc ('k') | src/interface-descriptors.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 2205
2206 void CallIC::HandleMiss(Handle<Object> receiver, Handle<Object> function) { 2206 void CallIC::HandleMiss(Handle<Object> receiver, Handle<Object> function) {
2207 CallICState callic_state(target()->extra_ic_state()); 2207 CallICState callic_state(target()->extra_ic_state());
2208 Handle<Object> name = isolate()->factory()->empty_string(); 2208 Handle<Object> name = isolate()->factory()->empty_string();
2209 CallICNexus* nexus = casted_nexus<CallICNexus>(); 2209 CallICNexus* nexus = casted_nexus<CallICNexus>();
2210 Object* feedback = nexus->GetFeedback(); 2210 Object* feedback = nexus->GetFeedback();
2211 2211
2212 // Hand-coded MISS handling is easier if CallIC slots don't contain smis. 2212 // Hand-coded MISS handling is easier if CallIC slots don't contain smis.
2213 DCHECK(!feedback->IsSmi()); 2213 DCHECK(!feedback->IsSmi());
2214 2214
2215 if (feedback->IsJSFunction() || !function->IsJSFunction()) { 2215 if (feedback->IsWeakCell() || !function->IsJSFunction()) {
2216 // We are going generic. 2216 // We are going generic.
2217 nexus->ConfigureGeneric(); 2217 nexus->ConfigureGeneric();
2218 } else { 2218 } else {
2219 // The feedback is either uninitialized or an allocation site. 2219 // The feedback is either uninitialized or an allocation site.
2220 // It might be an allocation site because if we re-compile the full code 2220 // It might be an allocation site because if we re-compile the full code
2221 // to add deoptimization support, we call with the default call-ic, and 2221 // to add deoptimization support, we call with the default call-ic, and
2222 // merely need to patch the target to match the feedback. 2222 // merely need to patch the target to match the feedback.
2223 // TODO(mvstanton): the better approach is to dispense with patching 2223 // TODO(mvstanton): the better approach is to dispense with patching
2224 // altogether, which is in progress. 2224 // altogether, which is in progress.
2225 DCHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate()) || 2225 DCHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate()) ||
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3002 static const Address IC_utilities[] = { 3002 static const Address IC_utilities[] = {
3003 #define ADDR(name) FUNCTION_ADDR(name), 3003 #define ADDR(name) FUNCTION_ADDR(name),
3004 IC_UTIL_LIST(ADDR) NULL 3004 IC_UTIL_LIST(ADDR) NULL
3005 #undef ADDR 3005 #undef ADDR
3006 }; 3006 };
3007 3007
3008 3008
3009 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; } 3009 Address IC::AddressFromUtilityId(IC::UtilityId id) { return IC_utilities[id]; }
3010 } 3010 }
3011 } // namespace v8::internal 3011 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/interface-descriptors-ia32.cc ('k') | src/interface-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698