| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 16882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16893 void PropertyCell::set_type(HeapType* type, WriteBarrierMode ignored) { | 16893 void PropertyCell::set_type(HeapType* type, WriteBarrierMode ignored) { |
| 16894 ASSERT(IsPropertyCell()); | 16894 ASSERT(IsPropertyCell()); |
| 16895 set_type_raw(type, ignored); | 16895 set_type_raw(type, ignored); |
| 16896 } | 16896 } |
| 16897 | 16897 |
| 16898 | 16898 |
| 16899 Handle<HeapType> PropertyCell::UpdatedType(Handle<PropertyCell> cell, | 16899 Handle<HeapType> PropertyCell::UpdatedType(Handle<PropertyCell> cell, |
| 16900 Handle<Object> value) { | 16900 Handle<Object> value) { |
| 16901 Isolate* isolate = cell->GetIsolate(); | 16901 Isolate* isolate = cell->GetIsolate(); |
| 16902 Handle<HeapType> old_type(cell->type(), isolate); | 16902 Handle<HeapType> old_type(cell->type(), isolate); |
| 16903 // TODO(2803): Do not track ConsString as constant because they cannot be | 16903 Handle<HeapType> new_type = value->IsTheHole() |
| 16904 // embedded into code. | 16904 ? HeapType::Any(isolate) |
| 16905 Handle<HeapType> new_type = value->IsConsString() || value->IsTheHole() | 16905 : HeapType::Constant(value, isolate); |
| 16906 ? HeapType::Any(isolate) : HeapType::Constant(value, isolate); | |
| 16907 | 16906 |
| 16908 if (new_type->Is(old_type)) { | 16907 if (new_type->Is(old_type)) { |
| 16909 return old_type; | 16908 return old_type; |
| 16910 } | 16909 } |
| 16911 | 16910 |
| 16912 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16911 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 16913 isolate, DependentCode::kPropertyCellChangedGroup); | 16912 isolate, DependentCode::kPropertyCellChangedGroup); |
| 16914 | 16913 |
| 16915 if (old_type->Is(HeapType::None()) || old_type->Is(HeapType::Undefined())) { | 16914 if (old_type->Is(HeapType::None()) || old_type->Is(HeapType::Undefined())) { |
| 16916 return new_type; | 16915 return new_type; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16948 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16947 #define ERROR_MESSAGES_TEXTS(C, T) T, |
| 16949 static const char* error_messages_[] = { | 16948 static const char* error_messages_[] = { |
| 16950 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16949 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
| 16951 }; | 16950 }; |
| 16952 #undef ERROR_MESSAGES_TEXTS | 16951 #undef ERROR_MESSAGES_TEXTS |
| 16953 return error_messages_[reason]; | 16952 return error_messages_[reason]; |
| 16954 } | 16953 } |
| 16955 | 16954 |
| 16956 | 16955 |
| 16957 } } // namespace v8::internal | 16956 } } // namespace v8::internal |
| OLD | NEW |