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

Unified Diff: src/ic-inl.h

Issue 195373004: Revert "Pass a Code object to Assembler::(set_)target_address_at for use by ool constant pool." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic-inl.h
diff --git a/src/ic-inl.h b/src/ic-inl.h
index ebe0fb9b35e3e0fd1181757b4053e6e0f6ece72d..e0f807ce4bfa4651cdfcab38a706f498450eb42b 100644
--- a/src/ic-inl.h
+++ b/src/ic-inl.h
@@ -50,20 +50,12 @@ Address IC::address() const {
// At least one break point is active perform additional test to ensure that
// break point locations are updated correctly.
- if (debug->IsDebugBreak(Assembler::target_address_at(result,
- raw_constant_pool()))) {
+ if (debug->IsDebugBreak(Assembler::target_address_at(result))) {
// If the call site is a call to debug break then return the address in
// the original code instead of the address in the running code. This will
// cause the original code to be updated and keeps the breakpoint active in
// the running code.
- Code* code = GetCode();
- Code* original_code = GetOriginalCode();
- intptr_t delta =
- original_code->instruction_start() - code->instruction_start();
- // Return the address in the original code. This is the place where
- // the call which has been overwritten by the DebugBreakXXX resides
- // and the place where the inline cache system should look.
- return result + delta;
+ return OriginalCodeAddress();
} else {
// No break point here just return the address of the call.
return result;
@@ -74,45 +66,9 @@ Address IC::address() const {
}
-ConstantPoolArray* IC::constant_pool() const {
- if (!FLAG_enable_ool_constant_pool) {
- return NULL;
- } else {
- Handle<ConstantPoolArray> result = raw_constant_pool_;
-#ifdef ENABLE_DEBUGGER_SUPPORT
- Debug* debug = isolate()->debug();
- // First check if any break points are active if not just return the
- // original constant pool.
- if (!debug->has_break_points()) return *result;
-
- // At least one break point is active perform additional test to ensure that
- // break point locations are updated correctly.
- Address target = Assembler::target_address_from_return_address(pc());
- if (debug->IsDebugBreak(
- Assembler::target_address_at(target, raw_constant_pool()))) {
- // If the call site is a call to debug break then we want to return the
- // constant pool for the original code instead of the breakpointed code.
- return GetOriginalCode()->constant_pool();
- }
-#endif
- return *result;
- }
-}
-
-
-ConstantPoolArray* IC::raw_constant_pool() const {
- if (FLAG_enable_ool_constant_pool) {
- return *raw_constant_pool_;
- } else {
- return NULL;
- }
-}
-
-
-Code* IC::GetTargetAtAddress(Address address,
- ConstantPoolArray* constant_pool) {
+Code* IC::GetTargetAtAddress(Address address) {
// Get the target address of the IC.
- Address target = Assembler::target_address_at(address, constant_pool);
+ Address target = Assembler::target_address_at(address);
// Convert target address to the code object. Code::GetCodeFromTargetAddress
// is safe for use during GC where the map might be marked.
Code* result = Code::GetCodeFromTargetAddress(target);
@@ -121,12 +77,10 @@ Code* IC::GetTargetAtAddress(Address address,
}
-void IC::SetTargetAtAddress(Address address,
- Code* target,
- ConstantPoolArray* constant_pool) {
+void IC::SetTargetAtAddress(Address address, Code* target) {
ASSERT(target->is_inline_cache_stub() || target->is_compare_ic_stub());
Heap* heap = target->GetHeap();
- Code* old_target = GetTargetAtAddress(address, constant_pool);
+ Code* old_target = GetTargetAtAddress(address);
#ifdef DEBUG
// STORE_IC and KEYED_STORE_IC use Code::extra_ic_state() to mark
// ICs as strict mode. The strict-ness of the IC must be preserved.
@@ -136,8 +90,7 @@ void IC::SetTargetAtAddress(Address address,
StoreIC::GetStrictMode(target->extra_ic_state()));
}
#endif
- Assembler::set_target_address_at(
- address, constant_pool, target->instruction_start());
+ Assembler::set_target_address_at(address, target->instruction_start());
if (heap->gc_state() == Heap::MARK_COMPACT) {
heap->mark_compact_collector()->RecordCodeTargetPatch(address, target);
} else {
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698