OLD | NEW |
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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 | 1415 |
1416 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, | 1416 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, |
1417 x11, &miss); | 1417 x11, &miss); |
1418 | 1418 |
1419 __ Bind(&miss); | 1419 __ Bind(&miss); |
1420 PropertyAccessCompiler::TailCallBuiltin( | 1420 PropertyAccessCompiler::TailCallBuiltin( |
1421 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 1421 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
1422 } | 1422 } |
1423 | 1423 |
1424 | 1424 |
| 1425 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
| 1426 // Return address is in lr. |
| 1427 Label miss; |
| 1428 |
| 1429 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 1430 Register index = LoadDescriptor::NameRegister(); |
| 1431 Register result = x0; |
| 1432 Register scratch = x3; |
| 1433 DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
| 1434 |
| 1435 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
| 1436 &miss, // When not a string. |
| 1437 &miss, // When not a number. |
| 1438 &miss, // When index out of range. |
| 1439 STRING_INDEX_IS_ARRAY_INDEX, |
| 1440 RECEIVER_IS_STRING); |
| 1441 char_at_generator.GenerateFast(masm); |
| 1442 __ Ret(); |
| 1443 |
| 1444 StubRuntimeCallHelper call_helper; |
| 1445 char_at_generator.GenerateSlow(masm, call_helper); |
| 1446 |
| 1447 __ Bind(&miss); |
| 1448 PropertyAccessCompiler::TailCallBuiltin( |
| 1449 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
| 1450 } |
| 1451 |
| 1452 |
1425 void InstanceofStub::Generate(MacroAssembler* masm) { | 1453 void InstanceofStub::Generate(MacroAssembler* masm) { |
1426 // Stack on entry: | 1454 // Stack on entry: |
1427 // jssp[0]: function. | 1455 // jssp[0]: function. |
1428 // jssp[8]: object. | 1456 // jssp[8]: object. |
1429 // | 1457 // |
1430 // Returns result in x0. Zero indicates instanceof, smi 1 indicates not | 1458 // Returns result in x0. Zero indicates instanceof, smi 1 indicates not |
1431 // instanceof. | 1459 // instanceof. |
1432 | 1460 |
1433 Register result = x0; | 1461 Register result = x0; |
1434 Register function = right(); | 1462 Register function = right(); |
(...skipping 3625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5060 MemOperand(fp, 6 * kPointerSize), | 5088 MemOperand(fp, 6 * kPointerSize), |
5061 NULL); | 5089 NULL); |
5062 } | 5090 } |
5063 | 5091 |
5064 | 5092 |
5065 #undef __ | 5093 #undef __ |
5066 | 5094 |
5067 } } // namespace v8::internal | 5095 } } // namespace v8::internal |
5068 | 5096 |
5069 #endif // V8_TARGET_ARCH_ARM64 | 5097 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |