| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/arm/lithium-codegen-arm.h" | 5 #include "src/arm/lithium-codegen-arm.h" |
| 6 #include "src/arm/lithium-gap-resolver-arm.h" | 6 #include "src/arm/lithium-gap-resolver-arm.h" |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 5380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5391 | 5391 |
| 5392 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { | 5392 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
| 5393 DCHECK(ToRegister(instr->context()).is(cp)); | 5393 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5394 Label materialized; | 5394 Label materialized; |
| 5395 // Registers will be used as follows: | 5395 // Registers will be used as follows: |
| 5396 // r6 = literals array. | 5396 // r6 = literals array. |
| 5397 // r1 = regexp literal. | 5397 // r1 = regexp literal. |
| 5398 // r0 = regexp literal clone. | 5398 // r0 = regexp literal clone. |
| 5399 // r2-5 are used as temporaries. | 5399 // r2-5 are used as temporaries. |
| 5400 int literal_offset = | 5400 int literal_offset = |
| 5401 FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); | 5401 LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); |
| 5402 __ Move(r6, instr->hydrogen()->literals()); | 5402 __ Move(r6, instr->hydrogen()->literals()); |
| 5403 __ ldr(r1, FieldMemOperand(r6, literal_offset)); | 5403 __ ldr(r1, FieldMemOperand(r6, literal_offset)); |
| 5404 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 5404 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
| 5405 __ cmp(r1, ip); | 5405 __ cmp(r1, ip); |
| 5406 __ b(ne, &materialized); | 5406 __ b(ne, &materialized); |
| 5407 | 5407 |
| 5408 // Create regexp literal using runtime function | 5408 // Create regexp literal using runtime function |
| 5409 // Result will be in r0. | 5409 // Result will be in r0. |
| 5410 __ mov(r5, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5410 __ mov(r5, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); |
| 5411 __ mov(r4, Operand(instr->hydrogen()->pattern())); | 5411 __ mov(r4, Operand(instr->hydrogen()->pattern())); |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5842 __ push(ToRegister(instr->function())); | 5842 __ push(ToRegister(instr->function())); |
| 5843 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5843 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5844 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5844 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5845 } | 5845 } |
| 5846 | 5846 |
| 5847 | 5847 |
| 5848 #undef __ | 5848 #undef __ |
| 5849 | 5849 |
| 5850 } // namespace internal | 5850 } // namespace internal |
| 5851 } // namespace v8 | 5851 } // namespace v8 |
| OLD | NEW |