| 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/crankshaft/typing.h" | 5 #include "src/crankshaft/typing.h" |
| 6 | 6 |
| 7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/execution.h" |
| 9 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
| 10 #include "src/frames.h" | 11 #include "src/frames.h" |
| 12 #include "src/isolate.h" |
| 11 #include "src/ostreams.h" | 13 #include "src/ostreams.h" |
| 12 #include "src/splay-tree-inl.h" | 14 #include "src/splay-tree-inl.h" |
| 13 | 15 |
| 14 namespace v8 { | 16 namespace v8 { |
| 15 namespace internal { | 17 namespace internal { |
| 16 | 18 |
| 17 AstTyper::AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure, | 19 AstTyper::AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure, |
| 18 DeclarationScope* scope, BailoutId osr_ast_id, | 20 DeclarationScope* scope, BailoutId osr_ast_id, |
| 19 FunctionLiteral* root, AstTypeBounds* bounds) | 21 FunctionLiteral* root, AstTypeBounds* bounds) |
| 20 : isolate_(isolate), | 22 : isolate_(isolate), |
| 21 zone_(zone), | 23 zone_(zone), |
| 22 closure_(closure), | 24 closure_(closure), |
| 23 scope_(scope), | 25 scope_(scope), |
| 24 osr_ast_id_(osr_ast_id), | 26 osr_ast_id_(osr_ast_id), |
| 25 root_(root), | 27 root_(root), |
| 26 oracle_(isolate, zone, handle(closure->shared()->code()), | 28 oracle_(isolate, zone, handle(closure->shared()->code()), |
| 27 handle(closure->feedback_vector()), | 29 handle(closure->feedback_vector()), |
| 28 handle(closure->context()->native_context())), | 30 handle(closure->context()->native_context())), |
| 29 store_(zone), | 31 store_(zone), |
| 30 bounds_(bounds) { | 32 bounds_(bounds) { |
| 31 InitializeAstVisitor(isolate); | 33 InitializeAstVisitor(isolate->stack_guard()->real_climit()); |
| 32 } | 34 } |
| 33 | 35 |
| 34 | 36 |
| 35 #ifdef OBJECT_PRINT | 37 #ifdef OBJECT_PRINT |
| 36 static void PrintObserved(Variable* var, Object* value, AstType* type) { | 38 static void PrintObserved(Variable* var, Object* value, AstType* type) { |
| 37 OFStream os(stdout); | 39 OFStream os(stdout); |
| 38 os << " observed " << (var->IsParameter() ? "param" : "local") << " "; | 40 os << " observed " << (var->IsParameter() ? "param" : "local") << " "; |
| 39 var->name()->Print(os); | 41 var->name()->Print(os); |
| 40 os << " : " << Brief(value) << " -> "; | 42 os << " : " << Brief(value) << " -> "; |
| 41 type->PrintTo(os); | 43 type->PrintTo(os); |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 } | 786 } |
| 785 | 787 |
| 786 | 788 |
| 787 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { | 789 void AstTyper::VisitFunctionDeclaration(FunctionDeclaration* declaration) { |
| 788 RECURSE(Visit(declaration->fun())); | 790 RECURSE(Visit(declaration->fun())); |
| 789 } | 791 } |
| 790 | 792 |
| 791 | 793 |
| 792 } // namespace internal | 794 } // namespace internal |
| 793 } // namespace v8 | 795 } // namespace v8 |
| OLD | NEW |