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

Side by Side Diff: src/typing.cc

Issue 334763003: Start using OStreams. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reduced diff Created 6 years, 5 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/typing.h" 5 #include "src/typing.h"
6 6
7 #include "src/frames.h" 7 #include "src/frames.h"
8 #include "src/frames-inl.h" 8 #include "src/frames-inl.h"
9 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move 9 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 RECURSE(visitor->VisitDeclarations(scope->declarations())); 44 RECURSE(visitor->VisitDeclarations(scope->declarations()));
45 RECURSE(visitor->VisitStatements(info->function()->body())); 45 RECURSE(visitor->VisitStatements(info->function()->body()));
46 } 46 }
47 47
48 #undef RECURSE 48 #undef RECURSE
49 49
50 50
51 #ifdef OBJECT_PRINT 51 #ifdef OBJECT_PRINT
52 static void PrintObserved(Variable* var, Object* value, Type* type) { 52 static void PrintObserved(Variable* var, Object* value, Type* type) {
53 PrintF(" observed %s ", var->IsParameter() ? "param" : "local"); 53 OFStream os(stdout);
54 os << " observed " << (var->IsParameter() ? "param" : "local") << " ";
54 var->name()->Print(); 55 var->name()->Print();
55 PrintF(" : "); 56 os << " : ";
56 value->ShortPrint(); 57 value->ShortPrint();
57 PrintF(" -> "); 58 os << " -> ";
58 type->TypePrint(); 59 type->PrintTo(os) << endl;
59 } 60 }
60 #endif // OBJECT_PRINT 61 #endif // OBJECT_PRINT
61 62
62 63
63 Effect AstTyper::ObservedOnStack(Object* value) { 64 Effect AstTyper::ObservedOnStack(Object* value) {
64 Type* lower = Type::NowOf(value, zone()); 65 Type* lower = Type::NowOf(value, zone());
65 return Effect(Bounds(lower, Type::Any(zone()))); 66 return Effect(Bounds(lower, Type::Any(zone())));
66 } 67 }
67 68
68 69
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 774 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
774 } 775 }
775 776
776 777
777 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 778 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
778 RECURSE(Visit(stmt->body())); 779 RECURSE(Visit(stmt->body()));
779 } 780 }
780 781
781 782
782 } } // namespace v8::internal 783 } } // namespace v8::internal
OLDNEW
« src/types.h ('K') | « src/types.cc ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698