vendor/v8/src/ic-inl.h in mustang-0.0.1 vs vendor/v8/src/ic-inl.h in mustang-0.1.0
- old
+ new
@@ -39,17 +39,18 @@
Address IC::address() {
// Get the address of the call.
Address result = pc() - Assembler::kCallTargetAddressOffset;
#ifdef ENABLE_DEBUGGER_SUPPORT
+ Debug* debug = Isolate::Current()->debug();
// First check if any break points are active if not just return the address
// of the call.
- if (!Debug::has_break_points()) return result;
+ 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.
- if (Debug::IsDebugBreak(Assembler::target_address_at(result))) {
+ 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.
return OriginalCodeAddress();
@@ -74,9 +75,18 @@
}
void IC::SetTargetAtAddress(Address address, Code* target) {
ASSERT(target->is_inline_cache_stub() || target->is_compare_ic_stub());
+#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.
+ Code* old_target = GetTargetAtAddress(address);
+ if (old_target->kind() == Code::STORE_IC ||
+ old_target->kind() == Code::KEYED_STORE_IC) {
+ ASSERT(old_target->extra_ic_state() == target->extra_ic_state());
+ }
+#endif
Assembler::set_target_address_at(address, target->instruction_start());
}
InlineCacheHolderFlag IC::GetCodeCacheForObject(Object* object,