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

Unified Diff: runtime/vm/assembler_arm.h

Issue 12224024: Generate first ARM assembler test and execute (simulate) it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « runtime/tests/vm/vm.status ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.h
===================================================================
--- runtime/vm/assembler_arm.h (revision 18199)
+++ runtime/vm/assembler_arm.h (working copy)
@@ -262,7 +262,11 @@
class Assembler : public ValueObject {
public:
- Assembler() : buffer_(), prologue_offset_(-1), comments_() { }
+ Assembler()
+ : buffer_(),
+ object_pool_(GrowableObjectArray::Handle(GrowableObjectArray::New())),
+ prologue_offset_(-1),
+ comments_() { }
~Assembler() { }
void PopRegister(Register r) { Pop(r); }
@@ -273,11 +277,16 @@
int CodeSize() const { return buffer_.Size(); }
int prologue_offset() const { return prologue_offset_; }
const ZoneGrowableArray<int>& GetPointerOffsets() const {
+ ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code.
return buffer_.pointer_offsets();
}
+ const GrowableObjectArray& object_pool() const {
+ return object_pool_;
+ }
void FinalizeInstructions(const MemoryRegion& region) {
buffer_.FinalizeInstructions(region);
+ ASSERT(object_pool_.Length() == 0); // TODO(regis): Otherwise, more work.
}
// Debugging and bringup support.
@@ -286,9 +295,7 @@
void Untested(const char* message);
void Unreachable(const char* message);
- static void InitializeMemoryWithBreakpoints(uword data, int length) {
- UNIMPLEMENTED();
- }
+ static void InitializeMemoryWithBreakpoints(uword data, int length);
void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
@@ -525,10 +532,13 @@
void Emit(int32_t value);
private:
- AssemblerBuffer buffer_;
- ZoneGrowableArray<int>* pointer_offsets_;
- int prologue_offset_;
+ AssemblerBuffer buffer_; // Contains position independent code.
+ const GrowableObjectArray& object_pool_; // Objects and jump targets.
+ int32_t prologue_offset_;
+ int32_t AddObject(const Object& obj);
+ int32_t AddExternalLabel(const ExternalLabel* label);
+
class CodeComment : public ZoneAllocated {
public:
CodeComment(intptr_t pc_offset, const String& comment)
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698