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

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

Issue 1073173003: Eliminate object table and use regular object pool for deoptimization infos. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_mips.h » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_IA32_H_ 5 #ifndef VM_ASSEMBLER_IA32_H_
6 #define VM_ASSEMBLER_IA32_H_ 6 #define VM_ASSEMBLER_IA32_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_ia32.h directly; use assembler.h instead. 9 #error Do not include assembler_ia32.h directly; use assembler.h instead.
10 #endif 10 #endif
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 friend class Assembler; 296 friend class Assembler;
297 DISALLOW_COPY_AND_ASSIGN(Label); 297 DISALLOW_COPY_AND_ASSIGN(Label);
298 }; 298 };
299 299
300 300
301 class Assembler : public ValueObject { 301 class Assembler : public ValueObject {
302 public: 302 public:
303 explicit Assembler(bool use_far_branches = false) 303 explicit Assembler(bool use_far_branches = false)
304 : buffer_(), 304 : buffer_(),
305 object_pool_(GrowableObjectArray::Handle()),
306 prologue_offset_(-1), 305 prologue_offset_(-1),
307 jit_cookie_(0), 306 jit_cookie_(0),
308 comments_() { 307 comments_() {
309 // This mode is only needed and implemented for MIPS and ARM. 308 // This mode is only needed and implemented for MIPS and ARM.
310 ASSERT(!use_far_branches); 309 ASSERT(!use_far_branches);
311 } 310 }
312 ~Assembler() { } 311 ~Assembler() { }
313 312
314 static const bool kNearJump = true; 313 static const bool kNearJump = true;
315 static const bool kFarJump = false; 314 static const bool kFarJump = false;
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 intptr_t prologue_offset() const { return prologue_offset_; } 793 intptr_t prologue_offset() const { return prologue_offset_; }
795 794
796 // Count the fixups that produce a pointer offset, without processing 795 // Count the fixups that produce a pointer offset, without processing
797 // the fixups. 796 // the fixups.
798 intptr_t CountPointerOffsets() const { 797 intptr_t CountPointerOffsets() const {
799 return buffer_.CountPointerOffsets(); 798 return buffer_.CountPointerOffsets();
800 } 799 }
801 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { 800 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
802 return buffer_.pointer_offsets(); 801 return buffer_.pointer_offsets();
803 } 802 }
804 const GrowableObjectArray& object_pool() const { return object_pool_; } 803
804 const GrowableObjectArray& object_pool_data() const {
805 return object_pool_.data();
806 }
807
808 ObjectPool& object_pool() { return object_pool_; }
805 809
806 void FinalizeInstructions(const MemoryRegion& region) { 810 void FinalizeInstructions(const MemoryRegion& region) {
807 buffer_.FinalizeInstructions(region); 811 buffer_.FinalizeInstructions(region);
808 } 812 }
809 813
810 // Set up a Dart frame on entry with a frame pointer and PC information to 814 // Set up a Dart frame on entry with a frame pointer and PC information to
811 // enable easy access to the RawInstruction object of code corresponding 815 // enable easy access to the RawInstruction object of code corresponding
812 // to this frame. 816 // to this frame.
813 // The dart frame layout is as follows: 817 // The dart frame layout is as follows:
814 // .... 818 // ....
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 // in DEBUG mode, verifies that 'address' has content of type 'old_content'. 979 // in DEBUG mode, verifies that 'address' has content of type 'old_content'.
976 void VerifyHeapWord(const Address& address, FieldContent old_content); 980 void VerifyHeapWord(const Address& address, FieldContent old_content);
977 void VerifiedWrite(const Address& dest, 981 void VerifiedWrite(const Address& dest,
978 Register value, 982 Register value,
979 FieldContent old_content); 983 FieldContent old_content);
980 void UnverifiedStoreOldObject(const Address& dest, const Object& value); 984 void UnverifiedStoreOldObject(const Address& dest, const Object& value);
981 985
982 int32_t jit_cookie(); 986 int32_t jit_cookie();
983 987
984 AssemblerBuffer buffer_; 988 AssemblerBuffer buffer_;
985 GrowableObjectArray& object_pool_; // Object pool is not used on ia32. 989 ObjectPool object_pool_;
986 intptr_t prologue_offset_; 990 intptr_t prologue_offset_;
987 int32_t jit_cookie_; 991 int32_t jit_cookie_;
988 GrowableArray<CodeComment*> comments_; 992 GrowableArray<CodeComment*> comments_;
989 993
990 DISALLOW_ALLOCATION(); 994 DISALLOW_ALLOCATION();
991 DISALLOW_COPY_AND_ASSIGN(Assembler); 995 DISALLOW_COPY_AND_ASSIGN(Assembler);
992 }; 996 };
993 997
994 998
995 inline void Assembler::EmitUint8(uint8_t value) { 999 inline void Assembler::EmitUint8(uint8_t value) {
(...skipping 22 matching lines...) Expand all
1018 } 1022 }
1019 1023
1020 1024
1021 inline void Assembler::EmitOperandSizeOverride() { 1025 inline void Assembler::EmitOperandSizeOverride() {
1022 EmitUint8(0x66); 1026 EmitUint8(0x66);
1023 } 1027 }
1024 1028
1025 } // namespace dart 1029 } // namespace dart
1026 1030
1027 #endif // VM_ASSEMBLER_IA32_H_ 1031 #endif // VM_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698