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

Unified Diff: src/top.cc

Issue 819001: Revert change to always call builtins for Array functions.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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
« no previous file with comments | « src/top.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.cc
===================================================================
--- src/top.cc (revision 4073)
+++ src/top.cc (working copy)
@@ -950,6 +950,27 @@
}
+bool Top::CanHaveSpecialFunctions(JSObject* object) {
+ return object->IsJSArray();
+}
+
+
+Object* Top::LookupSpecialFunction(JSObject* receiver,
+ JSObject* prototype,
+ JSFunction* function) {
+ 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)) &&
+ (function == table->get(index+1))) {
+ return table->get(index+2);
+ }
+ }
+ }
+ return Heap::undefined_value();
+}
+
+
char* Top::ArchiveThread(char* to) {
memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(thread_local_));
InitializeThreadLocal();
« no previous file with comments | « src/top.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698