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

Side by Side Diff: runtime/vm/assembler.h

Issue 306483005: - Use isolate where it is appropriate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32_test.cc » ('j') | runtime/vm/parser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ASSEMBLER_H_ 5 #ifndef VM_ASSEMBLER_H_
6 #define VM_ASSEMBLER_H_ 6 #define VM_ASSEMBLER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/globals.h" 10 #include "vm/globals.h"
(...skipping 12 matching lines...) Expand all
23 class Assembler; 23 class Assembler;
24 class AssemblerFixup; 24 class AssemblerFixup;
25 class AssemblerBuffer; 25 class AssemblerBuffer;
26 class MemoryRegion; 26 class MemoryRegion;
27 27
28 28
29 // External labels keep a function pointer to allow them 29 // External labels keep a function pointer to allow them
30 // to be called from code generated by the assembler. 30 // to be called from code generated by the assembler.
31 class ExternalLabel : public ValueObject { 31 class ExternalLabel : public ValueObject {
32 public: 32 public:
33 ExternalLabel(const char* name, uword address) 33 explicit ExternalLabel(uword address) : address_(address) {}
34 : name_(name), address_(address) {
35 ASSERT(name != NULL);
36 }
37 34
38 const char* name() const { return name_; }
39 bool is_resolved() const { return address_ != 0; } 35 bool is_resolved() const { return address_ != 0; }
40 uword address() const { 36 uword address() const {
41 ASSERT(is_resolved()); 37 ASSERT(is_resolved());
42 return address_; 38 return address_;
43 } 39 }
44 40
45 private: 41 private:
46 const char* name_;
47 const uword address_; 42 const uword address_;
48 }; 43 };
49 44
50 45
51 // Assembler fixups are positions in generated code that hold relocation 46 // Assembler fixups are positions in generated code that hold relocation
52 // information that needs to be processed before finalizing the code 47 // information that needs to be processed before finalizing the code
53 // into executable memory. 48 // into executable memory.
54 class AssemblerFixup : public ZoneAllocated { 49 class AssemblerFixup : public ZoneAllocated {
55 public: 50 public:
56 virtual void Process(const MemoryRegion& region, intptr_t position) = 0; 51 virtual void Process(const MemoryRegion& region, intptr_t position) = 0;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 #include "vm/assembler_arm.h" 216 #include "vm/assembler_arm.h"
222 #elif defined(TARGET_ARCH_ARM64) 217 #elif defined(TARGET_ARCH_ARM64)
223 #include "vm/assembler_arm64.h" 218 #include "vm/assembler_arm64.h"
224 #elif defined(TARGET_ARCH_MIPS) 219 #elif defined(TARGET_ARCH_MIPS)
225 #include "vm/assembler_mips.h" 220 #include "vm/assembler_mips.h"
226 #else 221 #else
227 #error Unknown architecture. 222 #error Unknown architecture.
228 #endif 223 #endif
229 224
230 #endif // VM_ASSEMBLER_H_ 225 #endif // VM_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32_test.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698