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

Unified Diff: regexp2000/src/regexp-macro-assembler.cc

Issue 11271: Building on regexp-ia32. (Closed)
Patch Set: Made it compile correctly. 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: regexp2000/src/regexp-macro-assembler.cc
diff --git a/regexp2000/src/regexp-macro-assembler.cc b/regexp2000/src/regexp-macro-assembler.cc
index 9ee4d1eeed849a7d41d9a5616c9193d089bbf44a..14f6ddb8ed392e83b920cdfbb00380de56603da3 100755
--- a/regexp2000/src/regexp-macro-assembler.cc
+++ b/regexp2000/src/regexp-macro-assembler.cc
@@ -26,21 +26,29 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "v8.h"
+#include "ast.h"
+#include "assembler.h"
#include "regexp-macro-assembler.h"
namespace v8 { namespace internal {
+RegExpMacroAssembler::RegExpMacroAssembler() {
+}
+
+
+RegExpMacroAssembler::~RegExpMacroAssembler() {
+}
+
-ByteArrayProvider::ByteArrayProvider(int initial_size)
+ByteArrayProvider::ByteArrayProvider(unsigned int initial_size)
: byte_array_size_(initial_size),
- current_byte_array_(NULL),
+ current_byte_array_(),
current_byte_array_free_offset_(initial_size) {}
-template <typename T>
-ArraySlice<T> ByteArrayProvider::GetBuffer(int size) {
- ASSERT(sze > 0);
- size_t elem_size = sizeof(T);
+ArraySlice ByteArrayProvider::GetBuffer(unsigned int size,
+ unsigned int elem_size) {
+ ASSERT(size > 0);
size_t byte_size = size * elem_size;
int free_offset = current_byte_array_free_offset_;
// align elements
@@ -49,13 +57,13 @@ ArraySlice<T> ByteArrayProvider::GetBuffer(int size) {
if (free_offset + byte_size > byte_array_size_) {
if (byte_size > (byte_array_size_ / 2)) {
- Handle<ByteArray> solo_buffer = Factory::NewByteArray(byte_size, TENURED);
- return ArraySlice<T>(solo_buffer, 0);
+ Handle<ByteArray> solo_buffer(Factory::NewByteArray(byte_size, TENURED));
+ return ArraySlice(solo_buffer, 0);
}
current_byte_array_ = Factory::NewByteArray(byte_array_size_, TENURED);
free_offset = 0;
}
current_byte_array_free_offset_ = free_offset + size;
- return ArraySlice<T>(current_byte_array_, free_offset);
+ return ArraySlice(current_byte_array_, free_offset);
}
}}

Powered by Google App Engine
This is Rietveld 408576698