Chromium Code Reviews| 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 12727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 12738 DCHECK(object->HasFastSmiOrObjectElements() || | 12738 DCHECK(object->HasFastSmiOrObjectElements() || |
| 12739 object->HasFastArgumentsElements()); | 12739 object->HasFastArgumentsElements()); |
| 12740 | 12740 |
| 12741 Isolate* isolate = object->GetIsolate(); | 12741 Isolate* isolate = object->GetIsolate(); |
| 12742 | 12742 |
| 12743 // Array optimizations rely on the prototype lookups of Array objects always | 12743 // Array optimizations rely on the prototype lookups of Array objects always |
| 12744 // returning undefined. If there is a store to the initial prototype object, | 12744 // returning undefined. If there is a store to the initial prototype object, |
| 12745 // make sure all of these optimizations are invalidated. | 12745 // make sure all of these optimizations are invalidated. |
| 12746 if (isolate->is_initial_object_prototype(*object) || | 12746 if (isolate->is_initial_object_prototype(*object) || |
| 12747 isolate->is_initial_array_prototype(*object)) { | 12747 isolate->is_initial_array_prototype(*object)) { |
| 12748 PrintF("Deopting\n"); | |
|
Jakob Kummerow
2015/04/20 10:52:05
debugging leftover?
mvstanton
2015/04/20 14:10:39
Done.
| |
| 12748 object->map()->dependent_code()->DeoptimizeDependentCodeGroup(isolate, | 12749 object->map()->dependent_code()->DeoptimizeDependentCodeGroup(isolate, |
| 12749 DependentCode::kElementsCantBeAddedGroup); | 12750 DependentCode::kElementsCantBeAddedGroup); |
| 12750 } | 12751 } |
| 12751 | 12752 |
| 12752 Handle<FixedArray> backing_store(FixedArray::cast(object->elements())); | 12753 Handle<FixedArray> backing_store(FixedArray::cast(object->elements())); |
| 12753 if (backing_store->map() == | 12754 if (backing_store->map() == |
| 12754 isolate->heap()->sloppy_arguments_elements_map()) { | 12755 isolate->heap()->sloppy_arguments_elements_map()) { |
| 12755 backing_store = handle(FixedArray::cast(backing_store->get(1))); | 12756 backing_store = handle(FixedArray::cast(backing_store->get(1))); |
| 12756 } else { | 12757 } else { |
| 12757 backing_store = EnsureWritableFastElements(object); | 12758 backing_store = EnsureWritableFastElements(object); |
| (...skipping 4388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 17146 CompilationInfo* info) { | 17147 CompilationInfo* info) { |
| 17147 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17148 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
| 17148 handle(cell->dependent_code(), info->isolate()), | 17149 handle(cell->dependent_code(), info->isolate()), |
| 17149 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17150 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
| 17150 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17151 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
| 17151 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17152 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
| 17152 cell, info->zone()); | 17153 cell, info->zone()); |
| 17153 } | 17154 } |
| 17154 | 17155 |
| 17155 } } // namespace v8::internal | 17156 } } // namespace v8::internal |
| OLD | NEW |