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/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 function_info->set_allows_lazy_compilation_without_context( | 600 function_info->set_allows_lazy_compilation_without_context( |
601 lit->AllowsLazyCompilationWithoutContext()); | 601 lit->AllowsLazyCompilationWithoutContext()); |
602 function_info->set_strict_mode(lit->strict_mode()); | 602 function_info->set_strict_mode(lit->strict_mode()); |
603 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); | 603 function_info->set_uses_arguments(lit->scope()->arguments() != NULL); |
604 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); | 604 function_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); |
605 function_info->set_ast_node_count(lit->ast_node_count()); | 605 function_info->set_ast_node_count(lit->ast_node_count()); |
606 function_info->set_is_function(lit->is_function()); | 606 function_info->set_is_function(lit->is_function()); |
607 function_info->set_bailout_reason(lit->dont_optimize_reason()); | 607 function_info->set_bailout_reason(lit->dont_optimize_reason()); |
608 function_info->set_dont_cache(lit->flags()->Contains(kDontCache)); | 608 function_info->set_dont_cache(lit->flags()->Contains(kDontCache)); |
609 function_info->set_kind(lit->kind()); | 609 function_info->set_kind(lit->kind()); |
| 610 function_info->set_uses_super(lit->uses_super()); |
610 function_info->set_asm_function(lit->scope()->asm_function()); | 611 function_info->set_asm_function(lit->scope()->asm_function()); |
611 } | 612 } |
612 | 613 |
613 | 614 |
614 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 615 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
615 CompilationInfo* info, | 616 CompilationInfo* info, |
616 Handle<SharedFunctionInfo> shared) { | 617 Handle<SharedFunctionInfo> shared) { |
617 // SharedFunctionInfo is passed separately, because if CompilationInfo | 618 // SharedFunctionInfo is passed separately, because if CompilationInfo |
618 // was created using Script object, it will not have it. | 619 // was created using Script object, it will not have it. |
619 | 620 |
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 } | 1327 } |
1327 | 1328 |
1328 // Create a shared function info object. | 1329 // Create a shared function info object. |
1329 Handle<SharedFunctionInfo> result = factory->NewSharedFunctionInfo( | 1330 Handle<SharedFunctionInfo> result = factory->NewSharedFunctionInfo( |
1330 literal->name(), literal->materialized_literal_count(), literal->kind(), | 1331 literal->name(), literal->materialized_literal_count(), literal->kind(), |
1331 info.code(), scope_info, info.feedback_vector()); | 1332 info.code(), scope_info, info.feedback_vector()); |
1332 SetFunctionInfo(result, literal, false, script); | 1333 SetFunctionInfo(result, literal, false, script); |
1333 RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result); | 1334 RecordFunctionCompilation(Logger::FUNCTION_TAG, &info, result); |
1334 result->set_allows_lazy_compilation(allow_lazy); | 1335 result->set_allows_lazy_compilation(allow_lazy); |
1335 result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx); | 1336 result->set_allows_lazy_compilation_without_context(allow_lazy_without_ctx); |
| 1337 result->set_uses_super(literal->uses_super()); |
1336 | 1338 |
1337 // Set the expected number of properties for instances and return | 1339 // Set the expected number of properties for instances and return |
1338 // the resulting function. | 1340 // the resulting function. |
1339 SetExpectedNofPropertiesFromEstimate(result, | 1341 SetExpectedNofPropertiesFromEstimate(result, |
1340 literal->expected_property_count()); | 1342 literal->expected_property_count()); |
1341 live_edit_tracker.RecordFunctionInfo(result, literal, info.zone()); | 1343 live_edit_tracker.RecordFunctionInfo(result, literal, info.zone()); |
1342 return result; | 1344 return result; |
1343 } | 1345 } |
1344 | 1346 |
1345 | 1347 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 AllowHandleDereference allow_deref; | 1475 AllowHandleDereference allow_deref; |
1474 bool tracing_on = info()->IsStub() | 1476 bool tracing_on = info()->IsStub() |
1475 ? FLAG_trace_hydrogen_stubs | 1477 ? FLAG_trace_hydrogen_stubs |
1476 : (FLAG_trace_hydrogen && | 1478 : (FLAG_trace_hydrogen && |
1477 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1479 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1478 return (tracing_on && | 1480 return (tracing_on && |
1479 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1481 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1480 } | 1482 } |
1481 | 1483 |
1482 } } // namespace v8::internal | 1484 } } // namespace v8::internal |
OLD | NEW |