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

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

Issue 2424433002: [ic] Delete old KeyedLoadIC code (Closed)
Patch Set: fix failing test Created 4 years, 2 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/ic/ic.h ('k') | src/ic/mips/ic-mips.cc » ('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/ic/ic.h" 5 #include "src/ic/ic.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-arguments-inl.h" 8 #include "src/api-arguments-inl.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 Address constant_pool) { 515 Address constant_pool) {
516 DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC); 516 DCHECK(CodeStub::GetMajorKey(target) == CodeStub::CompareIC);
517 CompareICStub stub(target->stub_key(), isolate); 517 CompareICStub stub(target->stub_key(), isolate);
518 // Only clear CompareICs that can retain objects. 518 // Only clear CompareICs that can retain objects.
519 if (stub.state() != CompareICState::KNOWN_RECEIVER) return; 519 if (stub.state() != CompareICState::KNOWN_RECEIVER) return;
520 SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()), 520 SetTargetAtAddress(address, GetRawUninitialized(isolate, stub.op()),
521 constant_pool); 521 constant_pool);
522 PatchInlinedSmiCode(isolate, address, DISABLE_INLINED_SMI_CHECK); 522 PatchInlinedSmiCode(isolate, address, DISABLE_INLINED_SMI_CHECK);
523 } 523 }
524 524
525
526 // static
527 Handle<Code> KeyedLoadIC::ChooseMegamorphicStub(Isolate* isolate,
528 ExtraICState extra_state) {
529 // TODO(ishell): remove extra_ic_state
530 if (FLAG_compiled_keyed_generic_loads) {
531 return KeyedLoadGenericStub(isolate).GetCode();
532 } else {
533 return isolate->builtins()->KeyedLoadIC_Megamorphic();
534 }
535 }
536
537
538 static bool MigrateDeprecated(Handle<Object> object) { 525 static bool MigrateDeprecated(Handle<Object> object) {
539 if (!object->IsJSObject()) return false; 526 if (!object->IsJSObject()) return false;
540 Handle<JSObject> receiver = Handle<JSObject>::cast(object); 527 Handle<JSObject> receiver = Handle<JSObject>::cast(object);
541 if (!receiver->map()->is_deprecated()) return false; 528 if (!receiver->map()->is_deprecated()) return false;
542 JSObject::MigrateInstance(Handle<JSObject>::cast(object)); 529 JSObject::MigrateInstance(Handle<JSObject>::cast(object));
543 return true; 530 return true;
544 } 531 }
545 532
546 void IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) { 533 void IC::ConfigureVectorState(IC::State new_state, Handle<Object> key) {
547 DCHECK(UseVector()); 534 DCHECK(UseVector());
(...skipping 2413 matching lines...) Expand 10 before | Expand all | Expand 10 after
2961 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state()); 2948 DCHECK_EQ(LookupIterator::INTERCEPTOR, it.state());
2962 it.Next(); 2949 it.Next();
2963 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 2950 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
2964 Object::GetProperty(&it)); 2951 Object::GetProperty(&it));
2965 } 2952 }
2966 2953
2967 return *result; 2954 return *result;
2968 } 2955 }
2969 } // namespace internal 2956 } // namespace internal
2970 } // namespace v8 2957 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/ic/mips/ic-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698