Reviewers: Dmitry Titov, Yury Semikhatsky,

Description:
[Isolates] Always inline Isolate::Current().

Please review this at http://codereview.chromium.org/4046005/show

Affected files:
  M src/isolate.h


Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 3f60d371288b970b46750fc0c54b2df0d123eb2f..e2b3a43418bb97e40e2249431ffd02597b063dc4 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -375,14 +375,13 @@ class Isolate {
   }

   // Returns the isolate inside which the current thread is running.
-  static Isolate* Current() {
-    Isolate* tls_isolate = reinterpret_cast<Isolate*>(
-        Thread::GetThreadLocal(isolate_key_));
-    ASSERT(tls_isolate != NULL);
-    return tls_isolate;
+  INLINE(static Isolate* Current()) {
+    Isolate* isolate = UncheckedCurrent();
+    ASSERT(isolate != NULL);
+    return isolate;
   }

-  static Isolate* UncheckedCurrent() {
+  INLINE(static Isolate* UncheckedCurrent()) {
return reinterpret_cast<Isolate*>(Thread::GetThreadLocal(isolate_key_));
   }



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to