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

Side by Side Diff: src/full-codegen.h

Issue 650073002: vector-based ICs did not update type feedback counts correctly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen.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 #ifndef V8_FULL_CODEGEN_H_ 5 #ifndef V8_FULL_CODEGEN_H_
6 #define V8_FULL_CODEGEN_H_ 6 #define V8_FULL_CODEGEN_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 void EmitLiteralCompareNil(CompareOperation* expr, 422 void EmitLiteralCompareNil(CompareOperation* expr,
423 Expression* sub_expr, 423 Expression* sub_expr,
424 NilValue nil); 424 NilValue nil);
425 425
426 // Bailout support. 426 // Bailout support.
427 void PrepareForBailout(Expression* node, State state); 427 void PrepareForBailout(Expression* node, State state);
428 void PrepareForBailoutForId(BailoutId id, State state); 428 void PrepareForBailoutForId(BailoutId id, State state);
429 429
430 // Feedback slot support. The feedback vector will be cleared during gc and 430 // Feedback slot support. The feedback vector will be cleared during gc and
431 // collected by the type-feedback oracle. 431 // collected by the type-feedback oracle.
432 Handle<FixedArray> FeedbackVector() { 432 Handle<TypeFeedbackVector> FeedbackVector() const {
433 return info_->feedback_vector(); 433 return info_->feedback_vector();
434 } 434 }
435 void EnsureSlotContainsAllocationSite(FeedbackVectorSlot slot); 435 void EnsureSlotContainsAllocationSite(FeedbackVectorSlot slot);
436 void EnsureSlotContainsAllocationSite(FeedbackVectorICSlot slot);
437
438 // Returns a smi for the index into the FixedArray that backs the feedback
439 // vector
436 Smi* SmiFromSlot(FeedbackVectorSlot slot) const { 440 Smi* SmiFromSlot(FeedbackVectorSlot slot) const {
437 return Smi::FromInt(slot.ToInt()); 441 return Smi::FromInt(FeedbackVector()->GetIndex(slot));
442 }
443
444 Smi* SmiFromSlot(FeedbackVectorICSlot slot) const {
445 return Smi::FromInt(FeedbackVector()->GetIndex(slot));
438 } 446 }
439 447
440 // Record a call's return site offset, used to rebuild the frame if the 448 // Record a call's return site offset, used to rebuild the frame if the
441 // called function was inlined at the site. 449 // called function was inlined at the site.
442 void RecordJSReturnSite(Call* call); 450 void RecordJSReturnSite(Call* call);
443 451
444 // Prepare for bailout before a test (or compare) and branch. If 452 // Prepare for bailout before a test (or compare) and branch. If
445 // should_normalize, then the following comparison will not handle the 453 // should_normalize, then the following comparison will not handle the
446 // canonical JS true value so we will insert a (dead) test against true at 454 // canonical JS true value so we will insert a (dead) test against true at
447 // the actual bailout target from the optimized code. If not 455 // the actual bailout target from the optimized code. If not
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 991
984 Address start_; 992 Address start_;
985 Address instruction_start_; 993 Address instruction_start_;
986 uint32_t length_; 994 uint32_t length_;
987 }; 995 };
988 996
989 997
990 } } // namespace v8::internal 998 } } // namespace v8::internal
991 999
992 #endif // V8_FULL_CODEGEN_H_ 1000 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698