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

Unified Diff: src/typing.cc

Issue 137403009: Adding a type vector to replace type cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Smarter vector allocation and refactoring. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index 596ea2c612ca0cbe4daeee72f5e41d9e6f9cfe7a..f3d6d75727d188c49cb7144d1b3b0217f0f0e725 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -42,7 +42,8 @@ AstTyper::AstTyper(CompilationInfo* info)
Handle<Code>(info->closure()->shared()->code()),
Handle<Context>(info->closure()->context()->native_context()),
info->zone()),
- store_(info->zone()) {
+ store_(info->zone()),
+ current_feedback_slot_(0) {
InitializeAstVisitor(info->zone());
}
@@ -322,8 +323,9 @@ void AstTyper::VisitForStatement(ForStatement* stmt) {
void AstTyper::VisitForInStatement(ForInStatement* stmt) {
// Collect type feedback.
+ InitializeFeedbackSlots(stmt);
stmt->set_for_in_type(static_cast<ForInStatement::ForInType>(
- oracle()->ForInType(stmt->ForInFeedbackId())));
+ oracle()->ForInType(stmt->ForInFeedbackSlot())));
RECURSE(Visit(stmt->enumerable()));
store_.Forget(); // Control may transfer here via looping or 'continue'.
@@ -531,6 +533,8 @@ void AstTyper::VisitProperty(Property* expr) {
void AstTyper::VisitCall(Call* expr) {
+ InitializeFeedbackSlots(expr);
+
// Collect type feedback.
expr->RecordTypeFeedback(oracle());
@@ -550,7 +554,15 @@ void AstTyper::VisitCall(Call* expr) {
}
+void AstTyper::InitializeFeedbackSlots(AstNode* expr) {
+ current_feedback_slot_ = expr->ConsumeFeedbackSlots(
+ isolate(), current_feedback_slot_);
+}
+
+
void AstTyper::VisitCallNew(CallNew* expr) {
+ InitializeFeedbackSlots(expr);
+
// Collect type feedback.
expr->RecordTypeFeedback(oracle());
« src/ia32/code-stubs-ia32.cc ('K') | « src/typing.h ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698