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

Unified Diff: src/top.cc

Issue 573003: ia32: Fuse map and type checks in call ICs for API functions. (Closed)
Patch Set: Rewrote a comment. Created 10 years, 10 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/top.cc
diff --git a/src/top.cc b/src/top.cc
index 027483858864d2fba9592ec67dfb8b7a1b8cdfc1..b9db4be52e73355e7497f35d50c3c2b4bebde129 100644
--- a/src/top.cc
+++ b/src/top.cc
@@ -949,10 +949,15 @@ Handle<Context> Top::GetCallingGlobalContext() {
}
+bool Top::CanHaveSpecialFunctions(JSObject* object) {
+ return object->IsJSArray();
+}
+
+
Object* Top::LookupSpecialFunction(JSObject* receiver,
JSObject* prototype,
JSFunction* function) {
- if (receiver->IsJSArray()) {
+ if (CanHaveSpecialFunctions(receiver)) {
FixedArray* table = context()->global_context()->special_function_table();
for (int index = 0; index < table->length(); index +=3) {
if ((prototype == table->get(index)) &&

Powered by Google App Engine
This is Rietveld 408576698