| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1859 | 1859 |
| 1860 __ JumpIfSmi(rax, if_false); | 1860 __ JumpIfSmi(rax, if_false); |
| 1861 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx); | 1861 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx); |
| 1862 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 1862 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 1863 Split(equal, if_true, if_false, fall_through); | 1863 Split(equal, if_true, if_false, fall_through); |
| 1864 | 1864 |
| 1865 context()->Plug(if_true, if_false); | 1865 context()->Plug(if_true, if_false); |
| 1866 } | 1866 } |
| 1867 | 1867 |
| 1868 | 1868 |
| 1869 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { | |
| 1870 ZoneList<Expression*>* args = expr->arguments(); | |
| 1871 DCHECK(args->length() == 1); | |
| 1872 | |
| 1873 VisitForAccumulatorValue(args->at(0)); | |
| 1874 | |
| 1875 Label materialize_true, materialize_false; | |
| 1876 Label* if_true = NULL; | |
| 1877 Label* if_false = NULL; | |
| 1878 Label* fall_through = NULL; | |
| 1879 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 1880 &if_true, &if_false, &fall_through); | |
| 1881 | |
| 1882 __ JumpIfSmi(rax, if_false); | |
| 1883 __ CmpObjectType(rax, JS_REGEXP_TYPE, rbx); | |
| 1884 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 1885 Split(equal, if_true, if_false, fall_through); | |
| 1886 | |
| 1887 context()->Plug(if_true, if_false); | |
| 1888 } | |
| 1889 | |
| 1890 | |
| 1891 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 1869 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
| 1892 ZoneList<Expression*>* args = expr->arguments(); | 1870 ZoneList<Expression*>* args = expr->arguments(); |
| 1893 DCHECK(args->length() == 1); | 1871 DCHECK(args->length() == 1); |
| 1894 | 1872 |
| 1895 VisitForAccumulatorValue(args->at(0)); | 1873 VisitForAccumulatorValue(args->at(0)); |
| 1896 | 1874 |
| 1897 Label materialize_true, materialize_false; | 1875 Label materialize_true, materialize_false; |
| 1898 Label* if_true = NULL; | 1876 Label* if_true = NULL; |
| 1899 Label* if_false = NULL; | 1877 Label* if_false = NULL; |
| 1900 Label* fall_through = NULL; | 1878 Label* fall_through = NULL; |
| (...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 DCHECK_EQ( | 2687 DCHECK_EQ( |
| 2710 isolate->builtins()->OnStackReplacement()->entry(), | 2688 isolate->builtins()->OnStackReplacement()->entry(), |
| 2711 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2689 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 2712 return ON_STACK_REPLACEMENT; | 2690 return ON_STACK_REPLACEMENT; |
| 2713 } | 2691 } |
| 2714 | 2692 |
| 2715 } // namespace internal | 2693 } // namespace internal |
| 2716 } // namespace v8 | 2694 } // namespace v8 |
| 2717 | 2695 |
| 2718 #endif // V8_TARGET_ARCH_X64 | 2696 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |