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 12179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12190 return NativeCodeFunctionSourceString(shared_info); | 12190 return NativeCodeFunctionSourceString(shared_info); |
12191 } | 12191 } |
12192 | 12192 |
12193 IncrementalStringBuilder builder(isolate); | 12193 IncrementalStringBuilder builder(isolate); |
12194 if (!shared_info->is_arrow()) { | 12194 if (!shared_info->is_arrow()) { |
12195 if (shared_info->is_concise_method()) { | 12195 if (shared_info->is_concise_method()) { |
12196 if (shared_info->is_generator()) builder.AppendCharacter('*'); | 12196 if (shared_info->is_generator()) builder.AppendCharacter('*'); |
12197 } else { | 12197 } else { |
12198 if (shared_info->is_generator()) { | 12198 if (shared_info->is_generator()) { |
12199 builder.AppendCString("function* "); | 12199 builder.AppendCString("function* "); |
12200 } else if (shared_info->is_async()) { | |
12201 builder.AppendCString("async function "); | |
caitp (gmail)
2016/05/13 01:01:29
How do we make this work for async arrows and meth
Dan Ehrenberg
2016/05/13 19:10:32
Fixed (arrows already worked) and added tests
| |
12200 } else { | 12202 } else { |
12201 builder.AppendCString("function "); | 12203 builder.AppendCString("function "); |
12202 } | 12204 } |
12203 } | 12205 } |
12204 if (shared_info->name_should_print_as_anonymous()) { | 12206 if (shared_info->name_should_print_as_anonymous()) { |
12205 builder.AppendCString("anonymous"); | 12207 builder.AppendCString("anonymous"); |
12206 } else if (!shared_info->is_anonymous_expression()) { | 12208 } else if (!shared_info->is_anonymous_expression()) { |
12207 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); | 12209 builder.AppendString(handle(String::cast(shared_info->name()), isolate)); |
12208 } | 12210 } |
12209 } | 12211 } |
(...skipping 6085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
18295 if (cell->value() != *new_value) { | 18297 if (cell->value() != *new_value) { |
18296 cell->set_value(*new_value); | 18298 cell->set_value(*new_value); |
18297 Isolate* isolate = cell->GetIsolate(); | 18299 Isolate* isolate = cell->GetIsolate(); |
18298 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18300 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
18299 isolate, DependentCode::kPropertyCellChangedGroup); | 18301 isolate, DependentCode::kPropertyCellChangedGroup); |
18300 } | 18302 } |
18301 } | 18303 } |
18302 | 18304 |
18303 } // namespace internal | 18305 } // namespace internal |
18304 } // namespace v8 | 18306 } // namespace v8 |
OLD | NEW |