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

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

Issue 2591923003: [regexp] Remove IsRegExp intrinsic (Closed)
Patch Set: Rebase Created 3 years, 11 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/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1859 1859
1860 __ JumpIfSmi(rax, if_false); 1860 __ JumpIfSmi(rax, if_false);
1861 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx); 1861 __ CmpObjectType(rax, JS_TYPED_ARRAY_TYPE, rbx);
1862 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 1862 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
1863 Split(equal, if_true, if_false, fall_through); 1863 Split(equal, if_true, if_false, fall_through);
1864 1864
1865 context()->Plug(if_true, if_false); 1865 context()->Plug(if_true, if_false);
1866 } 1866 }
1867 1867
1868 1868
1869 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) {
1870 ZoneList<Expression*>* args = expr->arguments();
1871 DCHECK(args->length() == 1);
1872
1873 VisitForAccumulatorValue(args->at(0));
1874
1875 Label materialize_true, materialize_false;
1876 Label* if_true = NULL;
1877 Label* if_false = NULL;
1878 Label* fall_through = NULL;
1879 context()->PrepareTest(&materialize_true, &materialize_false,
1880 &if_true, &if_false, &fall_through);
1881
1882 __ JumpIfSmi(rax, if_false);
1883 __ CmpObjectType(rax, JS_REGEXP_TYPE, rbx);
1884 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
1885 Split(equal, if_true, if_false, fall_through);
1886
1887 context()->Plug(if_true, if_false);
1888 }
1889
1890
1891 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { 1869 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) {
1892 ZoneList<Expression*>* args = expr->arguments(); 1870 ZoneList<Expression*>* args = expr->arguments();
1893 DCHECK(args->length() == 1); 1871 DCHECK(args->length() == 1);
1894 1872
1895 VisitForAccumulatorValue(args->at(0)); 1873 VisitForAccumulatorValue(args->at(0));
1896 1874
1897 Label materialize_true, materialize_false; 1875 Label materialize_true, materialize_false;
1898 Label* if_true = NULL; 1876 Label* if_true = NULL;
1899 Label* if_false = NULL; 1877 Label* if_false = NULL;
1900 Label* fall_through = NULL; 1878 Label* fall_through = NULL;
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2709 DCHECK_EQ( 2687 DCHECK_EQ(
2710 isolate->builtins()->OnStackReplacement()->entry(), 2688 isolate->builtins()->OnStackReplacement()->entry(),
2711 Assembler::target_address_at(call_target_address, unoptimized_code)); 2689 Assembler::target_address_at(call_target_address, unoptimized_code));
2712 return ON_STACK_REPLACEMENT; 2690 return ON_STACK_REPLACEMENT;
2713 } 2691 }
2714 2692
2715 } // namespace internal 2693 } // namespace internal
2716 } // namespace v8 2694 } // namespace v8
2717 2695
2718 #endif // V8_TARGET_ARCH_X64 2696 #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