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 3427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3438 __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 3438 __ lbz(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
3439 __ subi(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE)); | 3439 __ subi(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE)); |
3440 __ cmpli(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE)); | 3440 __ cmpli(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE)); |
3441 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3441 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3442 Split(le, if_true, if_false, fall_through); | 3442 Split(le, if_true, if_false, fall_through); |
3443 | 3443 |
3444 context()->Plug(if_true, if_false); | 3444 context()->Plug(if_true, if_false); |
3445 } | 3445 } |
3446 | 3446 |
3447 | 3447 |
3448 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { | |
3449 ZoneList<Expression*>* args = expr->arguments(); | |
3450 DCHECK(args->length() == 1); | |
3451 | |
3452 VisitForAccumulatorValue(args->at(0)); | |
3453 | |
3454 Label materialize_true, materialize_false; | |
3455 Label* if_true = NULL; | |
3456 Label* if_false = NULL; | |
3457 Label* fall_through = NULL; | |
3458 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
3459 &if_false, &fall_through); | |
3460 | |
3461 __ JumpIfSmi(r3, if_false); | |
3462 __ LoadP(r4, FieldMemOperand(r3, HeapObject::kMapOffset)); | |
3463 __ lbz(r4, FieldMemOperand(r4, Map::kBitFieldOffset)); | |
3464 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable)); | |
3465 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3466 Split(ne, if_true, if_false, fall_through, cr0); | |
3467 | |
3468 context()->Plug(if_true, if_false); | |
3469 } | |
3470 | |
3471 | |
3472 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( | 3448 void FullCodeGenerator::EmitIsStringWrapperSafeForDefaultValueOf( |
3473 CallRuntime* expr) { | 3449 CallRuntime* expr) { |
3474 ZoneList<Expression*>* args = expr->arguments(); | 3450 ZoneList<Expression*>* args = expr->arguments(); |
3475 DCHECK(args->length() == 1); | 3451 DCHECK(args->length() == 1); |
3476 | 3452 |
3477 VisitForAccumulatorValue(args->at(0)); | 3453 VisitForAccumulatorValue(args->at(0)); |
3478 | 3454 |
3479 Label materialize_true, materialize_false, skip_lookup; | 3455 Label materialize_true, materialize_false, skip_lookup; |
3480 Label* if_true = NULL; | 3456 Label* if_true = NULL; |
3481 Label* if_false = NULL; | 3457 Label* if_false = NULL; |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5413 return ON_STACK_REPLACEMENT; | 5389 return ON_STACK_REPLACEMENT; |
5414 } | 5390 } |
5415 | 5391 |
5416 DCHECK(interrupt_address == | 5392 DCHECK(interrupt_address == |
5417 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5393 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5418 return OSR_AFTER_STACK_CHECK; | 5394 return OSR_AFTER_STACK_CHECK; |
5419 } | 5395 } |
5420 } // namespace internal | 5396 } // namespace internal |
5421 } // namespace v8 | 5397 } // namespace v8 |
5422 #endif // V8_TARGET_ARCH_PPC | 5398 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |