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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 | 1926 |
1927 __ JumpIfSmi(eax, if_false); | 1927 __ JumpIfSmi(eax, if_false); |
1928 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); | 1928 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); |
1929 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 1929 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
1930 Split(equal, if_true, if_false, fall_through); | 1930 Split(equal, if_true, if_false, fall_through); |
1931 | 1931 |
1932 context()->Plug(if_true, if_false); | 1932 context()->Plug(if_true, if_false); |
1933 } | 1933 } |
1934 | 1934 |
1935 | 1935 |
| 1936 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
| 1937 ZoneList<Expression*>* args = expr->arguments(); |
| 1938 DCHECK(args->length() == 1); |
| 1939 |
| 1940 VisitForAccumulatorValue(args->at(0)); |
| 1941 |
| 1942 Label materialize_true, materialize_false; |
| 1943 Label* if_true = NULL; |
| 1944 Label* if_false = NULL; |
| 1945 Label* fall_through = NULL; |
| 1946 context()->PrepareTest(&materialize_true, &materialize_false, |
| 1947 &if_true, &if_false, &fall_through); |
| 1948 |
| 1949 __ JumpIfSmi(eax, if_false); |
| 1950 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); |
| 1951 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 1952 Split(equal, if_true, if_false, fall_through); |
| 1953 |
| 1954 context()->Plug(if_true, if_false); |
| 1955 } |
| 1956 |
| 1957 |
1936 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 1958 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
1937 ZoneList<Expression*>* args = expr->arguments(); | 1959 ZoneList<Expression*>* args = expr->arguments(); |
1938 DCHECK(args->length() == 1); | 1960 DCHECK(args->length() == 1); |
1939 | 1961 |
1940 VisitForAccumulatorValue(args->at(0)); | 1962 VisitForAccumulatorValue(args->at(0)); |
1941 | 1963 |
1942 Label materialize_true, materialize_false; | 1964 Label materialize_true, materialize_false; |
1943 Label* if_true = NULL; | 1965 Label* if_true = NULL; |
1944 Label* if_false = NULL; | 1966 Label* if_false = NULL; |
1945 Label* fall_through = NULL; | 1967 Label* fall_through = NULL; |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 isolate->builtins()->OnStackReplacement()->entry(), | 2781 isolate->builtins()->OnStackReplacement()->entry(), |
2760 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2782 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2761 return ON_STACK_REPLACEMENT; | 2783 return ON_STACK_REPLACEMENT; |
2762 } | 2784 } |
2763 | 2785 |
2764 | 2786 |
2765 } // namespace internal | 2787 } // namespace internal |
2766 } // namespace v8 | 2788 } // namespace v8 |
2767 | 2789 |
2768 #endif // V8_TARGET_ARCH_X87 | 2790 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |