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

Side by Side Diff: src/regexp-macro-assembler-irregexp.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/regexp-macro-assembler-irregexp.h ('k') | src/regexp-macro-assembler-tracer.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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2008-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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 428
429 void RegExpMacroAssemblerIrregexp::IfRegisterEqPos(int register_index, 429 void RegExpMacroAssemblerIrregexp::IfRegisterEqPos(int register_index,
430 Label* on_eq) { 430 Label* on_eq) {
431 ASSERT(register_index >= 0); 431 ASSERT(register_index >= 0);
432 ASSERT(register_index <= kMaxRegister); 432 ASSERT(register_index <= kMaxRegister);
433 Emit(BC_CHECK_REGISTER_EQ_POS, register_index); 433 Emit(BC_CHECK_REGISTER_EQ_POS, register_index);
434 EmitOrLink(on_eq); 434 EmitOrLink(on_eq);
435 } 435 }
436 436
437 437
438 Handle<Object> RegExpMacroAssemblerIrregexp::GetCode(Handle<String> source) { 438 Handle<HeapObject> RegExpMacroAssemblerIrregexp::GetCode(
439 Handle<String> source) {
439 Bind(&backtrack_); 440 Bind(&backtrack_);
440 Emit(BC_POP_BT, 0); 441 Emit(BC_POP_BT, 0);
441 Handle<ByteArray> array = FACTORY->NewByteArray(length()); 442 Handle<ByteArray> array = FACTORY->NewByteArray(length());
442 Copy(array->GetDataStartAddress()); 443 Copy(array->GetDataStartAddress());
443 return array; 444 return array;
444 } 445 }
445 446
446 447
447 int RegExpMacroAssemblerIrregexp::length() { 448 int RegExpMacroAssemblerIrregexp::length() {
448 return pc_; 449 return pc_;
(...skipping 12 matching lines...) Expand all
461 own_buffer_ = true; 462 own_buffer_ = true;
462 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length()); 463 memcpy(buffer_.start(), old_buffer.start(), old_buffer.length());
463 if (old_buffer_was_our_own) { 464 if (old_buffer_was_our_own) {
464 old_buffer.Dispose(); 465 old_buffer.Dispose();
465 } 466 }
466 } 467 }
467 468
468 #endif // V8_INTERPRETED_REGEXP 469 #endif // V8_INTERPRETED_REGEXP
469 470
470 } } // namespace v8::internal 471 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/regexp-macro-assembler-irregexp.h ('k') | src/regexp-macro-assembler-tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698