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/ostreams.h" | 9 #include "src/ostreams.h" |
10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move | 10 #include "src/parser.h" // for CompileTimeValue; TODO(rossberg): should move |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 #undef RECURSE | 49 #undef RECURSE |
50 | 50 |
51 | 51 |
52 #ifdef OBJECT_PRINT | 52 #ifdef OBJECT_PRINT |
53 static void PrintObserved(Variable* var, Object* value, Type* type) { | 53 static void PrintObserved(Variable* var, Object* value, Type* type) { |
54 OFStream os(stdout); | 54 OFStream os(stdout); |
55 os << " observed " << (var->IsParameter() ? "param" : "local") << " "; | 55 os << " observed " << (var->IsParameter() ? "param" : "local") << " "; |
56 var->name()->Print(os); | 56 var->name()->Print(os); |
57 os << " : " << Brief(value) << " -> "; | 57 os << " : " << Brief(value) << " -> "; |
58 type->PrintTo(os); | 58 type->PrintTo(os); |
59 os << endl; | 59 os << std::endl; |
60 } | 60 } |
61 #endif // OBJECT_PRINT | 61 #endif // OBJECT_PRINT |
62 | 62 |
63 | 63 |
64 Effect AstTyper::ObservedOnStack(Object* value) { | 64 Effect AstTyper::ObservedOnStack(Object* value) { |
65 Type* lower = Type::NowOf(value, zone()); | 65 Type* lower = Type::NowOf(value, zone()); |
66 return Effect(Bounds(lower, Type::Any(zone()))); | 66 return Effect(Bounds(lower, Type::Any(zone()))); |
67 } | 67 } |
68 | 68 |
69 | 69 |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 777 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
778 } | 778 } |
779 | 779 |
780 | 780 |
781 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 781 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
782 RECURSE(Visit(stmt->body())); | 782 RECURSE(Visit(stmt->body())); |
783 } | 783 } |
784 | 784 |
785 | 785 |
786 } } // namespace v8::internal | 786 } } // namespace v8::internal |
OLD | NEW |