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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 if (!that->IsSimd128Value()) return false; | 405 if (!that->IsSimd128Value()) return false; |
406 return Simd128Value::cast(this)->Equals(Simd128Value::cast(that)); | 406 return Simd128Value::cast(this)->Equals(Simd128Value::cast(that)); |
407 } | 407 } |
408 return this == that; | 408 return this == that; |
409 } | 409 } |
410 | 410 |
411 | 411 |
412 // static | 412 // static |
413 Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) { | 413 Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) { |
414 if (object->IsNumber()) return isolate->factory()->number_string(); | 414 if (object->IsNumber()) return isolate->factory()->number_string(); |
415 if (object->IsUndefined() || object->IsUndetectableObject()) { | 415 if (object->IsOddball()) return handle(Oddball::cast(*object)->type_of()); |
| 416 if (object->IsUndetectableObject()) { |
416 return isolate->factory()->undefined_string(); | 417 return isolate->factory()->undefined_string(); |
417 } | 418 } |
418 if (object->IsBoolean()) return isolate->factory()->boolean_string(); | |
419 if (object->IsString()) return isolate->factory()->string_string(); | 419 if (object->IsString()) return isolate->factory()->string_string(); |
420 if (object->IsSymbol()) return isolate->factory()->symbol_string(); | 420 if (object->IsSymbol()) return isolate->factory()->symbol_string(); |
421 if (object->IsString()) return isolate->factory()->string_string(); | 421 if (object->IsString()) return isolate->factory()->string_string(); |
422 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | 422 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
423 if (object->Is##Type()) return isolate->factory()->type##_string(); | 423 if (object->Is##Type()) return isolate->factory()->type##_string(); |
424 SIMD128_TYPES(SIMD128_TYPE) | 424 SIMD128_TYPES(SIMD128_TYPE) |
425 #undef SIMD128_TYPE | 425 #undef SIMD128_TYPE |
426 if (object->IsCallable()) return isolate->factory()->function_string(); | 426 if (object->IsCallable()) return isolate->factory()->function_string(); |
427 return isolate->factory()->object_string(); | 427 return isolate->factory()->object_string(); |
428 } | 428 } |
(...skipping 19494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19923 if (cell->value() != *new_value) { | 19923 if (cell->value() != *new_value) { |
19924 cell->set_value(*new_value); | 19924 cell->set_value(*new_value); |
19925 Isolate* isolate = cell->GetIsolate(); | 19925 Isolate* isolate = cell->GetIsolate(); |
19926 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19926 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19927 isolate, DependentCode::kPropertyCellChangedGroup); | 19927 isolate, DependentCode::kPropertyCellChangedGroup); |
19928 } | 19928 } |
19929 } | 19929 } |
19930 | 19930 |
19931 } // namespace internal | 19931 } // namespace internal |
19932 } // namespace v8 | 19932 } // namespace v8 |
OLD | NEW |