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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
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/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 5875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5886 | 5886 |
5887 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { | 5887 void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
5888 DCHECK(ToRegister(instr->context()).is(esi)); | 5888 DCHECK(ToRegister(instr->context()).is(esi)); |
5889 Label materialized; | 5889 Label materialized; |
5890 // Registers will be used as follows: | 5890 // Registers will be used as follows: |
5891 // ecx = literals array. | 5891 // ecx = literals array. |
5892 // ebx = regexp literal. | 5892 // ebx = regexp literal. |
5893 // eax = regexp literal clone. | 5893 // eax = regexp literal clone. |
5894 // esi = context. | 5894 // esi = context. |
5895 int literal_offset = | 5895 int literal_offset = |
5896 FixedArray::OffsetOfElementAt(instr->hydrogen()->literal_index()); | 5896 LiteralsArray::OffsetOfLiteralAt(instr->hydrogen()->literal_index()); |
5897 __ LoadHeapObject(ecx, instr->hydrogen()->literals()); | 5897 __ LoadHeapObject(ecx, instr->hydrogen()->literals()); |
5898 __ mov(ebx, FieldOperand(ecx, literal_offset)); | 5898 __ mov(ebx, FieldOperand(ecx, literal_offset)); |
5899 __ cmp(ebx, factory()->undefined_value()); | 5899 __ cmp(ebx, factory()->undefined_value()); |
5900 __ j(not_equal, &materialized, Label::kNear); | 5900 __ j(not_equal, &materialized, Label::kNear); |
5901 | 5901 |
5902 // Create regexp literal using runtime function | 5902 // Create regexp literal using runtime function |
5903 // Result will be in eax. | 5903 // Result will be in eax. |
5904 __ push(ecx); | 5904 __ push(ecx); |
5905 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); | 5905 __ push(Immediate(Smi::FromInt(instr->hydrogen()->literal_index()))); |
5906 __ push(Immediate(instr->hydrogen()->pattern())); | 5906 __ push(Immediate(instr->hydrogen()->pattern())); |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6338 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6338 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6339 } | 6339 } |
6340 | 6340 |
6341 | 6341 |
6342 #undef __ | 6342 #undef __ |
6343 | 6343 |
6344 } // namespace internal | 6344 } // namespace internal |
6345 } // namespace v8 | 6345 } // namespace v8 |
6346 | 6346 |
6347 #endif // V8_TARGET_ARCH_X87 | 6347 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |