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

Side by Side Diff: src/ic/ic-state.cc

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix 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/ic/ic-state.h ('k') | src/jsregexp.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ic/ic.h" 7 #include "src/ic/ic.h"
8 #include "src/ic/ic-state.h" 8 #include "src/ic/ic-state.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 10 matching lines...) Expand all
21 call_type_(CallTypeBits::decode(extra_ic_state)) {} 21 call_type_(CallTypeBits::decode(extra_ic_state)) {}
22 22
23 23
24 ExtraICState CallICState::GetExtraICState() const { 24 ExtraICState CallICState::GetExtraICState() const {
25 ExtraICState extra_ic_state = 25 ExtraICState extra_ic_state =
26 ArgcBits::encode(argc_) | CallTypeBits::encode(call_type_); 26 ArgcBits::encode(argc_) | CallTypeBits::encode(call_type_);
27 return extra_ic_state; 27 return extra_ic_state;
28 } 28 }
29 29
30 30
31 OStream& operator<<(OStream& os, const CallICState& s) { 31 std::ostream& operator<<(std::ostream& os, const CallICState& s) {
32 return os << "(args(" << s.arg_count() << "), " 32 return os << "(args(" << s.arg_count() << "), "
33 << (s.call_type() == CallICState::METHOD ? "METHOD" : "FUNCTION") 33 << (s.call_type() == CallICState::METHOD ? "METHOD" : "FUNCTION")
34 << ", "; 34 << ", ";
35 } 35 }
36 36
37 37
38 BinaryOpICState::BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state) 38 BinaryOpICState::BinaryOpICState(Isolate* isolate, ExtraICState extra_ic_state)
39 : isolate_(isolate) { 39 : isolate_(isolate) {
40 op_ = 40 op_ =
41 static_cast<Token::Value>(FIRST_TOKEN + OpField::decode(extra_ic_state)); 41 static_cast<Token::Value>(FIRST_TOKEN + OpField::decode(extra_ic_state));
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } else if (result_kind == GENERIC && op_ == Token::ADD) { 301 } else if (result_kind == GENERIC && op_ == Token::ADD) {
302 return Type::Union(Type::Number(zone), Type::String(zone), zone); 302 return Type::Union(Type::Number(zone), Type::String(zone), zone);
303 } else if (result_kind == NUMBER && op_ == Token::SHR) { 303 } else if (result_kind == NUMBER && op_ == Token::SHR) {
304 return Type::Unsigned32(zone); 304 return Type::Unsigned32(zone);
305 } 305 }
306 DCHECK_NE(GENERIC, result_kind); 306 DCHECK_NE(GENERIC, result_kind);
307 return KindToType(result_kind, zone); 307 return KindToType(result_kind, zone);
308 } 308 }
309 309
310 310
311 OStream& operator<<(OStream& os, const BinaryOpICState& s) { 311 std::ostream& operator<<(std::ostream& os, const BinaryOpICState& s) {
312 os << "(" << Token::Name(s.op_); 312 os << "(" << Token::Name(s.op_);
313 if (s.mode_ == OVERWRITE_LEFT) 313 if (s.mode_ == OVERWRITE_LEFT)
314 os << "_ReuseLeft"; 314 os << "_ReuseLeft";
315 else if (s.mode_ == OVERWRITE_RIGHT) 315 else if (s.mode_ == OVERWRITE_RIGHT)
316 os << "_ReuseRight"; 316 os << "_ReuseRight";
317 if (s.CouldCreateAllocationMementos()) os << "_CreateAllocationMementos"; 317 if (s.CouldCreateAllocationMementos()) os << "_CreateAllocationMementos";
318 os << ":" << BinaryOpICState::KindToString(s.left_kind_) << "*"; 318 os << ":" << BinaryOpICState::KindToString(s.left_kind_) << "*";
319 if (s.fixed_right_arg_.has_value) { 319 if (s.fixed_right_arg_.has_value) {
320 os << s.fixed_right_arg_.value; 320 os << s.fixed_right_arg_.value;
321 } else { 321 } else {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 case UNIQUE_NAME: 605 case UNIQUE_NAME:
606 case OBJECT: 606 case OBJECT:
607 case GENERIC: 607 case GENERIC:
608 return GENERIC; 608 return GENERIC;
609 } 609 }
610 UNREACHABLE(); 610 UNREACHABLE();
611 return GENERIC; // Make the compiler happy. 611 return GENERIC; // Make the compiler happy.
612 } 612 }
613 } 613 }
614 } // namespace v8::internal 614 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ic-state.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698