Index: src/ic/ic-inl.h |
diff --git a/src/ic/ic-inl.h b/src/ic/ic-inl.h |
index 45dd3476cfa7e5d1919a91160dff1804eca7324f..646d2fdc9b6650dcb277800d69725159602e4696 100644 |
--- a/src/ic/ic-inl.h |
+++ b/src/ic/ic-inl.h |
@@ -48,32 +48,45 @@ Address IC::address() const { |
} |
-ConstantPoolArray* IC::constant_pool() const { |
- if (!FLAG_enable_ool_constant_pool) { |
+Address IC::constant_pool() const { |
+ if (!FLAG_enable_ool_constant_pool && !FLAG_enable_embedded_constant_pool) { |
return NULL; |
} else { |
- Handle<ConstantPoolArray> result = raw_constant_pool_; |
+ Address constant_pool = raw_constant_pool(); |
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; |
+ if (!debug->has_break_points()) return constant_pool; |
// 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()))) { |
+ Assembler::target_address_at(target, 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(); |
} |
- return *result; |
+ return constant_pool; |
} |
} |
-ConstantPoolArray* IC::raw_constant_pool() const { |
+void IC::set_raw_constant_pool(Address* constant_pool, Isolate* isolate) { |
+ DCHECK(FLAG_enable_ool_constant_pool || FLAG_enable_embedded_constant_pool); |
if (FLAG_enable_ool_constant_pool) { |
+ raw_constant_pool_handle_ = handle( |
+ ConstantPoolArray::cast(reinterpret_cast<Object*>(*constant_pool)), |
+ isolate); |
+ } else if (FLAG_enable_embedded_constant_pool) { |
+ raw_constant_pool_ = constant_pool; |
+ } |
+} |
+ |
+Address IC::raw_constant_pool() const { |
+ if (FLAG_enable_ool_constant_pool) { |
+ return reinterpret_cast<Address>(*raw_constant_pool_handle_); |
+ } else if (FLAG_enable_embedded_constant_pool) { |
return *raw_constant_pool_; |
} else { |
return NULL; |
@@ -81,8 +94,7 @@ ConstantPoolArray* IC::raw_constant_pool() const { |
} |
-Code* IC::GetTargetAtAddress(Address address, |
- ConstantPoolArray* constant_pool) { |
+Code* IC::GetTargetAtAddress(Address address, Address constant_pool) { |
// Get the target address of the IC. |
Address target = Assembler::target_address_at(address, constant_pool); |
// Convert target address to the code object. Code::GetCodeFromTargetAddress |
@@ -94,7 +106,7 @@ Code* IC::GetTargetAtAddress(Address address, |
void IC::SetTargetAtAddress(Address address, Code* target, |
- ConstantPoolArray* constant_pool) { |
+ Address constant_pool) { |
DCHECK(target->is_inline_cache_stub() || target->is_compare_ic_stub()); |
// Don't use this for load_ics when --vector-ics is turned on. |