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