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 10233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10244 if (description->IsUndefined(isolate)) { | 10244 if (description->IsUndefined(isolate)) { |
10245 return isolate->factory()->empty_string(); | 10245 return isolate->factory()->empty_string(); |
10246 } | 10246 } |
10247 IncrementalStringBuilder builder(isolate); | 10247 IncrementalStringBuilder builder(isolate); |
10248 builder.AppendCharacter('['); | 10248 builder.AppendCharacter('['); |
10249 builder.AppendString(Handle<String>::cast(description)); | 10249 builder.AppendString(Handle<String>::cast(description)); |
10250 builder.AppendCharacter(']'); | 10250 builder.AppendCharacter(']'); |
10251 return builder.Finish(); | 10251 return builder.Finish(); |
10252 } | 10252 } |
10253 | 10253 |
| 10254 // static |
| 10255 MaybeHandle<String> Name::ToFunctionName(Handle<Name> name, |
| 10256 Handle<String> prefix) { |
| 10257 Handle<String> name_string; |
| 10258 Isolate* const isolate = name->GetIsolate(); |
| 10259 ASSIGN_RETURN_ON_EXCEPTION(isolate, name_string, ToFunctionName(name), |
| 10260 String); |
| 10261 IncrementalStringBuilder builder(isolate); |
| 10262 builder.AppendString(prefix); |
| 10263 builder.AppendCharacter(' '); |
| 10264 builder.AppendString(name_string); |
| 10265 return builder.Finish(); |
| 10266 } |
10254 | 10267 |
10255 namespace { | 10268 namespace { |
10256 | 10269 |
10257 bool AreDigits(const uint8_t* s, int from, int to) { | 10270 bool AreDigits(const uint8_t* s, int from, int to) { |
10258 for (int i = from; i < to; i++) { | 10271 for (int i = from; i < to; i++) { |
10259 if (s[i] < '0' || s[i] > '9') return false; | 10272 if (s[i] < '0' || s[i] > '9') return false; |
10260 } | 10273 } |
10261 | 10274 |
10262 return true; | 10275 return true; |
10263 } | 10276 } |
(...skipping 8554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18818 if (cell->value() != *new_value) { | 18831 if (cell->value() != *new_value) { |
18819 cell->set_value(*new_value); | 18832 cell->set_value(*new_value); |
18820 Isolate* isolate = cell->GetIsolate(); | 18833 Isolate* isolate = cell->GetIsolate(); |
18821 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18834 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
18822 isolate, DependentCode::kPropertyCellChangedGroup); | 18835 isolate, DependentCode::kPropertyCellChangedGroup); |
18823 } | 18836 } |
18824 } | 18837 } |
18825 | 18838 |
18826 } // namespace internal | 18839 } // namespace internal |
18827 } // namespace v8 | 18840 } // namespace v8 |
OLD | NEW |