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

Side by Side Diff: src/typing.cc

Issue 106313003: Reland "Allocation site support for monomorphic StringAdds in BinaryOps". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/type-info.cc ('k') | src/x64/code-stubs-x64.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 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 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 if (proxy != NULL && proxy->var()->IsStackAllocated()) { 622 if (proxy != NULL && proxy->var()->IsStackAllocated()) {
623 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds())); 623 store_.Seq(variable_index(proxy->var()), Effect(expr->bounds()));
624 } 624 }
625 } 625 }
626 626
627 627
628 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) { 628 void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
629 // Collect type feedback. 629 // Collect type feedback.
630 Handle<Type> type, left_type, right_type; 630 Handle<Type> type, left_type, right_type;
631 Maybe<int> fixed_right_arg; 631 Maybe<int> fixed_right_arg;
632 Handle<AllocationSite> allocation_site;
632 oracle()->BinaryType(expr->BinaryOperationFeedbackId(), 633 oracle()->BinaryType(expr->BinaryOperationFeedbackId(),
633 &left_type, &right_type, &type, &fixed_right_arg, expr->op()); 634 &left_type, &right_type, &type, &fixed_right_arg,
635 &allocation_site, expr->op());
634 NarrowLowerType(expr, type); 636 NarrowLowerType(expr, type);
635 NarrowLowerType(expr->left(), left_type); 637 NarrowLowerType(expr->left(), left_type);
636 NarrowLowerType(expr->right(), right_type); 638 NarrowLowerType(expr->right(), right_type);
639 expr->set_allocation_site(allocation_site);
637 expr->set_fixed_right_arg(fixed_right_arg); 640 expr->set_fixed_right_arg(fixed_right_arg);
638 if (expr->op() == Token::OR || expr->op() == Token::AND) { 641 if (expr->op() == Token::OR || expr->op() == Token::AND) {
639 expr->left()->RecordToBooleanTypeFeedback(oracle()); 642 expr->left()->RecordToBooleanTypeFeedback(oracle());
640 } 643 }
641 644
642 switch (expr->op()) { 645 switch (expr->op()) {
643 case Token::COMMA: 646 case Token::COMMA:
644 RECURSE(Visit(expr->left())); 647 RECURSE(Visit(expr->left()));
645 RECURSE(Visit(expr->right())); 648 RECURSE(Visit(expr->right()));
646 NarrowType(expr, expr->right()->bounds()); 649 NarrowType(expr, expr->right()->bounds());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 795 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
793 } 796 }
794 797
795 798
796 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 799 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
797 RECURSE(Visit(stmt->body())); 800 RECURSE(Visit(stmt->body()));
798 } 801 }
799 802
800 803
801 } } // namespace v8::internal 804 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « 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