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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 | 1874 |
1875 __ JumpIfSmi(eax, if_false); | 1875 __ JumpIfSmi(eax, if_false); |
1876 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); | 1876 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); |
1877 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 1877 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
1878 Split(equal, if_true, if_false, fall_through); | 1878 Split(equal, if_true, if_false, fall_through); |
1879 | 1879 |
1880 context()->Plug(if_true, if_false); | 1880 context()->Plug(if_true, if_false); |
1881 } | 1881 } |
1882 | 1882 |
1883 | 1883 |
1884 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { | |
1885 ZoneList<Expression*>* args = expr->arguments(); | |
1886 DCHECK(args->length() == 1); | |
1887 | |
1888 VisitForAccumulatorValue(args->at(0)); | |
1889 | |
1890 Label materialize_true, materialize_false; | |
1891 Label* if_true = NULL; | |
1892 Label* if_false = NULL; | |
1893 Label* fall_through = NULL; | |
1894 context()->PrepareTest(&materialize_true, &materialize_false, | |
1895 &if_true, &if_false, &fall_through); | |
1896 | |
1897 __ JumpIfSmi(eax, if_false); | |
1898 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); | |
1899 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
1900 Split(equal, if_true, if_false, fall_through); | |
1901 | |
1902 context()->Plug(if_true, if_false); | |
1903 } | |
1904 | |
1905 | |
1906 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 1884 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
1907 ZoneList<Expression*>* args = expr->arguments(); | 1885 ZoneList<Expression*>* args = expr->arguments(); |
1908 DCHECK(args->length() == 1); | 1886 DCHECK(args->length() == 1); |
1909 | 1887 |
1910 VisitForAccumulatorValue(args->at(0)); | 1888 VisitForAccumulatorValue(args->at(0)); |
1911 | 1889 |
1912 Label materialize_true, materialize_false; | 1890 Label materialize_true, materialize_false; |
1913 Label* if_true = NULL; | 1891 Label* if_true = NULL; |
1914 Label* if_false = NULL; | 1892 Label* if_false = NULL; |
1915 Label* fall_through = NULL; | 1893 Label* fall_through = NULL; |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 isolate->builtins()->OnStackReplacement()->entry(), | 2706 isolate->builtins()->OnStackReplacement()->entry(), |
2729 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2707 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2730 return ON_STACK_REPLACEMENT; | 2708 return ON_STACK_REPLACEMENT; |
2731 } | 2709 } |
2732 | 2710 |
2733 | 2711 |
2734 } // namespace internal | 2712 } // namespace internal |
2735 } // namespace v8 | 2713 } // namespace v8 |
2736 | 2714 |
2737 #endif // V8_TARGET_ARCH_IA32 | 2715 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |