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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 Label materialized; | 1480 Label materialized; |
1481 // Registers will be used as follows: | 1481 // Registers will be used as follows: |
1482 // x5 = materialized value (RegExp literal) | 1482 // x5 = materialized value (RegExp literal) |
1483 // x4 = JS function, literals array | 1483 // x4 = JS function, literals array |
1484 // x3 = literal index | 1484 // x3 = literal index |
1485 // x2 = RegExp pattern | 1485 // x2 = RegExp pattern |
1486 // x1 = RegExp flags | 1486 // x1 = RegExp flags |
1487 // x0 = RegExp literal clone | 1487 // x0 = RegExp literal clone |
1488 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1488 __ Ldr(x10, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1489 __ Ldr(x4, FieldMemOperand(x10, JSFunction::kLiteralsOffset)); | 1489 __ Ldr(x4, FieldMemOperand(x10, JSFunction::kLiteralsOffset)); |
1490 int literal_offset = | 1490 int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); |
1491 FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; | |
1492 __ Ldr(x5, FieldMemOperand(x4, literal_offset)); | 1491 __ Ldr(x5, FieldMemOperand(x4, literal_offset)); |
1493 __ JumpIfNotRoot(x5, Heap::kUndefinedValueRootIndex, &materialized); | 1492 __ JumpIfNotRoot(x5, Heap::kUndefinedValueRootIndex, &materialized); |
1494 | 1493 |
1495 // Create regexp literal using runtime function. | 1494 // Create regexp literal using runtime function. |
1496 // Result will be in x0. | 1495 // Result will be in x0. |
1497 __ Mov(x3, Smi::FromInt(expr->literal_index())); | 1496 __ Mov(x3, Smi::FromInt(expr->literal_index())); |
1498 __ Mov(x2, Operand(expr->pattern())); | 1497 __ Mov(x2, Operand(expr->pattern())); |
1499 __ Mov(x1, Operand(expr->flags())); | 1498 __ Mov(x1, Operand(expr->flags())); |
1500 __ Push(x4, x3, x2, x1); | 1499 __ Push(x4, x3, x2, x1); |
1501 __ CallRuntime(Runtime::kMaterializeRegExpLiteral, 4); | 1500 __ CallRuntime(Runtime::kMaterializeRegExpLiteral, 4); |
(...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5258 } | 5257 } |
5259 | 5258 |
5260 return INTERRUPT; | 5259 return INTERRUPT; |
5261 } | 5260 } |
5262 | 5261 |
5263 | 5262 |
5264 } // namespace internal | 5263 } // namespace internal |
5265 } // namespace v8 | 5264 } // namespace v8 |
5266 | 5265 |
5267 #endif // V8_TARGET_ARCH_ARM64 | 5266 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |