| 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 12174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12185 } | 12185 } |
| 12186 | 12186 |
| 12187 // Check if we have source code for the {function}. | 12187 // Check if we have source code for the {function}. |
| 12188 if (!shared_info->HasSourceCode()) { | 12188 if (!shared_info->HasSourceCode()) { |
| 12189 return NativeCodeFunctionSourceString(shared_info); | 12189 return NativeCodeFunctionSourceString(shared_info); |
| 12190 } | 12190 } |
| 12191 | 12191 |
| 12192 IncrementalStringBuilder builder(isolate); | 12192 IncrementalStringBuilder builder(isolate); |
| 12193 if (!shared_info->is_arrow()) { | 12193 if (!shared_info->is_arrow()) { |
| 12194 if (shared_info->is_concise_method()) { | 12194 if (shared_info->is_concise_method()) { |
| 12195 if (shared_info->is_generator()) builder.AppendCharacter('*'); | 12195 if (shared_info->is_generator()) { |
| 12196 builder.AppendCharacter('*'); |
| 12197 } else if (shared_info->is_async()) { |
| 12198 builder.AppendCString("async "); |
| 12199 } |
| 12196 } else { | 12200 } else { |
| 12197 if (shared_info->is_generator()) { | 12201 if (shared_info->is_generator()) { |
| 12198 builder.AppendCString("function* "); | 12202 builder.AppendCString("function* "); |
| 12203 } else if (shared_info->is_async()) { |
| 12204 builder.AppendCString("async function "); |
| 12199 } else { | 12205 } else { |
| 12200 builder.AppendCString("function "); | 12206 builder.AppendCString("function "); |
| 12201 } | 12207 } |
| 12202 } | 12208 } |
| 12203 if (shared_info->name_should_print_as_anonymous()) { | 12209 if (shared_info->name_should_print_as_anonymous()) { |
| 12204 builder.AppendCString("anonymous"); | 12210 builder.AppendCString("anonymous"); |
| 12205 } else if (!shared_info->is_anonymous_expression()) { | 12211 } else if (!shared_info->is_anonymous_expression()) { |
| 12206 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); | 12212 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); |
| 12207 } | 12213 } |
| 12208 } | 12214 } |
| (...skipping 6084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18293 if (cell->value() != *new_value) { | 18299 if (cell->value() != *new_value) { |
| 18294 cell->set_value(*new_value); | 18300 cell->set_value(*new_value); |
| 18295 Isolate* isolate = cell->GetIsolate(); | 18301 Isolate* isolate = cell->GetIsolate(); |
| 18296 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18302 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 18297 isolate, DependentCode::kPropertyCellChangedGroup); | 18303 isolate, DependentCode::kPropertyCellChangedGroup); |
| 18298 } | 18304 } |
| 18299 } | 18305 } |
| 18300 | 18306 |
| 18301 } // namespace internal | 18307 } // namespace internal |
| 18302 } // namespace v8 | 18308 } // namespace v8 |
| OLD | NEW |