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

Unified Diff: src/regexp-macro-assembler-irregexp-inl.h

Issue 18842: Experimental: periodic merge of the bleeding_edge branch to the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/regexp-macro-assembler-irregexp.cc ('k') | src/regexp-macro-assembler-tracer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/regexp-macro-assembler-irregexp-inl.h
===================================================================
--- src/regexp-macro-assembler-irregexp-inl.h (revision 1168)
+++ src/regexp-macro-assembler-irregexp-inl.h (working copy)
@@ -36,12 +36,15 @@
namespace v8 { namespace internal {
-void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte) {
+void RegExpMacroAssemblerIrregexp::Emit(uint32_t byte,
+ uint32_t twenty_four_bits) {
+ uint32_t word = ((twenty_four_bits << BYTECODE_SHIFT) | byte);
ASSERT(pc_ <= buffer_.length());
- if (pc_ == buffer_.length()) {
+ if (pc_ + 3 >= buffer_.length()) {
Expand();
}
- buffer_[pc_++] = byte;
+ *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word;
+ pc_ += 4;
}
@@ -50,7 +53,7 @@
if (pc_ + 1 >= buffer_.length()) {
Expand();
}
- Store16(buffer_.start() + pc_, word);
+ *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word;
pc_ += 2;
}
@@ -60,7 +63,7 @@
if (pc_ + 3 >= buffer_.length()) {
Expand();
}
- Store32(buffer_.start() + pc_, word);
+ *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word;
pc_ += 4;
}
« no previous file with comments | « src/regexp-macro-assembler-irregexp.cc ('k') | src/regexp-macro-assembler-tracer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698