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 15251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15262 } | 15262 } |
15263 | 15263 |
15264 #ifdef ENABLE_DISASSEMBLER | 15264 #ifdef ENABLE_DISASSEMBLER |
15265 if (handler_table()->length() > 0) { | 15265 if (handler_table()->length() > 0) { |
15266 os << "Handler Table (size = " << handler_table()->Size() << ")\n"; | 15266 os << "Handler Table (size = " << handler_table()->Size() << ")\n"; |
15267 HandlerTable::cast(handler_table())->HandlerTableRangePrint(os); | 15267 HandlerTable::cast(handler_table())->HandlerTableRangePrint(os); |
15268 } | 15268 } |
15269 #endif | 15269 #endif |
15270 } | 15270 } |
15271 | 15271 |
| 15272 void BytecodeArray::CopyTo(BytecodeArray* to) { |
| 15273 BytecodeArray* from = this; |
| 15274 DCHECK_EQ(from->length(), to->length()); |
| 15275 CopyBytes(to->GetFirstBytecodeAddress(), from->GetFirstBytecodeAddress(), |
| 15276 from->length()); |
| 15277 } |
15272 | 15278 |
15273 // static | 15279 // static |
15274 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { | 15280 void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) { |
15275 DCHECK(capacity >= 0); | 15281 DCHECK(capacity >= 0); |
15276 array->GetIsolate()->factory()->NewJSArrayStorage( | 15282 array->GetIsolate()->factory()->NewJSArrayStorage( |
15277 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); | 15283 array, length, capacity, INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE); |
15278 } | 15284 } |
15279 | 15285 |
15280 | 15286 |
15281 // Returns false if the passed-in index is marked non-configurable, which will | 15287 // 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... |
19970 if (cell->value() != *new_value) { | 19976 if (cell->value() != *new_value) { |
19971 cell->set_value(*new_value); | 19977 cell->set_value(*new_value); |
19972 Isolate* isolate = cell->GetIsolate(); | 19978 Isolate* isolate = cell->GetIsolate(); |
19973 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19979 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19974 isolate, DependentCode::kPropertyCellChangedGroup); | 19980 isolate, DependentCode::kPropertyCellChangedGroup); |
19975 } | 19981 } |
19976 } | 19982 } |
19977 | 19983 |
19978 } // namespace internal | 19984 } // namespace internal |
19979 } // namespace v8 | 19985 } // namespace v8 |
OLD | NEW |