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

Unified Diff: src/stub-cache.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/stub-cache.h ('k') | src/top.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
===================================================================
--- src/stub-cache.cc (revision 4073)
+++ src/stub-cache.cc (working copy)
@@ -435,6 +435,14 @@
argc);
Object* code = map->FindInCodeCache(name, flags);
if (code->IsUndefined()) {
+ if (object->IsJSObject()) {
+ Object* opt =
+ Top::LookupSpecialFunction(JSObject::cast(object), holder, function);
+ if (opt->IsJSFunction()) {
+ check = StubCompiler::JSARRAY_HAS_FAST_ELEMENTS_CHECK;
+ function = JSFunction::cast(opt);
+ }
+ }
// If the function hasn't been compiled yet, we cannot do it now
// because it may cause GC. To avoid this issue, we return an
// internal error which will make sure we do not update any
« no previous file with comments | « src/stub-cache.h ('k') | src/top.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698