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/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 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1915 Label* if_false = NULL; | 1915 Label* if_false = NULL; |
1916 Label* fall_through = NULL; | 1916 Label* fall_through = NULL; |
1917 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 1917 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
1918 &if_false, &fall_through); | 1918 &if_false, &fall_through); |
1919 | 1919 |
1920 __ JumpIfSmi(rax, if_false); | 1920 __ JumpIfSmi(rax, if_false); |
1921 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx); | 1921 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx); |
1922 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 1922 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
1923 Split(equal, if_true, if_false, fall_through); | 1923 Split(equal, if_true, if_false, fall_through); |
1924 | 1924 |
| 1925 context()->Plug(if_true, if_false); |
| 1926 } |
| 1927 |
| 1928 |
| 1929 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
| 1930 ZoneList<Expression*>* args = expr->arguments(); |
| 1931 DCHECK(args->length() == 1); |
| 1932 |
| 1933 VisitForAccumulatorValue(args->at(0)); |
| 1934 |
| 1935 Label materialize_true, materialize_false; |
| 1936 Label* if_true = NULL; |
| 1937 Label* if_false = NULL; |
| 1938 Label* fall_through = NULL; |
| 1939 context()->PrepareTest(&materialize_true, &materialize_false, |
| 1940 &if_true, &if_false, &fall_through); |
| 1941 |
| 1942 __ JumpIfSmi(rax, if_false); |
| 1943 __ CmpObjectType(rax, JS_REGEXP_TYPE, rbx); |
| 1944 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 1945 Split(equal, if_true, if_false, fall_through); |
| 1946 |
1925 context()->Plug(if_true, if_false); | 1947 context()->Plug(if_true, if_false); |
1926 } | 1948 } |
1927 | 1949 |
1928 | 1950 |
1929 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 1951 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
1930 ZoneList<Expression*>* args = expr->arguments(); | 1952 ZoneList<Expression*>* args = expr->arguments(); |
1931 DCHECK(args->length() == 1); | 1953 DCHECK(args->length() == 1); |
1932 | 1954 |
1933 VisitForAccumulatorValue(args->at(0)); | 1955 VisitForAccumulatorValue(args->at(0)); |
1934 | 1956 |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2748 DCHECK_EQ( | 2770 DCHECK_EQ( |
2749 isolate->builtins()->OnStackReplacement()->entry(), | 2771 isolate->builtins()->OnStackReplacement()->entry(), |
2750 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2772 Assembler::target_address_at(call_target_address, unoptimized_code)); |
2751 return ON_STACK_REPLACEMENT; | 2773 return ON_STACK_REPLACEMENT; |
2752 } | 2774 } |
2753 | 2775 |
2754 } // namespace internal | 2776 } // namespace internal |
2755 } // namespace v8 | 2777 } // namespace v8 |
2756 | 2778 |
2757 #endif // V8_TARGET_ARCH_X64 | 2779 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |