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

Side by Side Diff: src/arm64/code-stubs-arm64.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/arm/lithium-codegen-arm.cc ('k') | src/arm64/debug-arm64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 // register which we have just restored. 1442 // register which we have just restored.
1443 __ Ret(); 1443 __ Ret();
1444 } 1444 }
1445 1445
1446 1446
1447 void FunctionPrototypeStub::Generate(MacroAssembler* masm) { 1447 void FunctionPrototypeStub::Generate(MacroAssembler* masm) {
1448 Label miss; 1448 Label miss;
1449 Register receiver = LoadDescriptor::ReceiverRegister(); 1449 Register receiver = LoadDescriptor::ReceiverRegister();
1450 // Ensure that the vector and slot registers won't be clobbered before 1450 // Ensure that the vector and slot registers won't be clobbered before
1451 // calling the miss handler. 1451 // calling the miss handler.
1452 DCHECK(!FLAG_vector_ics || 1452 DCHECK(!AreAliased(x10, x11, VectorLoadICDescriptor::VectorRegister(),
1453 !AreAliased(x10, x11, VectorLoadICDescriptor::VectorRegister(),
1454 VectorLoadICDescriptor::SlotRegister())); 1453 VectorLoadICDescriptor::SlotRegister()));
1455 1454
1456 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, 1455 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10,
1457 x11, &miss); 1456 x11, &miss);
1458 1457
1459 __ Bind(&miss); 1458 __ Bind(&miss);
1460 PropertyAccessCompiler::TailCallBuiltin( 1459 PropertyAccessCompiler::TailCallBuiltin(
1461 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 1460 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
1462 } 1461 }
1463 1462
1464 1463
1465 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { 1464 void LoadIndexedStringStub::Generate(MacroAssembler* masm) {
1466 // Return address is in lr. 1465 // Return address is in lr.
1467 Label miss; 1466 Label miss;
1468 1467
1469 Register receiver = LoadDescriptor::ReceiverRegister(); 1468 Register receiver = LoadDescriptor::ReceiverRegister();
1470 Register index = LoadDescriptor::NameRegister(); 1469 Register index = LoadDescriptor::NameRegister();
1471 Register result = x0; 1470 Register result = x0;
1472 Register scratch = x10; 1471 Register scratch = x10;
1473 DCHECK(!scratch.is(receiver) && !scratch.is(index)); 1472 DCHECK(!scratch.is(receiver) && !scratch.is(index));
1474 DCHECK(!FLAG_vector_ics || 1473 DCHECK(!scratch.is(VectorLoadICDescriptor::VectorRegister()) &&
1475 (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && 1474 result.is(VectorLoadICDescriptor::SlotRegister()));
1476 result.is(VectorLoadICDescriptor::SlotRegister())));
1477 1475
1478 // StringCharAtGenerator doesn't use the result register until it's passed 1476 // StringCharAtGenerator doesn't use the result register until it's passed
1479 // the different miss possibilities. If it did, we would have a conflict 1477 // the different miss possibilities. If it did, we would have a conflict
1480 // when FLAG_vector_ics is true. 1478 // when FLAG_vector_ics is true.
1481 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, 1479 StringCharAtGenerator char_at_generator(receiver, index, scratch, result,
1482 &miss, // When not a string. 1480 &miss, // When not a string.
1483 &miss, // When not a number. 1481 &miss, // When not a number.
1484 &miss, // When index out of range. 1482 &miss, // When index out of range.
1485 STRING_INDEX_IS_ARRAY_INDEX, 1483 STRING_INDEX_IS_ARRAY_INDEX,
1486 RECEIVER_IS_STRING); 1484 RECEIVER_IS_STRING);
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
3347 3345
3348 void StringCharCodeAtGenerator::GenerateSlow( 3346 void StringCharCodeAtGenerator::GenerateSlow(
3349 MacroAssembler* masm, EmbedMode embed_mode, 3347 MacroAssembler* masm, EmbedMode embed_mode,
3350 const RuntimeCallHelper& call_helper) { 3348 const RuntimeCallHelper& call_helper) {
3351 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); 3349 __ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase);
3352 3350
3353 __ Bind(&index_not_smi_); 3351 __ Bind(&index_not_smi_);
3354 // If index is a heap number, try converting it to an integer. 3352 // If index is a heap number, try converting it to an integer.
3355 __ JumpIfNotHeapNumber(index_, index_not_number_); 3353 __ JumpIfNotHeapNumber(index_, index_not_number_);
3356 call_helper.BeforeCall(masm); 3354 call_helper.BeforeCall(masm);
3357 if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { 3355 if (embed_mode == PART_OF_IC_HANDLER) {
3358 __ Push(VectorLoadICDescriptor::VectorRegister(), 3356 __ Push(VectorLoadICDescriptor::VectorRegister(),
3359 VectorLoadICDescriptor::SlotRegister(), object_, index_); 3357 VectorLoadICDescriptor::SlotRegister(), object_, index_);
3360 } else { 3358 } else {
3361 // Save object_ on the stack and pass index_ as argument for runtime call. 3359 // Save object_ on the stack and pass index_ as argument for runtime call.
3362 __ Push(object_, index_); 3360 __ Push(object_, index_);
3363 } 3361 }
3364 if (index_flags_ == STRING_INDEX_IS_NUMBER) { 3362 if (index_flags_ == STRING_INDEX_IS_NUMBER) {
3365 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); 3363 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
3366 } else { 3364 } else {
3367 DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); 3365 DCHECK(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
3368 // NumberToSmi discards numbers that are not exact integers. 3366 // NumberToSmi discards numbers that are not exact integers.
3369 __ CallRuntime(Runtime::kNumberToSmi, 1); 3367 __ CallRuntime(Runtime::kNumberToSmi, 1);
3370 } 3368 }
3371 // Save the conversion result before the pop instructions below 3369 // Save the conversion result before the pop instructions below
3372 // have a chance to overwrite it. 3370 // have a chance to overwrite it.
3373 __ Mov(index_, x0); 3371 __ Mov(index_, x0);
3374 if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { 3372 if (embed_mode == PART_OF_IC_HANDLER) {
3375 __ Pop(object_, VectorLoadICDescriptor::SlotRegister(), 3373 __ Pop(object_, VectorLoadICDescriptor::SlotRegister(),
3376 VectorLoadICDescriptor::VectorRegister()); 3374 VectorLoadICDescriptor::VectorRegister());
3377 } else { 3375 } else {
3378 __ Pop(object_); 3376 __ Pop(object_);
3379 } 3377 }
3380 // Reload the instance type. 3378 // Reload the instance type.
3381 __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); 3379 __ Ldr(result_, FieldMemOperand(object_, HeapObject::kMapOffset));
3382 __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); 3380 __ Ldrb(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset));
3383 call_helper.AfterCall(masm); 3381 call_helper.AfterCall(masm);
3384 3382
(...skipping 2392 matching lines...) Expand 10 before | Expand all | Expand 10 after
5777 kStackUnwindSpace, NULL, spill_offset, 5775 kStackUnwindSpace, NULL, spill_offset,
5778 MemOperand(fp, 6 * kPointerSize), NULL); 5776 MemOperand(fp, 6 * kPointerSize), NULL);
5779 } 5777 }
5780 5778
5781 5779
5782 #undef __ 5780 #undef __
5783 5781
5784 } } // namespace v8::internal 5782 } } // namespace v8::internal
5785 5783
5786 #endif // V8_TARGET_ARCH_ARM64 5784 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm64/debug-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698