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

Side by Side Diff: src/regexp-macro-assembler.h

Issue 12429: Old gcc on ARM can't cope with template stuff we weren't using anyway. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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 | « no previous file | src/regexp-macro-assembler.cc » ('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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 public: 141 public:
142 ArraySlice(Handle<ByteArray> array, size_t offset) 142 ArraySlice(Handle<ByteArray> array, size_t offset)
143 : array_(array), offset_(offset) {} 143 : array_(array), offset_(offset) {}
144 Handle<ByteArray> array() { return array_; } 144 Handle<ByteArray> array() { return array_; }
145 // Offset in the byte array data. 145 // Offset in the byte array data.
146 size_t offset() { return offset_; } 146 size_t offset() { return offset_; }
147 // Offset from the ByteArray pointer. 147 // Offset from the ByteArray pointer.
148 size_t base_offset() { 148 size_t base_offset() {
149 return ByteArray::kHeaderSize - kHeapObjectTag + offset_; 149 return ByteArray::kHeaderSize - kHeapObjectTag + offset_;
150 } 150 }
151 template <typename T> 151 void* location() {
152 T* location() { 152 return reinterpret_cast<void*>(array_->GetDataStartAddress() + offset_);
153 return reinterpret_cast<T*>(array_->GetDataStartAddress() + offset_);
154 } 153 }
155 template <typename T> 154 template <typename T>
156 T& at(int idx) { 155 T& at(int idx) {
157 return reinterpret_cast<T*>(array_->GetDataStartAddress() + offset_)[idx]; 156 return reinterpret_cast<T*>(array_->GetDataStartAddress() + offset_)[idx];
158 } 157 }
159 private: 158 private:
160 Handle<ByteArray> array_; 159 Handle<ByteArray> array_;
161 size_t offset_; 160 size_t offset_;
162 }; 161 };
163 162
(...skipping 10 matching lines...) Expand all
174 ArraySlice GetBuffer(Vector<T> values); 173 ArraySlice GetBuffer(Vector<T> values);
175 private: 174 private:
176 size_t byte_array_size_; 175 size_t byte_array_size_;
177 Handle<ByteArray> current_byte_array_; 176 Handle<ByteArray> current_byte_array_;
178 int current_byte_array_free_offset_; 177 int current_byte_array_free_offset_;
179 }; 178 };
180 179
181 } } // namespace v8::internal 180 } } // namespace v8::internal
182 181
183 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_ 182 #endif // V8_REGEXP_MACRO_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/regexp-macro-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698