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

Side by Side Diff: src/debug.cc

Issue 553117: Implementing inline caches for binary operations (ia32).... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/codegen-ia32.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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 ASSERT(position_ >= 0); 116 ASSERT(position_ >= 0);
117 ASSERT(statement_position_ >= 0); 117 ASSERT(statement_position_ >= 0);
118 } 118 }
119 119
120 // Check for breakable code target. Look in the original code as setting 120 // Check for breakable code target. Look in the original code as setting
121 // break points can cause the code targets in the running (debugged) code to 121 // break points can cause the code targets in the running (debugged) code to
122 // be of a different kind than in the original code. 122 // be of a different kind than in the original code.
123 if (RelocInfo::IsCodeTarget(rmode())) { 123 if (RelocInfo::IsCodeTarget(rmode())) {
124 Address target = original_rinfo()->target_address(); 124 Address target = original_rinfo()->target_address();
125 Code* code = Code::GetCodeFromTargetAddress(target); 125 Code* code = Code::GetCodeFromTargetAddress(target);
126 if (code->is_inline_cache_stub() || RelocInfo::IsConstructCall(rmode())) { 126 if ((code->is_inline_cache_stub() &&
127 code->kind() != Code::BINARY_OP_IC) ||
128 RelocInfo::IsConstructCall(rmode())) {
127 break_point_++; 129 break_point_++;
128 return; 130 return;
129 } 131 }
130 if (code->kind() == Code::STUB) { 132 if (code->kind() == Code::STUB) {
131 if (IsDebuggerStatement()) { 133 if (IsDebuggerStatement()) {
132 break_point_++; 134 break_point_++;
133 return; 135 return;
134 } 136 }
135 if (type_ == ALL_BREAK_LOCATIONS) { 137 if (type_ == ALL_BREAK_LOCATIONS) {
136 if (Debug::IsBreakStub(code)) { 138 if (Debug::IsBreakStub(code)) {
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 return major_key == CodeStub::CallFunction || 1332 return major_key == CodeStub::CallFunction ||
1331 major_key == CodeStub::StackCheck; 1333 major_key == CodeStub::StackCheck;
1332 } 1334 }
1333 1335
1334 1336
1335 // Find the builtin to use for invoking the debug break 1337 // Find the builtin to use for invoking the debug break
1336 Handle<Code> Debug::FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode) { 1338 Handle<Code> Debug::FindDebugBreak(Handle<Code> code, RelocInfo::Mode mode) {
1337 // Find the builtin debug break function matching the calling convention 1339 // Find the builtin debug break function matching the calling convention
1338 // used by the call site. 1340 // used by the call site.
1339 if (code->is_inline_cache_stub()) { 1341 if (code->is_inline_cache_stub()) {
1340 if (code->is_call_stub()) { 1342 switch (code->kind()) {
1341 return ComputeCallDebugBreak(code->arguments_count()); 1343 case Code::CALL_IC:
1342 } 1344 return ComputeCallDebugBreak(code->arguments_count());
1343 if (code->is_load_stub()) { 1345
1344 return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak)); 1346 case Code::LOAD_IC:
1345 } 1347 return Handle<Code>(Builtins::builtin(Builtins::LoadIC_DebugBreak));
1346 if (code->is_store_stub()) { 1348
1347 return Handle<Code>(Builtins::builtin(Builtins::StoreIC_DebugBreak)); 1349 case Code::STORE_IC:
1348 } 1350 return Handle<Code>(Builtins::builtin(Builtins::StoreIC_DebugBreak));
1349 if (code->is_keyed_load_stub()) { 1351
1350 Handle<Code> result = 1352 case Code::KEYED_LOAD_IC:
1351 Handle<Code>(Builtins::builtin(Builtins::KeyedLoadIC_DebugBreak)); 1353 return Handle<Code>(
1352 return result; 1354 Builtins::builtin(Builtins::KeyedLoadIC_DebugBreak));
1353 } 1355
1354 if (code->is_keyed_store_stub()) { 1356 case Code::KEYED_STORE_IC:
1355 Handle<Code> result = 1357 return Handle<Code>(
1356 Handle<Code>(Builtins::builtin(Builtins::KeyedStoreIC_DebugBreak)); 1358 Builtins::builtin(Builtins::KeyedStoreIC_DebugBreak));
1357 return result; 1359
1360 default:
1361 UNREACHABLE();
1358 } 1362 }
1359 } 1363 }
1360 if (RelocInfo::IsConstructCall(mode)) { 1364 if (RelocInfo::IsConstructCall(mode)) {
1361 Handle<Code> result = 1365 Handle<Code> result =
1362 Handle<Code>(Builtins::builtin(Builtins::ConstructCall_DebugBreak)); 1366 Handle<Code>(Builtins::builtin(Builtins::ConstructCall_DebugBreak));
1363 return result; 1367 return result;
1364 } 1368 }
1365 if (code->kind() == Code::STUB) { 1369 if (code->kind() == Code::STUB) {
1366 ASSERT(code->major_key() == CodeStub::CallFunction || 1370 ASSERT(code->major_key() == CodeStub::CallFunction ||
1367 code->major_key() == CodeStub::StackCheck); 1371 code->major_key() == CodeStub::StackCheck);
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 { 2792 {
2789 Locker locker; 2793 Locker locker;
2790 Debugger::CallMessageDispatchHandler(); 2794 Debugger::CallMessageDispatchHandler();
2791 } 2795 }
2792 } 2796 }
2793 } 2797 }
2794 2798
2795 #endif // ENABLE_DEBUGGER_SUPPORT 2799 #endif // ENABLE_DEBUGGER_SUPPORT
2796 2800
2797 } } // namespace v8::internal 2801 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698