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

Side by Side Diff: src/ast.cc

Issue 15735005: Collect type feedback for power-of-2 right operands in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 7 years, 6 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/ast.h ('k') | src/code-stubs.h » ('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 // 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 : Handle<Map>::null(); 675 : Handle<Map>::null();
676 } 676 }
677 677
678 678
679 void UnaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 679 void UnaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
680 type_ = oracle->UnaryType(this); 680 type_ = oracle->UnaryType(this);
681 } 681 }
682 682
683 683
684 void BinaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 684 void BinaryOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
685 oracle->BinaryType(this, &left_type_, &right_type_, &result_type_); 685 oracle->BinaryType(this, &left_type_, &right_type_, &result_type_,
686 &has_fixed_right_arg_, &fixed_right_arg_value_);
686 } 687 }
687 688
688 689
689 void CompareOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { 690 void CompareOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
690 oracle->CompareType(this, &left_type_, &right_type_, &overall_type_); 691 oracle->CompareType(this, &left_type_, &right_type_, &overall_type_);
691 if (!overall_type_.IsUninitialized() && overall_type_.IsNonPrimitive() && 692 if (!overall_type_.IsUninitialized() && overall_type_.IsNonPrimitive() &&
692 (op_ == Token::EQ || op_ == Token::EQ_STRICT)) { 693 (op_ == Token::EQ || op_ == Token::EQ_STRICT)) {
693 map_ = oracle->GetCompareMap(this); 694 map_ = oracle->GetCompareMap(this);
694 } else { 695 } else {
695 // May be a compare to nil. 696 // May be a compare to nil.
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value()); 1193 OS::SNPrintF(buffer, "%d", Smi::cast(*handle_)->value());
1193 str = arr; 1194 str = arr;
1194 } else { 1195 } else {
1195 str = DoubleToCString(handle_->Number(), buffer); 1196 str = DoubleToCString(handle_->Number(), buffer);
1196 } 1197 }
1197 return FACTORY->NewStringFromAscii(CStrVector(str)); 1198 return FACTORY->NewStringFromAscii(CStrVector(str));
1198 } 1199 }
1199 1200
1200 1201
1201 } } // namespace v8::internal 1202 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698