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 |
11 #include "src/scopes.h" | 11 #include "src/scopes.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 | 16 |
17 AstTyper::AstTyper(CompilationInfo* info) | 17 AstTyper::AstTyper(CompilationInfo* info) |
18 : info_(info), | 18 : info_(info), |
19 oracle_( | 19 oracle_(info->isolate(), info->zone(), |
20 handle(info->closure()->shared()->code()), | 20 handle(info->closure()->shared()->code()), |
21 handle(info->closure()->shared()->feedback_vector()), | 21 handle(info->closure()->shared()->feedback_vector()), |
22 handle(info->closure()->context()->native_context()), | 22 handle(info->closure()->context()->native_context())), |
23 info->zone()), | |
24 store_(info->zone()) { | 23 store_(info->zone()) { |
25 InitializeAstVisitor(info->zone()); | 24 InitializeAstVisitor(info->isolate(), info->zone()); |
26 } | 25 } |
27 | 26 |
28 | 27 |
29 #define RECURSE(call) \ | 28 #define RECURSE(call) \ |
30 do { \ | 29 do { \ |
31 DCHECK(!visitor->HasStackOverflow()); \ | 30 DCHECK(!visitor->HasStackOverflow()); \ |
32 call; \ | 31 call; \ |
33 if (visitor->HasStackOverflow()) return; \ | 32 if (visitor->HasStackOverflow()) return; \ |
34 } while (false) | 33 } while (false) |
35 | 34 |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 void AstTyper::VisitModuleUrl(ModuleUrl* module) { | 809 void AstTyper::VisitModuleUrl(ModuleUrl* module) { |
811 } | 810 } |
812 | 811 |
813 | 812 |
814 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { | 813 void AstTyper::VisitModuleStatement(ModuleStatement* stmt) { |
815 RECURSE(Visit(stmt->body())); | 814 RECURSE(Visit(stmt->body())); |
816 } | 815 } |
817 | 816 |
818 | 817 |
819 } } // namespace v8::internal | 818 } } // namespace v8::internal |
OLD | NEW |