Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: src/objects.cc

Issue 1703453002: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698