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

Side by Side Diff: src/debug.cc

Issue 6529055: [Isolates] Merge crankshaft (r5922 from bleeding_edge). (Closed)
Patch Set: Win32 port Created 9 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
« no previous file with comments | « src/data-flow.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 17 matching lines...) Expand all
28 #include "v8.h" 28 #include "v8.h"
29 29
30 #include "api.h" 30 #include "api.h"
31 #include "arguments.h" 31 #include "arguments.h"
32 #include "bootstrapper.h" 32 #include "bootstrapper.h"
33 #include "code-stubs.h" 33 #include "code-stubs.h"
34 #include "codegen.h" 34 #include "codegen.h"
35 #include "compilation-cache.h" 35 #include "compilation-cache.h"
36 #include "compiler.h" 36 #include "compiler.h"
37 #include "debug.h" 37 #include "debug.h"
38 #include "deoptimizer.h"
38 #include "execution.h" 39 #include "execution.h"
39 #include "global-handles.h" 40 #include "global-handles.h"
40 #include "ic.h" 41 #include "ic.h"
41 #include "ic-inl.h" 42 #include "ic-inl.h"
42 #include "messages.h" 43 #include "messages.h"
43 #include "natives.h" 44 #include "natives.h"
44 #include "stub-cache.h" 45 #include "stub-cache.h"
45 #include "log.h" 46 #include "log.h"
46 47
47 #include "../include/v8-debug.h" 48 #include "../include/v8-debug.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // There is always a possible break point at a debug break slot. 160 // There is always a possible break point at a debug break slot.
160 break_point_++; 161 break_point_++;
161 return; 162 return;
162 } else if (RelocInfo::IsCodeTarget(rmode())) { 163 } else if (RelocInfo::IsCodeTarget(rmode())) {
163 // Check for breakable code target. Look in the original code as setting 164 // Check for breakable code target. Look in the original code as setting
164 // break points can cause the code targets in the running (debugged) code 165 // break points can cause the code targets in the running (debugged) code
165 // to be of a different kind than in the original code. 166 // to be of a different kind than in the original code.
166 Address target = original_rinfo()->target_address(); 167 Address target = original_rinfo()->target_address();
167 Code* code = Code::GetCodeFromTargetAddress(target); 168 Code* code = Code::GetCodeFromTargetAddress(target);
168 if ((code->is_inline_cache_stub() && 169 if ((code->is_inline_cache_stub() &&
169 code->kind() != Code::BINARY_OP_IC) || 170 !code->is_binary_op_stub() &&
171 !code->is_type_recording_binary_op_stub() &&
172 !code->is_compare_ic_stub()) ||
170 RelocInfo::IsConstructCall(rmode())) { 173 RelocInfo::IsConstructCall(rmode())) {
171 break_point_++; 174 break_point_++;
172 return; 175 return;
173 } 176 }
174 if (code->kind() == Code::STUB) { 177 if (code->kind() == Code::STUB) {
175 if (IsDebuggerStatement()) { 178 if (IsDebuggerStatement()) {
176 break_point_++; 179 break_point_++;
177 return; 180 return;
178 } 181 }
179 if (type_ == ALL_BREAK_LOCATIONS) { 182 if (type_ == ALL_BREAK_LOCATIONS) {
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 1698
1696 1699
1697 // Ensures the debug information is present for shared. 1700 // Ensures the debug information is present for shared.
1698 bool Debug::EnsureDebugInfo(Handle<SharedFunctionInfo> shared) { 1701 bool Debug::EnsureDebugInfo(Handle<SharedFunctionInfo> shared) {
1699 // Return if we already have the debug info for shared. 1702 // Return if we already have the debug info for shared.
1700 if (HasDebugInfo(shared)) return true; 1703 if (HasDebugInfo(shared)) return true;
1701 1704
1702 // Ensure shared in compiled. Return false if this failed. 1705 // Ensure shared in compiled. Return false if this failed.
1703 if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) return false; 1706 if (!EnsureCompiled(shared, CLEAR_EXCEPTION)) return false;
1704 1707
1708 // If preparing for the first break point make sure to deoptimize all
1709 // functions as debugging does not work with optimized code.
1710 if (!has_break_points_) {
1711 Deoptimizer::DeoptimizeAll();
1712 }
1713
1705 // Create the debug info object. 1714 // Create the debug info object.
1706 Handle<DebugInfo> debug_info = FACTORY->NewDebugInfo(shared); 1715 Handle<DebugInfo> debug_info = FACTORY->NewDebugInfo(shared);
1707 1716
1708 // Add debug info to the list. 1717 // Add debug info to the list.
1709 DebugInfoListNode* node = new DebugInfoListNode(*debug_info); 1718 DebugInfoListNode* node = new DebugInfoListNode(*debug_info);
1710 node->set_next(debug_info_list_); 1719 node->set_next(debug_info_list_);
1711 debug_info_list_ = node; 1720 debug_info_list_ = node;
1712 1721
1713 // Now there is at least one break point. 1722 // Now there is at least one break point.
1714 has_break_points_ = true; 1723 has_break_points_ = true;
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
3150 { 3159 {
3151 Locker locker; 3160 Locker locker;
3152 Isolate::Current()->debugger()->CallMessageDispatchHandler(); 3161 Isolate::Current()->debugger()->CallMessageDispatchHandler();
3153 } 3162 }
3154 } 3163 }
3155 } 3164 }
3156 3165
3157 #endif // ENABLE_DEBUGGER_SUPPORT 3166 #endif // ENABLE_DEBUGGER_SUPPORT
3158 3167
3159 } } // namespace v8::internal 3168 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/data-flow.cc ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698