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

Side by Side Diff: src/ic.cc

Issue 192075: Rename a constant to kCallTargetAddressOffset (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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/ic.h ('k') | src/ic-inl.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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // function and the original code. 115 // function and the original code.
116 JSFunction* function = JSFunction::cast(frame->function()); 116 JSFunction* function = JSFunction::cast(frame->function());
117 Handle<SharedFunctionInfo> shared(function->shared()); 117 Handle<SharedFunctionInfo> shared(function->shared());
118 Code* code = shared->code(); 118 Code* code = shared->code();
119 ASSERT(Debug::HasDebugInfo(shared)); 119 ASSERT(Debug::HasDebugInfo(shared));
120 Code* original_code = Debug::GetDebugInfo(shared)->original_code(); 120 Code* original_code = Debug::GetDebugInfo(shared)->original_code();
121 ASSERT(original_code->IsCode()); 121 ASSERT(original_code->IsCode());
122 // Get the address of the call site in the active code. This is the 122 // Get the address of the call site in the active code. This is the
123 // place where the call to DebugBreakXXX is and where the IC 123 // place where the call to DebugBreakXXX is and where the IC
124 // normally would be. 124 // normally would be.
125 Address addr = pc() - Assembler::kPatchReturnSequenceLength; 125 Address addr = pc() - Assembler::kCallTargetAddressOffset;
126 // Return the address in the original code. This is the place where 126 // Return the address in the original code. This is the place where
127 // the call which has been overwritten by the DebugBreakXXX resides 127 // the call which has been overwritten by the DebugBreakXXX resides
128 // and the place where the inline cache system should look. 128 // and the place where the inline cache system should look.
129 int delta = original_code->instruction_start() - code->instruction_start(); 129 int delta = original_code->instruction_start() - code->instruction_start();
130 return addr + delta; 130 return addr + delta;
131 } 131 }
132 #endif 132 #endif
133 133
134 IC::State IC::StateFrom(Code* target, Object* receiver) { 134 IC::State IC::StateFrom(Code* target, Object* receiver) {
135 IC::State state = target->ic_state(); 135 IC::State state = target->ic_state();
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 #undef ADDR 1359 #undef ADDR
1360 }; 1360 };
1361 1361
1362 1362
1363 Address IC::AddressFromUtilityId(IC::UtilityId id) { 1363 Address IC::AddressFromUtilityId(IC::UtilityId id) {
1364 return IC_utilities[id]; 1364 return IC_utilities[id];
1365 } 1365 }
1366 1366
1367 1367
1368 } } // namespace v8::internal 1368 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic.h ('k') | src/ic-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698