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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3519 | 3519 |
3520 __ JumpIfSmi(rax, if_false); | 3520 __ JumpIfSmi(rax, if_false); |
3521 __ CmpObjectType(rax, JS_ARRAY_TYPE, rbx); | 3521 __ CmpObjectType(rax, JS_ARRAY_TYPE, rbx); |
3522 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3522 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3523 Split(equal, if_true, if_false, fall_through); | 3523 Split(equal, if_true, if_false, fall_through); |
3524 | 3524 |
3525 context()->Plug(if_true, if_false); | 3525 context()->Plug(if_true, if_false); |
3526 } | 3526 } |
3527 | 3527 |
3528 | 3528 |
| 3529 void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { |
| 3530 ZoneList<Expression*>* args = expr->arguments(); |
| 3531 DCHECK(args->length() == 1); |
| 3532 |
| 3533 VisitForAccumulatorValue(args->at(0)); |
| 3534 |
| 3535 Label materialize_true, materialize_false; |
| 3536 Label* if_true = NULL; |
| 3537 Label* if_false = NULL; |
| 3538 Label* fall_through = NULL; |
| 3539 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3540 &if_false, &fall_through); |
| 3541 |
| 3542 __ JumpIfSmi(rax, if_false); |
| 3543 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx); |
| 3544 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3545 Split(equal, if_true, if_false, fall_through); |
| 3546 |
| 3547 context()->Plug(if_true, if_false); |
| 3548 } |
| 3549 |
| 3550 |
3529 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { | 3551 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
3530 ZoneList<Expression*>* args = expr->arguments(); | 3552 ZoneList<Expression*>* args = expr->arguments(); |
3531 DCHECK(args->length() == 1); | 3553 DCHECK(args->length() == 1); |
3532 | 3554 |
3533 VisitForAccumulatorValue(args->at(0)); | 3555 VisitForAccumulatorValue(args->at(0)); |
3534 | 3556 |
3535 Label materialize_true, materialize_false; | 3557 Label materialize_true, materialize_false; |
3536 Label* if_true = NULL; | 3558 Label* if_true = NULL; |
3537 Label* if_false = NULL; | 3559 Label* if_false = NULL; |
3538 Label* fall_through = NULL; | 3560 Label* fall_through = NULL; |
(...skipping 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5481 Assembler::target_address_at(call_target_address, | 5503 Assembler::target_address_at(call_target_address, |
5482 unoptimized_code)); | 5504 unoptimized_code)); |
5483 return OSR_AFTER_STACK_CHECK; | 5505 return OSR_AFTER_STACK_CHECK; |
5484 } | 5506 } |
5485 | 5507 |
5486 | 5508 |
5487 } // namespace internal | 5509 } // namespace internal |
5488 } // namespace v8 | 5510 } // namespace v8 |
5489 | 5511 |
5490 #endif // V8_TARGET_ARCH_X64 | 5512 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |