Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.cc

Issue 2592383002: Revert of [regexp] Remove IsRegExp intrinsic (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/interpreter-intrinsics.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 1925
1926 __ JumpIfSmi(eax, if_false); 1926 __ JumpIfSmi(eax, if_false);
1927 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); 1927 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx);
1928 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 1928 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
1929 Split(equal, if_true, if_false, fall_through); 1929 Split(equal, if_true, if_false, fall_through);
1930 1930
1931 context()->Plug(if_true, if_false); 1931 context()->Plug(if_true, if_false);
1932 } 1932 }
1933 1933
1934 1934
1935 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) {
1936 ZoneList<Expression*>* args = expr->arguments();
1937 DCHECK(args->length() == 1);
1938
1939 VisitForAccumulatorValue(args->at(0));
1940
1941 Label materialize_true, materialize_false;
1942 Label* if_true = NULL;
1943 Label* if_false = NULL;
1944 Label* fall_through = NULL;
1945 context()->PrepareTest(&materialize_true, &materialize_false,
1946 &if_true, &if_false, &fall_through);
1947
1948 __ JumpIfSmi(eax, if_false);
1949 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx);
1950 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
1951 Split(equal, if_true, if_false, fall_through);
1952
1953 context()->Plug(if_true, if_false);
1954 }
1955
1956
1935 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { 1957 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) {
1936 ZoneList<Expression*>* args = expr->arguments(); 1958 ZoneList<Expression*>* args = expr->arguments();
1937 DCHECK(args->length() == 1); 1959 DCHECK(args->length() == 1);
1938 1960
1939 VisitForAccumulatorValue(args->at(0)); 1961 VisitForAccumulatorValue(args->at(0));
1940 1962
1941 Label materialize_true, materialize_false; 1963 Label materialize_true, materialize_false;
1942 Label* if_true = NULL; 1964 Label* if_true = NULL;
1943 Label* if_false = NULL; 1965 Label* if_false = NULL;
1944 Label* fall_through = NULL; 1966 Label* fall_through = NULL;
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
2758 isolate->builtins()->OnStackReplacement()->entry(), 2780 isolate->builtins()->OnStackReplacement()->entry(),
2759 Assembler::target_address_at(call_target_address, unoptimized_code)); 2781 Assembler::target_address_at(call_target_address, unoptimized_code));
2760 return ON_STACK_REPLACEMENT; 2782 return ON_STACK_REPLACEMENT;
2761 } 2783 }
2762 2784
2763 2785
2764 } // namespace internal 2786 } // namespace internal
2765 } // namespace v8 2787 } // namespace v8
2766 2788
2767 #endif // V8_TARGET_ARCH_X87 2789 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/interpreter-intrinsics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698