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

Side by Side Diff: src/arm/regexp-macro-assembler-arm.cc

Issue 6997015: Limit the generation of regexp code with large inlined constants. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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 | « src/arm/regexp-macro-assembler-arm.h ('k') | src/heap.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 598 }
599 } 599 }
600 600
601 601
602 void RegExpMacroAssemblerARM::Fail() { 602 void RegExpMacroAssemblerARM::Fail() {
603 __ mov(r0, Operand(FAILURE)); 603 __ mov(r0, Operand(FAILURE));
604 __ jmp(&exit_label_); 604 __ jmp(&exit_label_);
605 } 605 }
606 606
607 607
608 Handle<Object> RegExpMacroAssemblerARM::GetCode(Handle<String> source) { 608 Handle<HeapObject> RegExpMacroAssemblerARM::GetCode(Handle<String> source) {
609 // Finalize code - write the entry point code now we know how many 609 // Finalize code - write the entry point code now we know how many
610 // registers we need. 610 // registers we need.
611 611
612 // Entry code: 612 // Entry code:
613 __ bind(&entry_label_); 613 __ bind(&entry_label_);
614 // Push arguments 614 // Push arguments
615 // Save callee-save registers. 615 // Save callee-save registers.
616 // Start new stack frame. 616 // Start new stack frame.
617 // Store link register in existing stack-cell. 617 // Store link register in existing stack-cell.
618 // Order here should correspond to order of offset constants in header file. 618 // Order here should correspond to order of offset constants in header file.
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 __ mov(r0, Operand(EXCEPTION)); 806 __ mov(r0, Operand(EXCEPTION));
807 __ jmp(&exit_label_); 807 __ jmp(&exit_label_);
808 } 808 }
809 809
810 CodeDesc code_desc; 810 CodeDesc code_desc;
811 masm_->GetCode(&code_desc); 811 masm_->GetCode(&code_desc);
812 Handle<Code> code = FACTORY->NewCode(code_desc, 812 Handle<Code> code = FACTORY->NewCode(code_desc,
813 Code::ComputeFlags(Code::REGEXP), 813 Code::ComputeFlags(Code::REGEXP),
814 masm_->CodeObject()); 814 masm_->CodeObject());
815 PROFILE(Isolate::Current(), RegExpCodeCreateEvent(*code, *source)); 815 PROFILE(Isolate::Current(), RegExpCodeCreateEvent(*code, *source));
816 return Handle<Object>::cast(code); 816 return Handle<HeapObject>::cast(code);
817 } 817 }
818 818
819 819
820 void RegExpMacroAssemblerARM::GoTo(Label* to) { 820 void RegExpMacroAssemblerARM::GoTo(Label* to) {
821 BranchOrBacktrack(al, to); 821 BranchOrBacktrack(al, to);
822 } 822 }
823 823
824 824
825 void RegExpMacroAssemblerARM::IfRegisterGE(int reg, 825 void RegExpMacroAssemblerARM::IfRegisterGE(int reg,
826 int comparand, 826 int comparand,
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex)); 1278 __ ldr(pc, MemOperand(sp, stack_alignment, PostIndex));
1279 } 1279 }
1280 1280
1281 #undef __ 1281 #undef __
1282 1282
1283 #endif // V8_INTERPRETED_REGEXP 1283 #endif // V8_INTERPRETED_REGEXP
1284 1284
1285 }} // namespace v8::internal 1285 }} // namespace v8::internal
1286 1286
1287 #endif // V8_TARGET_ARCH_ARM 1287 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698