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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/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/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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 1866
1867 __ JumpIfSmi(eax, if_false); 1867 __ JumpIfSmi(eax, if_false);
1868 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx); 1868 __ CmpObjectType(eax, JS_TYPED_ARRAY_TYPE, ebx);
1869 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 1869 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
1870 Split(equal, if_true, if_false, fall_through); 1870 Split(equal, if_true, if_false, fall_through);
1871 1871
1872 context()->Plug(if_true, if_false); 1872 context()->Plug(if_true, if_false);
1873 } 1873 }
1874 1874
1875 1875
1876 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) {
1877 ZoneList<Expression*>* args = expr->arguments();
1878 DCHECK(args->length() == 1);
1879
1880 VisitForAccumulatorValue(args->at(0));
1881
1882 Label materialize_true, materialize_false;
1883 Label* if_true = NULL;
1884 Label* if_false = NULL;
1885 Label* fall_through = NULL;
1886 context()->PrepareTest(&materialize_true, &materialize_false,
1887 &if_true, &if_false, &fall_through);
1888
1889 __ JumpIfSmi(eax, if_false);
1890 __ CmpObjectType(eax, JS_REGEXP_TYPE, ebx);
1891 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
1892 Split(equal, if_true, if_false, fall_through);
1893
1894 context()->Plug(if_true, if_false);
1895 }
1896
1897
1898 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { 1876 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) {
1899 ZoneList<Expression*>* args = expr->arguments(); 1877 ZoneList<Expression*>* args = expr->arguments();
1900 DCHECK(args->length() == 1); 1878 DCHECK(args->length() == 1);
1901 1879
1902 VisitForAccumulatorValue(args->at(0)); 1880 VisitForAccumulatorValue(args->at(0));
1903 1881
1904 Label materialize_true, materialize_false; 1882 Label materialize_true, materialize_false;
1905 Label* if_true = NULL; 1883 Label* if_true = NULL;
1906 Label* if_false = NULL; 1884 Label* if_false = NULL;
1907 Label* fall_through = NULL; 1885 Label* fall_through = NULL;
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
2720 isolate->builtins()->OnStackReplacement()->entry(), 2698 isolate->builtins()->OnStackReplacement()->entry(),
2721 Assembler::target_address_at(call_target_address, unoptimized_code)); 2699 Assembler::target_address_at(call_target_address, unoptimized_code));
2722 return ON_STACK_REPLACEMENT; 2700 return ON_STACK_REPLACEMENT;
2723 } 2701 }
2724 2702
2725 2703
2726 } // namespace internal 2704 } // namespace internal
2727 } // namespace v8 2705 } // namespace v8
2728 2706
2729 #endif // V8_TARGET_ARCH_X87 2707 #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