OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
8 | 8 |
9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/ast-this-access-visitor.h" | 10 #include "src/ast-this-access-visitor.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 parameter_count_(0), | 56 parameter_count_(0), |
57 optimization_id_(-1), | 57 optimization_id_(-1), |
58 ast_value_factory_(NULL), | 58 ast_value_factory_(NULL), |
59 ast_value_factory_owned_(false), | 59 ast_value_factory_owned_(false), |
60 aborted_due_to_dependency_change_(false), | 60 aborted_due_to_dependency_change_(false), |
61 osr_expr_stack_height_(0) { | 61 osr_expr_stack_height_(0) { |
62 Initialize(script->GetIsolate(), BASE, zone); | 62 Initialize(script->GetIsolate(), BASE, zone); |
63 } | 63 } |
64 | 64 |
65 | 65 |
66 CompilationInfo::CompilationInfo(Isolate* isolate, Zone* zone) | |
67 : flags_(kThisHasUses), | |
68 script_(Handle<Script>::null()), | |
69 source_stream_(NULL), | |
70 osr_ast_id_(BailoutId::None()), | |
71 parameter_count_(0), | |
72 optimization_id_(-1), | |
73 ast_value_factory_(NULL), | |
74 ast_value_factory_owned_(false), | |
75 aborted_due_to_dependency_change_(false), | |
76 osr_expr_stack_height_(0) { | |
77 Initialize(isolate, STUB, zone); | |
78 } | |
79 | |
80 | |
81 CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info, | 66 CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info, |
82 Zone* zone) | 67 Zone* zone) |
83 : flags_(kLazy | kThisHasUses), | 68 : flags_(kLazy | kThisHasUses), |
84 shared_info_(shared_info), | 69 shared_info_(shared_info), |
85 script_(Handle<Script>(Script::cast(shared_info->script()))), | 70 script_(Handle<Script>(Script::cast(shared_info->script()))), |
86 source_stream_(NULL), | 71 source_stream_(NULL), |
87 osr_ast_id_(BailoutId::None()), | 72 osr_ast_id_(BailoutId::None()), |
88 parameter_count_(0), | 73 parameter_count_(0), |
89 optimization_id_(-1), | 74 optimization_id_(-1), |
90 ast_value_factory_(NULL), | 75 ast_value_factory_(NULL), |
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1585 } | 1570 } |
1586 | 1571 |
1587 | 1572 |
1588 #if DEBUG | 1573 #if DEBUG |
1589 void CompilationInfo::PrintAstForTesting() { | 1574 void CompilationInfo::PrintAstForTesting() { |
1590 PrintF("--- Source from AST ---\n%s\n", | 1575 PrintF("--- Source from AST ---\n%s\n", |
1591 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1576 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1592 } | 1577 } |
1593 #endif | 1578 #endif |
1594 } } // namespace v8::internal | 1579 } } // namespace v8::internal |
OLD | NEW |