| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 OFStream os(stdout); | 53 OFStream os(stdout); |
| 54 os << " observed " << (var->IsParameter() ? "param" : "local") << " "; | 54 os << " observed " << (var->IsParameter() ? "param" : "local") << " "; |
| 55 var->name()->Print(); | 55 var->name()->Print(os); |
| 56 os << " : "; | 56 os << " : " << Brief(value) << " -> "; |
| 57 value->ShortPrint(); | |
| 58 os << " -> "; | |
| 59 type->PrintTo(os); | 57 type->PrintTo(os); |
| 60 os << endl; | 58 os << endl; |
| 61 } | 59 } |
| 62 #endif // OBJECT_PRINT | 60 #endif // OBJECT_PRINT |
| 63 | 61 |
| 64 | 62 |
| 65 Effect AstTyper::ObservedOnStack(Object* value) { | 63 Effect AstTyper::ObservedOnStack(Object* value) { |
| 66 Type* lower = Type::NowOf(value, zone()); | 64 Type* lower = Type::NowOf(value, zone()); |
| 67 return Effect(Bounds(lower, Type::Any(zone()))); | 65 return Effect(Bounds(lower, Type::Any(zone()))); |
| 68 } | 66 } |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 773 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
| 776 } | 774 } |
| 777 | 775 |
| 778 | 776 |
| 779 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 777 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
| 780 RECURSE(Visit(stmt->body())); | 778 RECURSE(Visit(stmt->body())); |
| 781 } | 779 } |
| 782 | 780 |
| 783 | 781 |
| 784 } } // namespace v8::internal | 782 } } // namespace v8::internal |
| OLD | NEW |