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

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: Rebased. Reformatted. Feedback addressed. 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
« no previous file with comments | « src/types.cc ('k') | src/x64/code-stubs-x64.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 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);
60 os << endl;
59 } 61 }
60 #endif // OBJECT_PRINT 62 #endif // OBJECT_PRINT
61 63
62 64
63 Effect AstTyper::ObservedOnStack(Object* value) { 65 Effect AstTyper::ObservedOnStack(Object* value) {
64 Type* lower = Type::NowOf(value, zone()); 66 Type* lower = Type::NowOf(value, zone());
65 return Effect(Bounds(lower, Type::Any(zone()))); 67 return Effect(Bounds(lower, Type::Any(zone())));
66 } 68 }
67 69
68 70
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 void AstTyper::VisitModuleUrl(ModuleUrl* module) { 775 void AstTyper::VisitModuleUrl(ModuleUrl* module) {
774 } 776 }
775 777
776 778
777 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { 779 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) {
778 RECURSE(Visit(stmt->body())); 780 RECURSE(Visit(stmt->body()));
779 } 781 }
780 782
781 783
782 } } // namespace v8::internal 784 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « 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