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

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

Issue 3850005: Use finite-length end-anchored regexps to reduce part of regexp that is searched. (Closed)
Patch Set: Addressed review comments. Created 10 years, 2 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/regexp-macro-assembler-tracer.h ('k') | src/x64/regexp-macro-assembler-x64.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 assembler_->PushRegister(register_index, check_stack_limit); 129 assembler_->PushRegister(register_index, check_stack_limit);
130 } 130 }
131 131
132 132
133 void RegExpMacroAssemblerTracer::AdvanceRegister(int reg, int by) { 133 void RegExpMacroAssemblerTracer::AdvanceRegister(int reg, int by) {
134 PrintF(" AdvanceRegister(register=%d, by=%d);\n", reg, by); 134 PrintF(" AdvanceRegister(register=%d, by=%d);\n", reg, by);
135 assembler_->AdvanceRegister(reg, by); 135 assembler_->AdvanceRegister(reg, by);
136 } 136 }
137 137
138 138
139 void RegExpMacroAssemblerTracer::SetCurrentPositionFromEnd(int by) {
140 PrintF(" SetCurrentPositionFromEnd(by=%d);\n", by);
141 assembler_->SetCurrentPositionFromEnd(by);
142 }
143
144
139 void RegExpMacroAssemblerTracer::SetRegister(int register_index, int to) { 145 void RegExpMacroAssemblerTracer::SetRegister(int register_index, int to) {
140 PrintF(" SetRegister(register=%d, to=%d);\n", register_index, to); 146 PrintF(" SetRegister(register=%d, to=%d);\n", register_index, to);
141 assembler_->SetRegister(register_index, to); 147 assembler_->SetRegister(register_index, to);
142 } 148 }
143 149
144 150
145 void RegExpMacroAssemblerTracer::WriteCurrentPositionToRegister(int reg, 151 void RegExpMacroAssemblerTracer::WriteCurrentPositionToRegister(int reg,
146 int cp_offset) { 152 int cp_offset) {
147 PrintF(" WriteCurrentPositionToRegister(register=%d,cp_offset=%d);\n", 153 PrintF(" WriteCurrentPositionToRegister(register=%d,cp_offset=%d);\n",
148 reg, 154 reg,
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 return assembler_->Implementation(); 364 return assembler_->Implementation();
359 } 365 }
360 366
361 367
362 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) { 368 Handle<Object> RegExpMacroAssemblerTracer::GetCode(Handle<String> source) {
363 PrintF(" GetCode(%s);\n", *(source->ToCString())); 369 PrintF(" GetCode(%s);\n", *(source->ToCString()));
364 return assembler_->GetCode(source); 370 return assembler_->GetCode(source);
365 } 371 }
366 372
367 }} // namespace v8::internal 373 }} // namespace v8::internal
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler-tracer.h ('k') | src/x64/regexp-macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698