| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 #include <iomanip> | 8 #include <iomanip> |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 13405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13416 if (shared_info->is_generator()) builder.AppendCharacter('*'); | 13416 if (shared_info->is_generator()) builder.AppendCharacter('*'); |
| 13417 } else { | 13417 } else { |
| 13418 if (shared_info->is_generator()) { | 13418 if (shared_info->is_generator()) { |
| 13419 builder.AppendCString("function* "); | 13419 builder.AppendCString("function* "); |
| 13420 } else { | 13420 } else { |
| 13421 builder.AppendCString("function "); | 13421 builder.AppendCString("function "); |
| 13422 } | 13422 } |
| 13423 } | 13423 } |
| 13424 if (shared_info->name_should_print_as_anonymous()) { | 13424 if (shared_info->name_should_print_as_anonymous()) { |
| 13425 builder.AppendCString("anonymous"); | 13425 builder.AppendCString("anonymous"); |
| 13426 } else { | 13426 } else if (!shared_info->is_anonymous_expression()) { |
| 13427 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); | 13427 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); |
| 13428 } | 13428 } |
| 13429 } | 13429 } |
| 13430 builder.AppendString(Handle<String>::cast(shared_info->GetSourceCode())); | 13430 builder.AppendString(Handle<String>::cast(shared_info->GetSourceCode())); |
| 13431 return builder.Finish().ToHandleChecked(); | 13431 return builder.Finish().ToHandleChecked(); |
| 13432 } | 13432 } |
| 13433 | 13433 |
| 13434 | 13434 |
| 13435 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball, | 13435 void Oddball::Initialize(Isolate* isolate, Handle<Oddball> oddball, |
| 13436 const char* to_string, Handle<Object> to_number, | 13436 const char* to_string, Handle<Object> to_number, |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13851 } | 13851 } |
| 13852 | 13852 |
| 13853 | 13853 |
| 13854 void SharedFunctionInfo::InitFromFunctionLiteral( | 13854 void SharedFunctionInfo::InitFromFunctionLiteral( |
| 13855 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { | 13855 Handle<SharedFunctionInfo> shared_info, FunctionLiteral* lit) { |
| 13856 shared_info->set_length(lit->scope()->default_function_length()); | 13856 shared_info->set_length(lit->scope()->default_function_length()); |
| 13857 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); | 13857 shared_info->set_internal_formal_parameter_count(lit->parameter_count()); |
| 13858 shared_info->set_function_token_position(lit->function_token_position()); | 13858 shared_info->set_function_token_position(lit->function_token_position()); |
| 13859 shared_info->set_start_position(lit->start_position()); | 13859 shared_info->set_start_position(lit->start_position()); |
| 13860 shared_info->set_end_position(lit->end_position()); | 13860 shared_info->set_end_position(lit->end_position()); |
| 13861 shared_info->set_is_expression(lit->is_expression()); | 13861 shared_info->set_is_declaration(lit->is_declaration()); |
| 13862 shared_info->set_is_anonymous(lit->is_anonymous()); | 13862 shared_info->set_is_named_expression(lit->is_named_expression()); |
| 13863 shared_info->set_is_anonymous_expression(lit->is_anonymous_expression()); |
| 13863 shared_info->set_inferred_name(*lit->inferred_name()); | 13864 shared_info->set_inferred_name(*lit->inferred_name()); |
| 13864 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); | 13865 shared_info->set_allows_lazy_compilation(lit->AllowsLazyCompilation()); |
| 13865 shared_info->set_allows_lazy_compilation_without_context( | 13866 shared_info->set_allows_lazy_compilation_without_context( |
| 13866 lit->AllowsLazyCompilationWithoutContext()); | 13867 lit->AllowsLazyCompilationWithoutContext()); |
| 13867 shared_info->set_language_mode(lit->language_mode()); | 13868 shared_info->set_language_mode(lit->language_mode()); |
| 13868 shared_info->set_uses_arguments(lit->scope()->arguments() != NULL); | 13869 shared_info->set_uses_arguments(lit->scope()->arguments() != NULL); |
| 13869 shared_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); | 13870 shared_info->set_has_duplicate_parameters(lit->has_duplicate_parameters()); |
| 13870 shared_info->set_ast_node_count(lit->ast_node_count()); | 13871 shared_info->set_ast_node_count(lit->ast_node_count()); |
| 13871 shared_info->set_is_function(lit->is_function()); | 13872 shared_info->set_is_function(lit->is_function()); |
| 13872 if (lit->dont_optimize_reason() != kNoReason) { | 13873 if (lit->dont_optimize_reason() != kNoReason) { |
| (...skipping 6005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19878 if (cell->value() != *new_value) { | 19879 if (cell->value() != *new_value) { |
| 19879 cell->set_value(*new_value); | 19880 cell->set_value(*new_value); |
| 19880 Isolate* isolate = cell->GetIsolate(); | 19881 Isolate* isolate = cell->GetIsolate(); |
| 19881 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19882 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19882 isolate, DependentCode::kPropertyCellChangedGroup); | 19883 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19883 } | 19884 } |
| 19884 } | 19885 } |
| 19885 | 19886 |
| 19886 } // namespace internal | 19887 } // namespace internal |
| 19887 } // namespace v8 | 19888 } // namespace v8 |
| OLD | NEW |