OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 } | 374 } |
375 | 375 |
376 | 376 |
377 // static | 377 // static |
378 Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) { | 378 Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) { |
379 if (object->IsNumber()) return isolate->factory()->number_string(); | 379 if (object->IsNumber()) return isolate->factory()->number_string(); |
380 if (object->IsUndefined() || object->IsUndetectableObject()) { | 380 if (object->IsUndefined() || object->IsUndetectableObject()) { |
381 return isolate->factory()->undefined_string(); | 381 return isolate->factory()->undefined_string(); |
382 } | 382 } |
383 if (object->IsBoolean()) return isolate->factory()->boolean_string(); | 383 if (object->IsBoolean()) return isolate->factory()->boolean_string(); |
| 384 if (object->IsString()) return isolate->factory()->string_string(); |
384 if (object->IsSymbol()) return isolate->factory()->symbol_string(); | 385 if (object->IsSymbol()) return isolate->factory()->symbol_string(); |
385 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | 386 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
386 if (object->Is##Type()) return isolate->factory()->type##_string(); | 387 if (object->Is##Type()) return isolate->factory()->type##_string(); |
387 SIMD128_TYPES(SIMD128_TYPE) | 388 SIMD128_TYPES(SIMD128_TYPE) |
388 #undef SIMD128_TYPE | 389 #undef SIMD128_TYPE |
389 if (object->IsCallable()) return isolate->factory()->function_string(); | 390 if (object->IsCallable()) return isolate->factory()->function_string(); |
390 return isolate->factory()->object_string(); | 391 return isolate->factory()->object_string(); |
391 } | 392 } |
392 | 393 |
393 | 394 |
(...skipping 16495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16889 if (cell->value() != *new_value) { | 16890 if (cell->value() != *new_value) { |
16890 cell->set_value(*new_value); | 16891 cell->set_value(*new_value); |
16891 Isolate* isolate = cell->GetIsolate(); | 16892 Isolate* isolate = cell->GetIsolate(); |
16892 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16893 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16893 isolate, DependentCode::kPropertyCellChangedGroup); | 16894 isolate, DependentCode::kPropertyCellChangedGroup); |
16894 } | 16895 } |
16895 } | 16896 } |
16896 | 16897 |
16897 } // namespace internal | 16898 } // namespace internal |
16898 } // namespace v8 | 16899 } // namespace v8 |
OLD | NEW |