| 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/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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 | 1933 |
| 1934 __ JumpIfSmi(eax, if_false); | 1934 __ JumpIfSmi(eax, if_false); |
| 1935 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); | 1935 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); |
| 1936 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 1936 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 1937 Split(equal, if_true, if_false, fall_through); | 1937 Split(equal, if_true, if_false, fall_through); |
| 1938 | 1938 |
| 1939 context()->Plug(if_true, if_false); | 1939 context()->Plug(if_true, if_false); |
| 1940 } | 1940 } |
| 1941 | 1941 |
| 1942 | 1942 |
| 1943 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
| 1944 ZoneList<Expression*>* args = expr->arguments(); |
| 1945 DCHECK(args->length() == 1); |
| 1946 |
| 1947 VisitForAccumulatorValue(args->at(0)); |
| 1948 |
| 1949 Label materialize_true, materialize_false; |
| 1950 Label* if_true = NULL; |
| 1951 Label* if_false = NULL; |
| 1952 Label* fall_through = NULL; |
| 1953 context()->PrepareTest(&materialize_true, &materialize_false, |
| 1954 &if_true, &if_false, &fall_through); |
| 1955 |
| 1956 __ JumpIfSmi(eax, if_false); |
| 1957 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx); |
| 1958 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 1959 Split(equal, if_true, if_false, fall_through); |
| 1960 |
| 1961 context()->Plug(if_true, if_false); |
| 1962 } |
| 1963 |
| 1964 |
| 1943 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 1965 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
| 1944 ZoneList<Expression*>* args = expr->arguments(); | 1966 ZoneList<Expression*>* args = expr->arguments(); |
| 1945 DCHECK(args->length() == 1); | 1967 DCHECK(args->length() == 1); |
| 1946 | 1968 |
| 1947 VisitForAccumulatorValue(args->at(0)); | 1969 VisitForAccumulatorValue(args->at(0)); |
| 1948 | 1970 |
| 1949 Label materialize_true, materialize_false; | 1971 Label materialize_true, materialize_false; |
| 1950 Label* if_true = NULL; | 1972 Label* if_true = NULL; |
| 1951 Label* if_false = NULL; | 1973 Label* if_false = NULL; |
| 1952 Label* fall_through = NULL; | 1974 Label* fall_through = NULL; |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2766 isolate->builtins()->OnStackReplacement()->entry(), | 2788 isolate->builtins()->OnStackReplacement()->entry(), |
| 2767 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2789 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 2768 return ON_STACK_REPLACEMENT; | 2790 return ON_STACK_REPLACEMENT; |
| 2769 } | 2791 } |
| 2770 | 2792 |
| 2771 | 2793 |
| 2772 } // namespace internal | 2794 } // namespace internal |
| 2773 } // namespace v8 | 2795 } // namespace v8 |
| 2774 | 2796 |
| 2775 #endif // V8_TARGET_ARCH_IA32 | 2797 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |