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

Side by Side Diff: src/objects.cc

Issue 2909893002: [debug] Untangle DebugInfo from break point support (Closed)
Patch Set: Port arm,arm64,ia32 Created 3 years, 6 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 <memory> 9 #include <memory>
10 #include <sstream> 10 #include <sstream>
(...skipping 13359 matching lines...) Expand 10 before | Expand all | Expand 10 after
13370 } else { 13370 } else {
13371 // Remove shared function info from root array. 13371 // Remove shared function info from root array.
13372 Object* list = isolate->heap()->noscript_shared_function_infos(); 13372 Object* list = isolate->heap()->noscript_shared_function_infos();
13373 CHECK(WeakFixedArray::cast(list)->Remove(shared)); 13373 CHECK(WeakFixedArray::cast(list)->Remove(shared));
13374 } 13374 }
13375 13375
13376 // Finally set new script. 13376 // Finally set new script.
13377 shared->set_script(*script_object); 13377 shared->set_script(*script_object);
13378 } 13378 }
13379 13379
13380 bool SharedFunctionInfo::HasBreakInfo() const {
13381 if (!HasDebugInfo()) return false;
13382 DebugInfo* info = DebugInfo::cast(debug_info());
13383 bool has_debug_info = info->HasBreakInfo();
Michael Starzinger 2017/05/31 13:14:58 nit: s/has_debug_info/has_break_info/
jgruber 2017/05/31 13:46:45 Done.
13384 DCHECK_IMPLIES(has_debug_info, HasDebugCode());
13385 return has_debug_info;
13386 }
13387
13380 DebugInfo* SharedFunctionInfo::GetDebugInfo() const { 13388 DebugInfo* SharedFunctionInfo::GetDebugInfo() const {
13381 DCHECK(HasDebugInfo()); 13389 DCHECK(HasDebugInfo());
13382 return DebugInfo::cast(debug_info()); 13390 return DebugInfo::cast(debug_info());
13383 } 13391 }
13384 13392
13385 int SharedFunctionInfo::debugger_hints() const { 13393 int SharedFunctionInfo::debugger_hints() const {
13386 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints(); 13394 if (HasDebugInfo()) return GetDebugInfo()->debugger_hints();
13387 return Smi::cast(debug_info())->value(); 13395 return Smi::cast(debug_info())->value();
13388 } 13396 }
13389 13397
(...skipping 7121 matching lines...) Expand 10 before | Expand all | Expand 10 after
20511 // not 20519 // not
20512 // depend on this. 20520 // depend on this.
20513 return DICTIONARY_ELEMENTS; 20521 return DICTIONARY_ELEMENTS;
20514 } 20522 }
20515 DCHECK_LE(kind, LAST_ELEMENTS_KIND); 20523 DCHECK_LE(kind, LAST_ELEMENTS_KIND);
20516 return kind; 20524 return kind;
20517 } 20525 }
20518 } 20526 }
20519 } // namespace internal 20527 } // namespace internal
20520 } // namespace v8 20528 } // namespace v8
OLDNEW
« src/debug/debug.cc ('K') | « src/ic/ic.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698