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

Side by Side Diff: src/type-feedback-vector.cc

Issue 1445513002: [turbofan] Introduce JSCallReducer to strength reduce JSCallFunction nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment. Created 5 years, 1 month 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/type-feedback-vector.h ('k') | tools/gyp/v8.gyp » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/type-feedback-vector.h" 5 #include "src/type-feedback-vector.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-state.h" 9 #include "src/ic/ic-state.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 } 513 }
514 514
515 515
516 void CallICNexus::ConfigureMonomorphic(Handle<JSFunction> function) { 516 void CallICNexus::ConfigureMonomorphic(Handle<JSFunction> function) {
517 Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function); 517 Handle<WeakCell> new_cell = GetIsolate()->factory()->NewWeakCell(function);
518 SetFeedback(*new_cell); 518 SetFeedback(*new_cell);
519 SetFeedbackExtra(Smi::FromInt(kCallCountIncrement), SKIP_WRITE_BARRIER); 519 SetFeedbackExtra(Smi::FromInt(kCallCountIncrement), SKIP_WRITE_BARRIER);
520 } 520 }
521 521
522 522
523 void CallICNexus::ConfigureMegamorphic() {
524 FeedbackNexus::ConfigureMegamorphic();
525 }
526
527
528 void CallICNexus::ConfigureMegamorphic(int call_count) {
529 SetFeedback(*TypeFeedbackVector::MegamorphicSentinel(GetIsolate()),
530 SKIP_WRITE_BARRIER);
531 SetFeedbackExtra(Smi::FromInt(call_count * kCallCountIncrement),
532 SKIP_WRITE_BARRIER);
533 }
534
535
523 void LoadICNexus::ConfigureMonomorphic(Handle<Map> receiver_map, 536 void LoadICNexus::ConfigureMonomorphic(Handle<Map> receiver_map,
524 Handle<Code> handler) { 537 Handle<Code> handler) {
525 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); 538 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map);
526 SetFeedback(*cell); 539 SetFeedback(*cell);
527 SetFeedbackExtra(*handler); 540 SetFeedbackExtra(*handler);
528 } 541 }
529 542
530 543
531 void KeyedLoadICNexus::ConfigureMonomorphic(Handle<Name> name, 544 void KeyedLoadICNexus::ConfigureMonomorphic(Handle<Name> name,
532 Handle<Map> receiver_map, 545 Handle<Map> receiver_map,
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 return mode; 847 return mode;
835 } 848 }
836 849
837 850
838 IcCheckType KeyedStoreICNexus::GetKeyType() const { 851 IcCheckType KeyedStoreICNexus::GetKeyType() const {
839 // The structure of the vector slots tells us the type. 852 // The structure of the vector slots tells us the type.
840 return GetFeedback()->IsName() ? PROPERTY : ELEMENT; 853 return GetFeedback()->IsName() ? PROPERTY : ELEMENT;
841 } 854 }
842 } // namespace internal 855 } // namespace internal
843 } // namespace v8 856 } // namespace v8
OLDNEW
« no previous file with comments | « src/type-feedback-vector.h ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698