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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1129853002: Removing FLAG_vector_ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment response. Created 5 years, 7 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 | « src/ic/x64/ic-x64.cc ('k') | src/mips/debug-mips.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 1379
1380 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 1380 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1381 // Return address is in ra. 1381 // Return address is in ra.
1382 Label miss; 1382 Label miss;
1383 1383
1384 Register receiver = LoadDescriptor::ReceiverRegister(); 1384 Register receiver = LoadDescriptor::ReceiverRegister();
1385 Register index = LoadDescriptor::NameRegister(); 1385 Register index = LoadDescriptor::NameRegister();
1386 Register scratch = t1; 1386 Register scratch = t1;
1387 Register result = v0; 1387 Register result = v0;
1388 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 1388 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1389 DCHECK(!FLAG_vector_ics || 1389 DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()));
1390 !scratch.is(VectorLoadICDescriptor::VectorRegister()));
1391 1390
1392 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 1391 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1393 &miss, // When not a string. 1392 &miss, // When not a string.
1394 &miss, // When not a number. 1393 &miss, // When not a number.
1395 &miss, // When index out of range. 1394 &miss, // When index out of range.
1396 STRING_INDEX_IS_ARRAY_INDEX, 1395 STRING_INDEX_IS_ARRAY_INDEX,
1397 RECEIVER_IS_STRING); 1396 RECEIVER_IS_STRING);
1398 char_at_generator.GenerateFast(masm); 1397 char_at_generator.GenerateFast(masm);
1399 __ Ret(); 1398 __ Ret();
1400 1399
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 __ DropAndRet(HasArgsInRegisters() ? 0 : 2); 1603 __ DropAndRet(HasArgsInRegisters() ? 0 : 2);
1605 } 1604 }
1606 } 1605 }
1607 1606
1608 1607
1609 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1608 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1610 Label miss; 1609 Label miss;
1611 Register receiver = LoadDescriptor::ReceiverRegister(); 1610 Register receiver = LoadDescriptor::ReceiverRegister();
1612 // Ensure that the vector and slot registers won't be clobbered before 1611 // Ensure that the vector and slot registers won't be clobbered before
1613 // calling the miss handler. 1612 // calling the miss handler.
1614 DCHECK(!FLAG_vector_ics || 1613 DCHECK(!AreAliased(t0, t1, VectorLoadICDescriptor::VectorRegister(),
1615 !AreAliased(t0, t1, VectorLoadICDescriptor::VectorRegister(),
1616 VectorLoadICDescriptor::SlotRegister())); 1614 VectorLoadICDescriptor::SlotRegister()));
1617 1615
1618 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, t0, 1616 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, t0,
1619 t1, &miss); 1617 t1, &miss);
1620 __ bind(&miss); 1618 __ bind(&miss);
1621 PropertyAccessCompiler::TailCallBuiltin( 1619 PropertyAccessCompiler::TailCallBuiltin(
1622 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1620 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1623 } 1621 }
1624 1622
1625 1623
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after
3085 // Index is not a smi. 3083 // Index is not a smi.
3086 __ bind(&index_not_smi_); 3084 __ bind(&index_not_smi_);
3087 // If index is a heap number, try converting it to an integer. 3085 // If index is a heap number, try converting it to an integer.
3088 __ CheckMap(index_, 3086 __ CheckMap(index_,
3089 result_, 3087 result_,
3090 Heap::kHeapNumberMapRootIndex, 3088 Heap::kHeapNumberMapRootIndex,
3091 index_not_number_, 3089 index_not_number_,
3092 DONT_DO_SMI_CHECK); 3090 DONT_DO_SMI_CHECK);
3093 call_helper.BeforeCall(masm); 3091 call_helper.BeforeCall(masm);
3094 // Consumed by runtime conversion function: 3092 // Consumed by runtime conversion function:
3095 if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { 3093 if (embed_mode == PART_OF_IC_HANDLER) {
3096 __ Push(VectorLoadICDescriptor::VectorRegister(), 3094 __ Push(VectorLoadICDescriptor::VectorRegister(),
3097 VectorLoadICDescriptor::SlotRegister(), object_, index_); 3095 VectorLoadICDescriptor::SlotRegister(), object_, index_);
3098 } else { 3096 } else {
3099 __ Push(object_, index_); 3097 __ Push(object_, index_);
3100 } 3098 }
3101 if (index_flags_ == STRING_INDEX_IS_NUMBER) { 3099 if (index_flags_ == STRING_INDEX_IS_NUMBER) {
3102 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); 3100 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
3103 } else { 3101 } else {
3104 DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); 3102 DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
3105 // NumberToSmi discards numbers that are not exact integers. 3103 // NumberToSmi discards numbers that are not exact integers.
3106 __ CallRuntime(Runtime::kNumberToSmi, 1); 3104 __ CallRuntime(Runtime::kNumberToSmi, 1);
3107 } 3105 }
3108 3106
3109 // Save the conversion result before the pop instructions below 3107 // Save the conversion result before the pop instructions below
3110 // have a chance to overwrite it. 3108 // have a chance to overwrite it.
3111 __ Move(index_, v0); 3109 __ Move(index_, v0);
3112 if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { 3110 if (embed_mode == PART_OF_IC_HANDLER) {
3113 __ Pop(VectorLoadICDescriptor::VectorRegister(), 3111 __ Pop(VectorLoadICDescriptor::VectorRegister(),
3114 VectorLoadICDescriptor::SlotRegister(), object_); 3112 VectorLoadICDescriptor::SlotRegister(), object_);
3115 } else { 3113 } else {
3116 __ pop(object_); 3114 __ pop(object_);
3117 } 3115 }
3118 // Reload the instance type. 3116 // Reload the instance type.
3119 __ lw(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); 3117 __ lw(result_, FieldMemOperand(object_, HeapObject::kMapOffset));
3120 __ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); 3118 __ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset));
3121 call_helper.AfterCall(masm); 3119 call_helper.AfterCall(masm);
3122 // If index is still not a smi, it must be out of range. 3120 // If index is still not a smi, it must be out of range.
(...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after
5515 kStackUnwindSpace, kInvalidStackOffset, 5513 kStackUnwindSpace, kInvalidStackOffset,
5516 MemOperand(fp, 6 * kPointerSize), NULL); 5514 MemOperand(fp, 6 * kPointerSize), NULL);
5517 } 5515 }
5518 5516
5519 5517
5520 #undef __ 5518 #undef __
5521 5519
5522 } } // namespace v8::internal 5520 } } // namespace v8::internal
5523 5521
5524 #endif // V8_TARGET_ARCH_MIPS 5522 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/x64/ic-x64.cc ('k') | src/mips/debug-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698