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/compiler.h" | 5 #include "src/compiler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/ast-numbering.h" | 9 #include "src/ast-numbering.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector( | 215 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector( |
216 function()->feedback_vector_spec()); | 216 function()->feedback_vector_spec()); |
217 } | 217 } |
218 | 218 |
219 // It's very important that recompiles do not alter the structure of the | 219 // It's very important that recompiles do not alter the structure of the |
220 // type feedback vector. | 220 // type feedback vector. |
221 CHECK(!feedback_vector_->SpecDiffersFrom(function()->feedback_vector_spec())); | 221 CHECK(!feedback_vector_->SpecDiffersFrom(function()->feedback_vector_spec())); |
222 } | 222 } |
223 | 223 |
224 | 224 |
225 bool CompilationInfo::is_simple_parameter_list() { | 225 bool CompilationInfo::has_simple_parameters() { |
226 return scope()->is_simple_parameter_list(); | 226 return scope()->has_simple_parameters(); |
227 } | 227 } |
228 | 228 |
229 | 229 |
230 bool CompilationInfo::MayUseThis() const { | 230 bool CompilationInfo::MayUseThis() const { |
231 return scope()->has_this_declaration() && scope()->receiver()->is_used(); | 231 return scope()->has_this_declaration() && scope()->receiver()->is_used(); |
232 } | 232 } |
233 | 233 |
234 | 234 |
235 int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared, | 235 int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared, |
236 SourcePosition position, | 236 SourcePosition position, |
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 | 1673 |
1674 | 1674 |
1675 #if DEBUG | 1675 #if DEBUG |
1676 void CompilationInfo::PrintAstForTesting() { | 1676 void CompilationInfo::PrintAstForTesting() { |
1677 PrintF("--- Source from AST ---\n%s\n", | 1677 PrintF("--- Source from AST ---\n%s\n", |
1678 PrettyPrinter(isolate(), zone()).PrintProgram(function())); | 1678 PrettyPrinter(isolate(), zone()).PrintProgram(function())); |
1679 } | 1679 } |
1680 #endif | 1680 #endif |
1681 } // namespace internal | 1681 } // namespace internal |
1682 } // namespace v8 | 1682 } // namespace v8 |
OLD | NEW |