| 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 10218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10229 if (description->IsUndefined(isolate)) { | 10229 if (description->IsUndefined(isolate)) { |
| 10230 return isolate->factory()->empty_string(); | 10230 return isolate->factory()->empty_string(); |
| 10231 } | 10231 } |
| 10232 IncrementalStringBuilder builder(isolate); | 10232 IncrementalStringBuilder builder(isolate); |
| 10233 builder.AppendCharacter('['); | 10233 builder.AppendCharacter('['); |
| 10234 builder.AppendString(Handle<String>::cast(description)); | 10234 builder.AppendString(Handle<String>::cast(description)); |
| 10235 builder.AppendCharacter(']'); | 10235 builder.AppendCharacter(']'); |
| 10236 return builder.Finish(); | 10236 return builder.Finish(); |
| 10237 } | 10237 } |
| 10238 | 10238 |
| 10239 // static |
| 10240 MaybeHandle<String> Name::ToFunctionName(Handle<Name> name, |
| 10241 Handle<String> prefix) { |
| 10242 Handle<String> name_string; |
| 10243 Isolate* const isolate = name->GetIsolate(); |
| 10244 ASSIGN_RETURN_ON_EXCEPTION(isolate, name_string, ToFunctionName(name), |
| 10245 String); |
| 10246 IncrementalStringBuilder builder(isolate); |
| 10247 builder.AppendString(prefix); |
| 10248 builder.AppendCharacter(' '); |
| 10249 builder.AppendString(name_string); |
| 10250 return builder.Finish(); |
| 10251 } |
| 10239 | 10252 |
| 10240 namespace { | 10253 namespace { |
| 10241 | 10254 |
| 10242 bool AreDigits(const uint8_t* s, int from, int to) { | 10255 bool AreDigits(const uint8_t* s, int from, int to) { |
| 10243 for (int i = from; i < to; i++) { | 10256 for (int i = from; i < to; i++) { |
| 10244 if (s[i] < '0' || s[i] > '9') return false; | 10257 if (s[i] < '0' || s[i] > '9') return false; |
| 10245 } | 10258 } |
| 10246 | 10259 |
| 10247 return true; | 10260 return true; |
| 10248 } | 10261 } |
| (...skipping 8525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18774 if (cell->value() != *new_value) { | 18787 if (cell->value() != *new_value) { |
| 18775 cell->set_value(*new_value); | 18788 cell->set_value(*new_value); |
| 18776 Isolate* isolate = cell->GetIsolate(); | 18789 Isolate* isolate = cell->GetIsolate(); |
| 18777 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18790 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 18778 isolate, DependentCode::kPropertyCellChangedGroup); | 18791 isolate, DependentCode::kPropertyCellChangedGroup); |
| 18779 } | 18792 } |
| 18780 } | 18793 } |
| 18781 | 18794 |
| 18782 } // namespace internal | 18795 } // namespace internal |
| 18783 } // namespace v8 | 18796 } // namespace v8 |
| OLD | NEW |