| 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 15160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15171 } | 15171 } |
| 15172 | 15172 |
| 15173 #ifdef ENABLE_DISASSEMBLER | 15173 #ifdef ENABLE_DISASSEMBLER |
| 15174 if (handler_table()->length() > 0) { | 15174 if (handler_table()->length() > 0) { |
| 15175 os << "Handler Table (size = " << handler_table()->Size() << ")\n"; | 15175 os << "Handler Table (size = " << handler_table()->Size() << ")\n"; |
| 15176 HandlerTable::cast(handler_table())->HandlerTableRangePrint(os); | 15176 HandlerTable::cast(handler_table())->HandlerTableRangePrint(os); |
| 15177 } | 15177 } |
| 15178 #endif | 15178 #endif |
| 15179 } | 15179 } |
| 15180 | 15180 |
| 15181 void BytecodeArray::CopyTo(BytecodeArray* to) { |
| 15182 BytecodeArray* from = this; |
| 15183 DCHECK_EQ(from->length(), to->length()); |
| 15184 CopyBytes(to->GetFirstBytecodeAddress(), from->GetFirstBytecodeAddress(), |
| 15185 from->length()); |
| 15186 } |
| 15181 | 15187 |
| 15182 // static | 15188 // static |
| 15183 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { | 15189 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { |
| 15184 DCHECK(capacity >= 0); | 15190 DCHECK(capacity >= 0); |
| 15185 array->GetIsolate()->factory()->NewJSArrayStorage( | 15191 array->GetIsolate()->factory()->NewJSArrayStorage( |
| 15186 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); | 15192 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); |
| 15187 } | 15193 } |
| 15188 | 15194 |
| 15189 | 15195 |
| 15190 // Returns false if the passed-in index is marked non-configurable, which will | 15196 // Returns false if the passed-in index is marked non-configurable, which will |
| (...skipping 4688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19879 if (cell->value() != *new_value) { | 19885 if (cell->value() != *new_value) { |
| 19880 cell->set_value(*new_value); | 19886 cell->set_value(*new_value); |
| 19881 Isolate* isolate = cell->GetIsolate(); | 19887 Isolate* isolate = cell->GetIsolate(); |
| 19882 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19888 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19883 isolate, DependentCode::kPropertyCellChangedGroup); | 19889 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19884 } | 19890 } |
| 19885 } | 19891 } |
| 19886 | 19892 |
| 19887 } // namespace internal | 19893 } // namespace internal |
| 19888 } // namespace v8 | 19894 } // namespace v8 |
| OLD | NEW |