Revision: 14321
Author: [email protected]
Date: Thu Apr 18 01:14:59 2013
Log: Handle retry-after-gc failures within KeyedLoadIC::Load and
KeyedStoreIC::Store.
Returning retry-after-gc failure from these functions causes them to be
re-executed after ic state change, which breaks stub computation
assumptions.
[email protected]
BUG=222301
TEST=mjsunit/array-bounds-check-removal.js --gc_interval=10 in x64.debug
Review URL: https://chromiumcodereview.appspot.com/14251014
http://code.google.com/p/v8/source/detail?r=14321
Modified:
/branches/bleeding_edge/src/heap-inl.h
/branches/bleeding_edge/src/ic.cc
/branches/bleeding_edge/src/runtime.cc
/branches/bleeding_edge/src/runtime.h
=======================================
--- /branches/bleeding_edge/src/heap-inl.h Tue Apr 16 05:30:51 2013
+++ /branches/bleeding_edge/src/heap-inl.h Thu Apr 18 01:14:59 2013
@@ -623,6 +623,13 @@
CALL_AND_RETRY(ISOLATE, FUNCTION_CALL, return, return)
+#define CALL_HEAP_FUNCTION_PASS_EXCEPTION(ISOLATE, FUNCTION_CALL) \
+ CALL_AND_RETRY(ISOLATE, \
+ FUNCTION_CALL, \
+ return __object__, \
+ return __maybe_object__)
+
+
#ifdef DEBUG
inline bool Heap::allow_allocation(bool new_state) {
=======================================
--- /branches/bleeding_edge/src/ic.cc Thu Apr 11 02:48:03 2013
+++ /branches/bleeding_edge/src/ic.cc Thu Apr 18 01:14:59 2013
@@ -1384,7 +1384,7 @@
}
- return Runtime::GetObjectProperty(isolate(), object, key);
+ return Runtime::GetObjectPropertyOrFail(isolate(), object, key);
}
@@ -1972,7 +1972,7 @@
TRACE_IC("KeyedStoreIC", key, state, target());
}
- return Runtime::SetObjectProperty(
+ return Runtime::SetObjectPropertyOrFail(
isolate(), object , key, value, NONE, strict_mode);
}
=======================================
--- /branches/bleeding_edge/src/runtime.cc Wed Apr 17 09:37:11 2013
+++ /branches/bleeding_edge/src/runtime.cc Thu Apr 18 01:14:59 2013
@@ -4094,6 +4094,13 @@
return isolate->heap()->ToBoolean(object->HasProperty(*name));
}
+MaybeObject* Runtime::GetObjectPropertyOrFail(
+ Isolate* isolate,
+ Handle<Object> object,
+ Handle<Object> key) {
+ CALL_HEAP_FUNCTION_PASS_EXCEPTION(isolate,
+ GetObjectProperty(isolate, object, key));
+}
MaybeObject* Runtime::GetObjectProperty(Isolate* isolate,
Handle<Object> object,
@@ -4376,6 +4383,18 @@
}
return isolate->heap()->undefined_value();
}
+
+
+MaybeObject* Runtime::SetObjectPropertyOrFail(
+ Isolate* isolate,
+ Handle<Object> object,
+ Handle<Object> key,
+ Handle<Object> value,
+ PropertyAttributes attr,
+ StrictModeFlag strict_mode) {
+ CALL_HEAP_FUNCTION_PASS_EXCEPTION(isolate,
+ SetObjectProperty(isolate, object, key, value, attr, strict_mode));
+}
MaybeObject* Runtime::SetObjectProperty(Isolate* isolate,
=======================================
--- /branches/bleeding_edge/src/runtime.h Tue Apr 16 07:16:30 2013
+++ /branches/bleeding_edge/src/runtime.h Thu Apr 18 01:14:59 2013
@@ -702,6 +702,14 @@
PropertyAttributes attr,
StrictModeFlag strict_mode);
+ MUST_USE_RESULT static MaybeObject* SetObjectPropertyOrFail(
+ Isolate* isolate,
+ Handle<Object> object,
+ Handle<Object> key,
+ Handle<Object> value,
+ PropertyAttributes attr,
+ StrictModeFlag strict_mode);
+
MUST_USE_RESULT static MaybeObject* ForceSetObjectProperty(
Isolate* isolate,
Handle<JSObject> object,
@@ -725,6 +733,11 @@
Handle<Object> object,
Handle<Object> key);
+ MUST_USE_RESULT static MaybeObject* GetObjectPropertyOrFail(
+ Isolate* isolate,
+ Handle<Object> object,
+ Handle<Object> key);
+
// Helper functions used stubs.
static void PerformGC(Object* result);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.