Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Unified Diff: src/runtime/runtime-internal.cc

Issue 1048063002: Added %_Likely/%_Unlikely intrinsics (special cases of GCC's __builin_expect). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 973c204435f7ca24fa17541c1ab6e8219f6eaacb..0e538696fcc1ba69f5dbd660982d1f6bb023fcbd 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -330,5 +330,16 @@ RUNTIME_FUNCTION(Runtime_IncrementStatsCounter) {
}
return isolate->heap()->undefined_value();
}
+
+
+RUNTIME_FUNCTION(Runtime_Likely) {
+ DCHECK(args.length() == 1);
+ return args[0];
+}
+
+
+RUNTIME_FUNCTION(Runtime_Unlikely) {
+ return __RT_impl_Runtime_Likely(args, isolate);
+}
}
} // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698