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

Unified Diff: src/factory.cc

Issue 2909893002: [debug] Untangle DebugInfo from break point support (Closed)
Patch Set: Address comments Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index dc2eb2b16b71912cfeef5d4476356dceac4e0473..4fa6925b4a515a9a8c6da50288f3852a7bfa773d 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2592,28 +2592,15 @@ Handle<String> Factory::NumberToString(Handle<Object> number,
Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) {
DCHECK(!shared->HasDebugInfo());
- // Allocate initial fixed array for active break points before allocating the
- // debug info object to avoid allocation while setting up the debug info
- // object.
- Handle<FixedArray> break_points(
- NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction));
-
- // Make a copy of the bytecode array if available.
- Handle<Object> maybe_debug_bytecode_array = undefined_value();
- if (shared->HasBytecodeArray()) {
- Handle<BytecodeArray> original(shared->bytecode_array());
- maybe_debug_bytecode_array = CopyBytecodeArray(original);
- }
-
- // Create and set up the debug info object. Debug info contains function, a
- // copy of the original code, the executing code and initial fixed array for
- // active break points.
+ Heap* heap = isolate()->heap();
+
Handle<DebugInfo> debug_info =
Handle<DebugInfo>::cast(NewStruct(DEBUG_INFO_TYPE));
+ debug_info->set_flags(DebugInfo::kNone);
debug_info->set_shared(*shared);
debug_info->set_debugger_hints(shared->debugger_hints());
- debug_info->set_debug_bytecode_array(*maybe_debug_bytecode_array);
- debug_info->set_break_points(*break_points);
+ debug_info->set_debug_bytecode_array(heap->undefined_value());
+ debug_info->set_break_points(heap->empty_fixed_array());
// Link debug info to function.
shared->set_debug_info(*debug_info);
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698