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

Unified Diff: src/assembler-re2k-inl.h

Issue 11228: * No failures on our own tests.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/assembler-re2k-inl.h
===================================================================
--- src/assembler-re2k-inl.h (revision 786)
+++ src/assembler-re2k-inl.h (working copy)
@@ -38,17 +38,29 @@
void Re2kAssembler::Emit(uint32_t byte) {
+ ASSERT(pc_ <= buffer_.length());
+ if (pc_ == buffer_.length()) {
+ Expand();
+ }
buffer_[pc_++] = byte;
}
void Re2kAssembler::Emit16(uint32_t word) {
+ ASSERT(pc_ <= buffer_.length());
+ if (pc_ + 1 >= buffer_.length()) {
+ Expand();
+ }
Store16(buffer_.start() + pc_, word);
pc_ += 2;
}
void Re2kAssembler::Emit32(uint32_t word) {
+ ASSERT(pc_ <= buffer_.length());
+ if (pc_ + 3 >= buffer_.length()) {
+ Expand();
+ }
Store32(buffer_.start() + pc_, word);
pc_ += 4;
}
« no previous file with comments | « src/assembler-re2k.cc ('k') | src/bytecodes-re2k.h » ('j') | src/bytecodes-re2k.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698