OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/base/bits.h" | 5 #include "src/base/bits.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/hydrogen-osr.h" | 8 #include "src/hydrogen-osr.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 5677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5688 | 5688 |
5689 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { | 5689 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
5690 DCHECK(ToRegister(instr->context()).is(cp)); | 5690 DCHECK(ToRegister(instr->context()).is(cp)); |
5691 Label materialized; | 5691 Label materialized; |
5692 // Registers will be used as follows: | 5692 // Registers will be used as follows: |
5693 // r10 = literals array. | 5693 // r10 = literals array. |
5694 // r4 = regexp literal. | 5694 // r4 = regexp literal. |
5695 // r3 = regexp literal clone. | 5695 // r3 = regexp literal clone. |
5696 // r5 and r7-r9 are used as temporaries. | 5696 // r5 and r7-r9 are used as temporaries. |
5697 int literal_offset = | 5697 int literal_offset = |
5698 FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); | 5698 LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); |
5699 __ Move(r10, instr->hydrogen()->literals()); | 5699 __ Move(r10, instr->hydrogen()->literals()); |
5700 __ LoadP(r4, FieldMemOperand(r10, literal_offset)); | 5700 __ LoadP(r4, FieldMemOperand(r10, literal_offset)); |
5701 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 5701 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
5702 __ cmp(r4, ip); | 5702 __ cmp(r4, ip); |
5703 __ bne(&materialized); | 5703 __ bne(&materialized); |
5704 | 5704 |
5705 // Create regexp literal using runtime function | 5705 // Create regexp literal using runtime function |
5706 // Result will be in r3. | 5706 // Result will be in r3. |
5707 __ LoadSmiLiteral(r9, Smi::FromInt(instr->hydrogen()->literal_index())); | 5707 __ LoadSmiLiteral(r9, Smi::FromInt(instr->hydrogen()->literal_index())); |
5708 __ mov(r8, Operand(instr->hydrogen()->pattern())); | 5708 __ mov(r8, Operand(instr->hydrogen()->pattern())); |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6129 __ Push(scope_info); | 6129 __ Push(scope_info); |
6130 __ push(ToRegister(instr->function())); | 6130 __ push(ToRegister(instr->function())); |
6131 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6131 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6132 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6132 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6133 } | 6133 } |
6134 | 6134 |
6135 | 6135 |
6136 #undef __ | 6136 #undef __ |
6137 } // namespace internal | 6137 } // namespace internal |
6138 } // namespace v8 | 6138 } // namespace v8 |
OLD | NEW |