| 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 <iomanip> | 5 #include <iomanip> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 10367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10378 | 10378 |
| 10379 // If the function is used as the global Array function, cache the | 10379 // If the function is used as the global Array function, cache the |
| 10380 // updated initial maps (and transitioned versions) in the native context. | 10380 // updated initial maps (and transitioned versions) in the native context. |
| 10381 Handle<Context> native_context(function->context()->native_context(), | 10381 Handle<Context> native_context(function->context()->native_context(), |
| 10382 isolate); | 10382 isolate); |
| 10383 Handle<Object> array_function( | 10383 Handle<Object> array_function( |
| 10384 native_context->get(Context::ARRAY_FUNCTION_INDEX), isolate); | 10384 native_context->get(Context::ARRAY_FUNCTION_INDEX), isolate); |
| 10385 if (array_function->IsJSFunction() && | 10385 if (array_function->IsJSFunction() && |
| 10386 *function == JSFunction::cast(*array_function)) { | 10386 *function == JSFunction::cast(*array_function)) { |
| 10387 CacheInitialJSArrayMaps(native_context, new_map); | 10387 CacheInitialJSArrayMaps(native_context, new_map); |
| 10388 Handle<Map> new_strong_map = | 10388 Handle<Map> new_strong_map = Map::Copy(new_map, "SetInstancePrototype"); |
| 10389 Map::Copy(initial_map, "SetInstancePrototype"); | |
| 10390 new_strong_map->set_is_strong(); | 10389 new_strong_map->set_is_strong(); |
| 10391 CacheInitialJSArrayMaps(native_context, new_strong_map); | 10390 CacheInitialJSArrayMaps(native_context, new_strong_map); |
| 10392 } | 10391 } |
| 10393 } | 10392 } |
| 10394 | 10393 |
| 10395 // Deoptimize all code that embeds the previous initial map. | 10394 // Deoptimize all code that embeds the previous initial map. |
| 10396 initial_map->dependent_code()->DeoptimizeDependentCodeGroup( | 10395 initial_map->dependent_code()->DeoptimizeDependentCodeGroup( |
| 10397 isolate, DependentCode::kInitialMapChangedGroup); | 10396 isolate, DependentCode::kInitialMapChangedGroup); |
| 10398 } else { | 10397 } else { |
| 10399 // Put the value in the initial map field until an initial map is | 10398 // Put the value in the initial map field until an initial map is |
| (...skipping 6928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17328 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, | 17327 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, |
| 17329 Handle<Object> new_value) { | 17328 Handle<Object> new_value) { |
| 17330 if (cell->value() != *new_value) { | 17329 if (cell->value() != *new_value) { |
| 17331 cell->set_value(*new_value); | 17330 cell->set_value(*new_value); |
| 17332 Isolate* isolate = cell->GetIsolate(); | 17331 Isolate* isolate = cell->GetIsolate(); |
| 17333 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 17332 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 17334 isolate, DependentCode::kPropertyCellChangedGroup); | 17333 isolate, DependentCode::kPropertyCellChangedGroup); |
| 17335 } | 17334 } |
| 17336 } | 17335 } |
| 17337 } } // namespace v8::internal | 17336 } } // namespace v8::internal |
| OLD | NEW |