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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('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_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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698