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/arm64/frames-arm64.h" | 5 #include "src/arm64/frames-arm64.h" |
6 #include "src/arm64/lithium-codegen-arm64.h" | 6 #include "src/arm64/lithium-codegen-arm64.h" |
7 #include "src/arm64/lithium-gap-resolver-arm64.h" | 7 #include "src/arm64/lithium-gap-resolver-arm64.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 5630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5641 | 5641 |
5642 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { | 5642 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
5643 DCHECK(ToRegister(instr->context()).is(cp)); | 5643 DCHECK(ToRegister(instr->context()).is(cp)); |
5644 Label materialized; | 5644 Label materialized; |
5645 // Registers will be used as follows: | 5645 // Registers will be used as follows: |
5646 // x7 = literals array. | 5646 // x7 = literals array. |
5647 // x1 = regexp literal. | 5647 // x1 = regexp literal. |
5648 // x0 = regexp literal clone. | 5648 // x0 = regexp literal clone. |
5649 // x10-x12 are used as temporaries. | 5649 // x10-x12 are used as temporaries. |
5650 int literal_offset = | 5650 int literal_offset = |
5651 FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); | 5651 LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); |
5652 __ LoadObject(x7, instr->hydrogen()->literals()); | 5652 __ LoadObject(x7, instr->hydrogen()->literals()); |
5653 __ Ldr(x1, FieldMemOperand(x7, literal_offset)); | 5653 __ Ldr(x1, FieldMemOperand(x7, literal_offset)); |
5654 __ JumpIfNotRoot(x1, Heap::kUndefinedValueRootIndex, &materialized); | 5654 __ JumpIfNotRoot(x1, Heap::kUndefinedValueRootIndex, &materialized); |
5655 | 5655 |
5656 // Create regexp literal using runtime function | 5656 // Create regexp literal using runtime function |
5657 // Result will be in x0. | 5657 // Result will be in x0. |
5658 __ Mov(x12, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5658 __ Mov(x12, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); |
5659 __ Mov(x11, Operand(instr->hydrogen()->pattern())); | 5659 __ Mov(x11, Operand(instr->hydrogen()->pattern())); |
5660 __ Mov(x10, Operand(instr->hydrogen()->flags())); | 5660 __ Mov(x10, Operand(instr->hydrogen()->flags())); |
5661 __ Push(x7, x12, x11, x10); | 5661 __ Push(x7, x12, x11, x10); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6012 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6012 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6013 __ Push(scope_info); | 6013 __ Push(scope_info); |
6014 __ Push(ToRegister(instr->function())); | 6014 __ Push(ToRegister(instr->function())); |
6015 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6015 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6016 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6016 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6017 } | 6017 } |
6018 | 6018 |
6019 | 6019 |
6020 } // namespace internal | 6020 } // namespace internal |
6021 } // namespace v8 | 6021 } // namespace v8 |
OLD | NEW |