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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 Label materialized; | 1462 Label materialized; |
1463 // Registers will be used as follows: | 1463 // Registers will be used as follows: |
1464 // r8 = materialized value (RegExp literal) | 1464 // r8 = materialized value (RegExp literal) |
1465 // r7 = JS function, literals array | 1465 // r7 = JS function, literals array |
1466 // r6 = literal index | 1466 // r6 = literal index |
1467 // r5 = RegExp pattern | 1467 // r5 = RegExp pattern |
1468 // r4 = RegExp flags | 1468 // r4 = RegExp flags |
1469 // r3 = RegExp literal clone | 1469 // r3 = RegExp literal clone |
1470 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1470 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1471 __ LoadP(r7, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); | 1471 __ LoadP(r7, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); |
1472 int literal_offset = | 1472 int literal_offset = LiteralsArray::OffsetOfLiteralAt(expr->literal_index()); |
1473 FixedArray::kHeaderSize + expr->literal_index() * kPointerSize; | |
1474 __ LoadP(r8, FieldMemOperand(r7, literal_offset), r0); | 1473 __ LoadP(r8, FieldMemOperand(r7, literal_offset), r0); |
1475 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 1474 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
1476 __ cmp(r8, ip); | 1475 __ cmp(r8, ip); |
1477 __ bne(&materialized); | 1476 __ bne(&materialized); |
1478 | 1477 |
1479 // Create regexp literal using runtime function. | 1478 // Create regexp literal using runtime function. |
1480 // Result will be in r3. | 1479 // Result will be in r3. |
1481 __ LoadSmiLiteral(r6, Smi::FromInt(expr->literal_index())); | 1480 __ LoadSmiLiteral(r6, Smi::FromInt(expr->literal_index())); |
1482 __ mov(r5, Operand(expr->pattern())); | 1481 __ mov(r5, Operand(expr->pattern())); |
1483 __ mov(r4, Operand(expr->flags())); | 1482 __ mov(r4, Operand(expr->flags())); |
(...skipping 3739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5223 return ON_STACK_REPLACEMENT; | 5222 return ON_STACK_REPLACEMENT; |
5224 } | 5223 } |
5225 | 5224 |
5226 DCHECK(interrupt_address == | 5225 DCHECK(interrupt_address == |
5227 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5226 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5228 return OSR_AFTER_STACK_CHECK; | 5227 return OSR_AFTER_STACK_CHECK; |
5229 } | 5228 } |
5230 } // namespace internal | 5229 } // namespace internal |
5231 } // namespace v8 | 5230 } // namespace v8 |
5232 #endif // V8_TARGET_ARCH_PPC | 5231 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |