| 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/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
| 7 #include "src/cpu-profiler.h" | 7 #include "src/cpu-profiler.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 5581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5592 | 5592 |
| 5593 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { | 5593 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
| 5594 DCHECK(ToRegister(instr->context()).is(cp)); | 5594 DCHECK(ToRegister(instr->context()).is(cp)); |
| 5595 Label materialized; | 5595 Label materialized; |
| 5596 // Registers will be used as follows: | 5596 // Registers will be used as follows: |
| 5597 // a7 = literals array. | 5597 // a7 = literals array. |
| 5598 // a1 = regexp literal. | 5598 // a1 = regexp literal. |
| 5599 // a0 = regexp literal clone. | 5599 // a0 = regexp literal clone. |
| 5600 // a2 and a4-a6 are used as temporaries. | 5600 // a2 and a4-a6 are used as temporaries. |
| 5601 int literal_offset = | 5601 int literal_offset = |
| 5602 FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); | 5602 LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); |
| 5603 __ li(a7, instr->hydrogen()->literals()); | 5603 __ li(a7, instr->hydrogen()->literals()); |
| 5604 __ ld(a1, FieldMemOperand(a7, literal_offset)); | 5604 __ ld(a1, FieldMemOperand(a7, literal_offset)); |
| 5605 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); | 5605 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); |
| 5606 __ Branch(&materialized, ne, a1, Operand(at)); | 5606 __ Branch(&materialized, ne, a1, Operand(at)); |
| 5607 | 5607 |
| 5608 // Create regexp literal using runtime function | 5608 // Create regexp literal using runtime function |
| 5609 // Result will be in v0. | 5609 // Result will be in v0. |
| 5610 __ li(a6, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5610 __ li(a6, Operand(Smi::FromInt(instr->hydrogen()->literal_index()))); |
| 5611 __ li(a5, Operand(instr->hydrogen()->pattern())); | 5611 __ li(a5, Operand(instr->hydrogen()->pattern())); |
| 5612 __ li(a4, Operand(instr->hydrogen()->flags())); | 5612 __ li(a4, Operand(instr->hydrogen()->flags())); |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6085 __ Push(at, ToRegister(instr->function())); | 6085 __ Push(at, ToRegister(instr->function())); |
| 6086 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6086 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6087 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6087 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6088 } | 6088 } |
| 6089 | 6089 |
| 6090 | 6090 |
| 6091 #undef __ | 6091 #undef __ |
| 6092 | 6092 |
| 6093 } // namespace internal | 6093 } // namespace internal |
| 6094 } // namespace v8 | 6094 } // namespace v8 |
| OLD | NEW |