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

Side by Side Diff: src/x64/regexp-macro-assembler-x64.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/x64/regexp-macro-assembler-x64.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 696 }
697 697
698 698
699 void RegExpMacroAssemblerX64::Fail() { 699 void RegExpMacroAssemblerX64::Fail() {
700 ASSERT(FAILURE == 0); // Return value for failure is zero. 700 ASSERT(FAILURE == 0); // Return value for failure is zero.
701 __ Set(rax, 0); 701 __ Set(rax, 0);
702 __ jmp(&exit_label_); 702 __ jmp(&exit_label_);
703 } 703 }
704 704
705 705
706 Handle<Object> RegExpMacroAssemblerX64::GetCode(Handle<String> source) { 706 Handle<HeapObject> RegExpMacroAssemblerX64::GetCode(Handle<String> source) {
707 // Finalize code - write the entry point code now we know how many 707 // Finalize code - write the entry point code now we know how many
708 // registers we need. 708 // registers we need.
709 // Entry code: 709 // Entry code:
710 __ bind(&entry_label_); 710 __ bind(&entry_label_);
711 // Start new stack frame. 711 // Start new stack frame.
712 __ push(rbp); 712 __ push(rbp);
713 __ movq(rbp, rsp); 713 __ movq(rbp, rsp);
714 // Save parameters and callee-save registers. Order here should correspond 714 // Save parameters and callee-save registers. Order here should correspond
715 // to order of kBackup_ebx etc. 715 // to order of kBackup_ebx etc.
716 #ifdef _WIN64 716 #ifdef _WIN64
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 965
966 FixupCodeRelativePositions(); 966 FixupCodeRelativePositions();
967 967
968 CodeDesc code_desc; 968 CodeDesc code_desc;
969 masm_.GetCode(&code_desc); 969 masm_.GetCode(&code_desc);
970 Isolate* isolate = ISOLATE; 970 Isolate* isolate = ISOLATE;
971 Handle<Code> code = isolate->factory()->NewCode( 971 Handle<Code> code = isolate->factory()->NewCode(
972 code_desc, Code::ComputeFlags(Code::REGEXP), 972 code_desc, Code::ComputeFlags(Code::REGEXP),
973 masm_.CodeObject()); 973 masm_.CodeObject());
974 PROFILE(isolate, RegExpCodeCreateEvent(*code, *source)); 974 PROFILE(isolate, RegExpCodeCreateEvent(*code, *source));
975 return Handle<Object>::cast(code); 975 return Handle<HeapObject>::cast(code);
976 } 976 }
977 977
978 978
979 void RegExpMacroAssemblerX64::GoTo(Label* to) { 979 void RegExpMacroAssemblerX64::GoTo(Label* to) {
980 BranchOrBacktrack(no_condition, to); 980 BranchOrBacktrack(no_condition, to);
981 } 981 }
982 982
983 983
984 void RegExpMacroAssemblerX64::IfRegisterGE(int reg, 984 void RegExpMacroAssemblerX64::IfRegisterGE(int reg,
985 int comparand, 985 int comparand,
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 } 1389 }
1390 } 1390 }
1391 1391
1392 #undef __ 1392 #undef __
1393 1393
1394 #endif // V8_INTERPRETED_REGEXP 1394 #endif // V8_INTERPRETED_REGEXP
1395 1395
1396 }} // namespace v8::internal 1396 }} // namespace v8::internal
1397 1397
1398 #endif // V8_TARGET_ARCH_X64 1398 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698