Revision: 17504
Author: [email protected]
Date: Tue Nov 5 17:45:42 2013 UTC
Log: Remove unused IdempotentPointerToHandleCodeTrampoline
[email protected]
Review URL: https://codereview.chromium.org/59973006
http://code.google.com/p/v8/source/detail?r=17504
Modified:
/branches/bleeding_edge/src/factory.h
=======================================
--- /branches/bleeding_edge/src/factory.h Tue Nov 5 15:36:15 2013 UTC
+++ /branches/bleeding_edge/src/factory.h Tue Nov 5 17:45:42 2013 UTC
@@ -586,101 +586,6 @@
return NewNumber(static_cast<double>(value), pretenure);
}
}
-
-
-// Used to "safely" transition from pointer-based runtime code to
Handle-based
-// runtime code. When a GC happens during the called Handle-based code, a
-// failure object is returned to the pointer-based code to cause it abort
and
-// re-trigger a gc of it's own. Since this double-gc will cause the
Handle-based
-// code to be called twice, it must be idempotent.
-class IdempotentPointerToHandleCodeTrampoline {
- public:
- explicit IdempotentPointerToHandleCodeTrampoline(Isolate* isolate)
- : isolate_(isolate) {}
-
- template<typename R>
- MUST_USE_RESULT MaybeObject* Call(R (*function)()) {
- int collections = isolate_->heap()->gc_count();
- (*function)();
- return (collections == isolate_->heap()->gc_count())
- ? isolate_->heap()->true_value()
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- template<typename R>
- MUST_USE_RESULT MaybeObject* CallWithReturnValue(R (*function)()) {
- int collections = isolate_->heap()->gc_count();
- Object* result = (*function)();
- return (collections == isolate_->heap()->gc_count())
- ? result
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- template<typename R, typename P1>
- MUST_USE_RESULT MaybeObject* Call(R (*function)(P1), P1 p1) {
- int collections = isolate_->heap()->gc_count();
- (*function)(p1);
- return (collections == isolate_->heap()->gc_count())
- ? isolate_->heap()->true_value()
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- template<typename R, typename P1>
- MUST_USE_RESULT MaybeObject* CallWithReturnValue(
- R (*function)(P1),
- P1 p1) {
- int collections = isolate_->heap()->gc_count();
- Object* result = (*function)(p1);
- return (collections == isolate_->heap()->gc_count())
- ? result
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- template<typename R, typename P1, typename P2>
- MUST_USE_RESULT MaybeObject* Call(
- R (*function)(P1, P2),
- P1 p1,
- P2 p2) {
- int collections = isolate_->heap()->gc_count();
- (*function)(p1, p2);
- return (collections == isolate_->heap()->gc_count())
- ? isolate_->heap()->true_value()
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- template<typename R, typename P1, typename P2>
- MUST_USE_RESULT MaybeObject* CallWithReturnValue(
- R (*function)(P1, P2),
- P1 p1,
- P2 p2) {
- int collections = isolate_->heap()->gc_count();
- Object* result = (*function)(p1, p2);
- return (collections == isolate_->heap()->gc_count())
- ? result
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- template<typename R, typename P1, typename P2, typename P3, typename P4,
- typename P5, typename P6, typename P7>
- MUST_USE_RESULT MaybeObject* CallWithReturnValue(
- R (*function)(P1, P2, P3, P4, P5, P6, P7),
- P1 p1,
- P2 p2,
- P3 p3,
- P4 p4,
- P5 p5,
- P6 p6,
- P7 p7) {
- int collections = isolate_->heap()->gc_count();
- Handle<Object> result = (*function)(p1, p2, p3, p4, p5, p6, p7);
- return (collections == isolate_->heap()->gc_count())
- ? *result
- : reinterpret_cast<MaybeObject*>(Failure::RetryAfterGC());
- }
-
- private:
- Isolate* isolate_;
-};
} } // namespace v8::internal
--
--
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.