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

Side by Side Diff: src/ppc/builtins-ppc.cc

Issue 1196253003: PPC: Built-in apply() performance benefits from an uninitialized IC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_PPC 7 #if V8_TARGET_ARCH_PPC
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 __ InvokeCode(ip, expected, expected, JUMP_FUNCTION, NullCallWrapper()); 1420 __ InvokeCode(ip, expected, expected, JUMP_FUNCTION, NullCallWrapper());
1421 } 1421 }
1422 1422
1423 1423
1424 static void Generate_PushAppliedArguments(MacroAssembler* masm, 1424 static void Generate_PushAppliedArguments(MacroAssembler* masm,
1425 const int argumentsOffset, 1425 const int argumentsOffset,
1426 const int indexOffset, 1426 const int indexOffset,
1427 const int limitOffset) { 1427 const int limitOffset) {
1428 Register receiver = LoadDescriptor::ReceiverRegister(); 1428 Register receiver = LoadDescriptor::ReceiverRegister();
1429 Register key = LoadDescriptor::NameRegister(); 1429 Register key = LoadDescriptor::NameRegister();
1430 Register slot = LoadDescriptor::SlotRegister();
1431 Register vector = LoadWithVectorDescriptor::VectorRegister();
1430 1432
1431 // Copy all arguments from the array to the stack. 1433 // Copy all arguments from the array to the stack.
1432 Label entry, loop; 1434 Label entry, loop;
1433 __ LoadP(key, MemOperand(fp, indexOffset)); 1435 __ LoadP(key, MemOperand(fp, indexOffset));
1434 __ b(&entry); 1436 __ b(&entry);
1435 __ bind(&loop); 1437 __ bind(&loop);
1436 __ LoadP(receiver, MemOperand(fp, argumentsOffset)); 1438 __ LoadP(receiver, MemOperand(fp, argumentsOffset));
1437 1439
1438 // Use inline caching to speed up access to arguments. 1440 // Use inline caching to speed up access to arguments.
1439 Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Megamorphic(); 1441 FeedbackVectorSpec spec(0, Code::KEYED_LOAD_IC);
1442 Handle<TypeFeedbackVector> feedback_vector =
1443 masm->isolate()->factory()->NewTypeFeedbackVector(&spec);
1444 int index = feedback_vector->GetIndex(FeedbackVectorICSlot(0));
1445 __ LoadSmiLiteral(slot, Smi::FromInt(index));
1446 __ Move(vector, feedback_vector);
1447 Handle<Code> ic = KeyedLoadICStub(masm->isolate()).GetCode();
1440 __ Call(ic, RelocInfo::CODE_TARGET); 1448 __ Call(ic, RelocInfo::CODE_TARGET);
1441 1449
1442 // Push the nth argument. 1450 // Push the nth argument.
1443 __ push(r3); 1451 __ push(r3);
1444 1452
1445 // Update the index on the stack and in register key. 1453 // Update the index on the stack and in register key.
1446 __ LoadP(key, MemOperand(fp, indexOffset)); 1454 __ LoadP(key, MemOperand(fp, indexOffset));
1447 __ AddSmiLiteral(key, key, Smi::FromInt(1), r0); 1455 __ AddSmiLiteral(key, key, Smi::FromInt(1), r0);
1448 __ StoreP(key, MemOperand(fp, indexOffset)); 1456 __ StoreP(key, MemOperand(fp, indexOffset));
1449 1457
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 __ bkpt(0); 1880 __ bkpt(0);
1873 } 1881 }
1874 } 1882 }
1875 1883
1876 1884
1877 #undef __ 1885 #undef __
1878 } // namespace internal 1886 } // namespace internal
1879 } // namespace v8 1887 } // namespace v8
1880 1888
1881 #endif // V8_TARGET_ARCH_PPC 1889 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698