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

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

Issue 141563013: Remove IsRegExpEquivalent. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3796 matching lines...) Expand 10 before | Expand all | Expand 10 after
3807 __ bind(&not_found); 3807 __ bind(&not_found);
3808 // Call runtime to perform the lookup. 3808 // Call runtime to perform the lookup.
3809 __ Push(cache, key); 3809 __ Push(cache, key);
3810 __ CallRuntime(Runtime::kGetFromCache, 2); 3810 __ CallRuntime(Runtime::kGetFromCache, 2);
3811 3811
3812 __ bind(&done); 3812 __ bind(&done);
3813 context()->Plug(r0); 3813 context()->Plug(r0);
3814 } 3814 }
3815 3815
3816 3816
3817 void FullCodeGenerator::EmitIsRegExpEquivalent(CallRuntime* expr) {
3818 ZoneList<Expression*>* args = expr->arguments();
3819 ASSERT_EQ(2, args->length());
3820
3821 Register right = r0;
3822 Register left = r1;
3823 Register tmp = r2;
3824 Register tmp2 = r3;
3825
3826 VisitForStackValue(args->at(0));
3827 VisitForAccumulatorValue(args->at(1));
3828 __ pop(left);
3829
3830 Label done, fail, ok;
3831 __ cmp(left, Operand(right));
3832 __ b(eq, &ok);
3833 // Fail if either is a non-HeapObject.
3834 __ and_(tmp, left, Operand(right));
3835 __ JumpIfSmi(tmp, &fail);
3836 __ ldr(tmp, FieldMemOperand(left, HeapObject::kMapOffset));
3837 __ ldrb(tmp2, FieldMemOperand(tmp, Map::kInstanceTypeOffset));
3838 __ cmp(tmp2, Operand(JS_REGEXP_TYPE));
3839 __ b(ne, &fail);
3840 __ ldr(tmp2, FieldMemOperand(right, HeapObject::kMapOffset));
3841 __ cmp(tmp, Operand(tmp2));
3842 __ b(ne, &fail);
3843 __ ldr(tmp, FieldMemOperand(left, JSRegExp::kDataOffset));
3844 __ ldr(tmp2, FieldMemOperand(right, JSRegExp::kDataOffset));
3845 __ cmp(tmp, tmp2);
3846 __ b(eq, &ok);
3847 __ bind(&fail);
3848 __ LoadRoot(r0, Heap::kFalseValueRootIndex);
3849 __ jmp(&done);
3850 __ bind(&ok);
3851 __ LoadRoot(r0, Heap::kTrueValueRootIndex);
3852 __ bind(&done);
3853
3854 context()->Plug(r0);
3855 }
3856
3857
3858 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { 3817 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) {
3859 ZoneList<Expression*>* args = expr->arguments(); 3818 ZoneList<Expression*>* args = expr->arguments();
3860 VisitForAccumulatorValue(args->at(0)); 3819 VisitForAccumulatorValue(args->at(0));
3861 3820
3862 Label materialize_true, materialize_false; 3821 Label materialize_true, materialize_false;
3863 Label* if_true = NULL; 3822 Label* if_true = NULL;
3864 Label* if_false = NULL; 3823 Label* if_false = NULL;
3865 Label* fall_through = NULL; 3824 Label* fall_through = NULL;
3866 context()->PrepareTest(&materialize_true, &materialize_false, 3825 context()->PrepareTest(&materialize_true, &materialize_false,
3867 &if_true, &if_false, &fall_through); 3826 &if_true, &if_false, &fall_through);
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
4907 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4866 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4908 reinterpret_cast<uint32_t>( 4867 reinterpret_cast<uint32_t>(
4909 isolate->builtins()->OsrAfterStackCheck()->entry())); 4868 isolate->builtins()->OsrAfterStackCheck()->entry()));
4910 return OSR_AFTER_STACK_CHECK; 4869 return OSR_AFTER_STACK_CHECK;
4911 } 4870 }
4912 4871
4913 4872
4914 } } // namespace v8::internal 4873 } } // namespace v8::internal
4915 4874
4916 #endif // V8_TARGET_ARCH_ARM 4875 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698