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

Side by Side Diff: src/ia32/stub-cache-ia32.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/contexts.h ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 Label* miss) { 691 Label* miss) {
692 ASSERT(holder->HasNamedInterceptor()); 692 ASSERT(holder->HasNamedInterceptor());
693 ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined()); 693 ASSERT(!holder->GetNamedInterceptor()->getter()->IsUndefined());
694 694
695 // Check that the receiver isn't a smi. 695 // Check that the receiver isn't a smi.
696 __ test(receiver, Immediate(kSmiTagMask)); 696 __ test(receiver, Immediate(kSmiTagMask));
697 __ j(zero, miss, not_taken); 697 __ j(zero, miss, not_taken);
698 698
699 CallOptimization optimization(lookup); 699 CallOptimization optimization(lookup);
700 700
701 if (optimization.is_constant_call()) { 701 if (optimization.is_constant_call() &&
702 !Top::CanHaveSpecialFunctions(holder)) {
702 CompileCacheable(masm, 703 CompileCacheable(masm,
703 object, 704 object,
704 receiver, 705 receiver,
705 scratch1, 706 scratch1,
706 scratch2, 707 scratch2,
707 holder, 708 holder,
708 lookup, 709 lookup,
709 name, 710 name,
710 optimization, 711 optimization,
711 miss); 712 miss);
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 // Check that the maps starting from the prototype haven't changed. 1326 // Check that the maps starting from the prototype haven't changed.
1326 GenerateLoadGlobalFunctionPrototype(masm(), 1327 GenerateLoadGlobalFunctionPrototype(masm(),
1327 Context::BOOLEAN_FUNCTION_INDEX, 1328 Context::BOOLEAN_FUNCTION_INDEX,
1328 eax); 1329 eax);
1329 CheckPrototypes(JSObject::cast(object->GetPrototype()), eax, holder, 1330 CheckPrototypes(JSObject::cast(object->GetPrototype()), eax, holder,
1330 ebx, edx, name, &miss); 1331 ebx, edx, name, &miss);
1331 } 1332 }
1332 break; 1333 break;
1333 } 1334 }
1334 1335
1336 case JSARRAY_HAS_FAST_ELEMENTS_CHECK:
1337 CheckPrototypes(JSObject::cast(object), edx, holder,
1338 ebx, eax, name, &miss);
1339 // Make sure object->HasFastElements().
1340 // Get the elements array of the object.
1341 __ mov(ebx, FieldOperand(edx, JSObject::kElementsOffset));
1342 // Check that the object is in fast mode (not dictionary).
1343 __ cmp(FieldOperand(ebx, HeapObject::kMapOffset),
1344 Immediate(Factory::fixed_array_map()));
1345 __ j(not_equal, &miss, not_taken);
1346 break;
1347
1335 default: 1348 default:
1336 UNREACHABLE(); 1349 UNREACHABLE();
1337 } 1350 }
1338 1351
1339 if (depth != kInvalidProtoDepth) { 1352 if (depth != kInvalidProtoDepth) {
1340 GenerateFastApiCall(masm(), optimization, argc); 1353 GenerateFastApiCall(masm(), optimization, argc);
1341 } else { 1354 } else {
1342 __ InvokeFunction(function, arguments(), JUMP_FUNCTION); 1355 __ InvokeFunction(function, arguments(), JUMP_FUNCTION);
1343 } 1356 }
1344 1357
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 2199 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
2187 2200
2188 // Return the generated code. 2201 // Return the generated code.
2189 return GetCode(); 2202 return GetCode();
2190 } 2203 }
2191 2204
2192 2205
2193 #undef __ 2206 #undef __
2194 2207
2195 } } // namespace v8::internal 2208 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698