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

Side by Side Diff: src/typing.cc

Issue 106453003: Allocation site support for monomorphic StringAdds in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix NewStringAddStub flags bits. Created 7 years 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 if (proxy != NULL && proxy->var()->IsStackAllocated()) { 565 if (proxy != NULL && proxy->var()->IsStackAllocated()) {
566 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); 566 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds()));
567 } 567 }
568 } 568 }
569 569
570 570
571 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { 571 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
572 // Collect type feedback. 572 // Collect type feedback.
573 Handle<Type> type, left_type, right_type; 573 Handle<Type> type, left_type, right_type;
574 Maybe<int> fixed_right_arg; 574 Maybe<int> fixed_right_arg;
575 Handle<AllocationSite> allocation_site;
575 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), 576 oracle()->BinaryType(expr->BinaryOperationFeedbackId(),
576 &left_type, &right_type, &type, &fixed_right_arg, expr->op()); 577 &left_type, &right_type, &type, &fixed_right_arg,
578 &allocation_site, expr->op());
577 NarrowLowerType(expr, type); 579 NarrowLowerType(expr, type);
578 NarrowLowerType(expr->left(), left_type); 580 NarrowLowerType(expr->left(), left_type);
579 NarrowLowerType(expr->right(), right_type); 581 NarrowLowerType(expr->right(), right_type);
582 expr->set_allocation_site(allocation_site);
580 expr->set_fixed_right_arg(fixed_right_arg); 583 expr->set_fixed_right_arg(fixed_right_arg);
581 if (expr->op() == Token::OR || expr->op() == Token::AND) { 584 if (expr->op() == Token::OR || expr->op() == Token::AND) {
582 expr->left()->RecordToBooleanTypeFeedback(oracle()); 585 expr->left()->RecordToBooleanTypeFeedback(oracle());
583 } 586 }
584 587
585 switch (expr->op()) { 588 switch (expr->op()) {
586 case Token::COMMA: 589 case Token::COMMA:
587 RECURSE(Visit(expr->left())); 590 RECURSE(Visit(expr->left()));
588 RECURSE(Visit(expr->right())); 591 RECURSE(Visit(expr->right()));
589 NarrowType(expr, expr->right()->bounds()); 592 NarrowType(expr, expr->right()->bounds());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 738 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
736 } 739 }
737 740
738 741
739 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 742 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
740 RECURSE(Visit(stmt->body())); 743 RECURSE(Visit(stmt->body()));
741 } 744 }
742 745
743 746
744 } } // namespace v8::internal 747 } } // namespace v8::internal
OLDNEW
« src/objects-inl.h ('K') | « src/type-info.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698