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

Side by Side Diff: src/assembler.h

Issue 7945009: Merge experimental/gc branch to the bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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 | « src/arm/stub-cache-arm.cc ('k') | src/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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 } 137 }
138 138
139 friend class Assembler; 139 friend class Assembler;
140 friend class RegexpAssembler; 140 friend class RegexpAssembler;
141 friend class Displacement; 141 friend class Displacement;
142 friend class RegExpMacroAssemblerIrregexp; 142 friend class RegExpMacroAssemblerIrregexp;
143 }; 143 };
144 144
145 145
146 enum SaveFPRegsMode { kDontSaveFPRegs, kSaveFPRegs };
147
148
146 // ----------------------------------------------------------------------------- 149 // -----------------------------------------------------------------------------
147 // Relocation information 150 // Relocation information
148 151
149 152
150 // Relocation information consists of the address (pc) of the datum 153 // Relocation information consists of the address (pc) of the datum
151 // to which the relocation information applies, the relocation mode 154 // to which the relocation information applies, the relocation mode
152 // (rmode), and an optional data field. The relocation mode may be 155 // (rmode), and an optional data field. The relocation mode may be
153 // "descriptive" and not indicate a need for relocation, but simply 156 // "descriptive" and not indicate a need for relocation, but simply
154 // describe a property of the datum. Such rmodes are useful for GC 157 // describe a property of the datum. Such rmodes are useful for GC
155 // and nice disassembly output. 158 // and nice disassembly output.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 NUMBER_OF_MODES, // There are at most 14 modes with noncompact encoding. 212 NUMBER_OF_MODES, // There are at most 14 modes with noncompact encoding.
210 NONE, // never recorded 213 NONE, // never recorded
211 LAST_CODE_ENUM = DEBUG_BREAK, 214 LAST_CODE_ENUM = DEBUG_BREAK,
212 LAST_GCED_ENUM = GLOBAL_PROPERTY_CELL, 215 LAST_GCED_ENUM = GLOBAL_PROPERTY_CELL,
213 // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding. 216 // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding.
214 LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID 217 LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID
215 }; 218 };
216 219
217 220
218 RelocInfo() {} 221 RelocInfo() {}
219 RelocInfo(byte* pc, Mode rmode, intptr_t data) 222
220 : pc_(pc), rmode_(rmode), data_(data) { 223 RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host)
224 : pc_(pc), rmode_(rmode), data_(data), host_(host) {
221 } 225 }
222 226
223 static inline bool IsConstructCall(Mode mode) { 227 static inline bool IsConstructCall(Mode mode) {
224 return mode == CONSTRUCT_CALL; 228 return mode == CONSTRUCT_CALL;
225 } 229 }
226 static inline bool IsCodeTarget(Mode mode) { 230 static inline bool IsCodeTarget(Mode mode) {
227 return mode <= LAST_CODE_ENUM; 231 return mode <= LAST_CODE_ENUM;
228 } 232 }
229 // Is the relocation mode affected by GC? 233 // Is the relocation mode affected by GC?
230 static inline bool IsGCRelocMode(Mode mode) { 234 static inline bool IsGCRelocMode(Mode mode) {
(...skipping 20 matching lines...) Expand all
251 static inline bool IsDebugBreakSlot(Mode mode) { 255 static inline bool IsDebugBreakSlot(Mode mode) {
252 return mode == DEBUG_BREAK_SLOT; 256 return mode == DEBUG_BREAK_SLOT;
253 } 257 }
254 static inline int ModeMask(Mode mode) { return 1 << mode; } 258 static inline int ModeMask(Mode mode) { return 1 << mode; }
255 259
256 // Accessors 260 // Accessors
257 byte* pc() const { return pc_; } 261 byte* pc() const { return pc_; }
258 void set_pc(byte* pc) { pc_ = pc; } 262 void set_pc(byte* pc) { pc_ = pc; }
259 Mode rmode() const { return rmode_; } 263 Mode rmode() const { return rmode_; }
260 intptr_t data() const { return data_; } 264 intptr_t data() const { return data_; }
265 Code* host() const { return host_; }
261 266
262 // Apply a relocation by delta bytes 267 // Apply a relocation by delta bytes
263 INLINE(void apply(intptr_t delta)); 268 INLINE(void apply(intptr_t delta));
264 269
265 // Is the pointer this relocation info refers to coded like a plain pointer 270 // Is the pointer this relocation info refers to coded like a plain pointer
266 // or is it strange in some way (eg relative or patched into a series of 271 // or is it strange in some way (eg relative or patched into a series of
267 // instructions). 272 // instructions).
268 bool IsCodedSpecially(); 273 bool IsCodedSpecially();
269 274
270 // Read/modify the code target in the branch/call instruction 275 // Read/modify the code target in the branch/call instruction
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 static const int kApplyMask; // Modes affected by apply. Depends on arch. 351 static const int kApplyMask; // Modes affected by apply. Depends on arch.
347 352
348 private: 353 private:
349 // On ARM, note that pc_ is the address of the constant pool entry 354 // On ARM, note that pc_ is the address of the constant pool entry
350 // to be relocated and not the address of the instruction 355 // to be relocated and not the address of the instruction
351 // referencing the constant pool entry (except when rmode_ == 356 // referencing the constant pool entry (except when rmode_ ==
352 // comment). 357 // comment).
353 byte* pc_; 358 byte* pc_;
354 Mode rmode_; 359 Mode rmode_;
355 intptr_t data_; 360 intptr_t data_;
361 Code* host_;
356 #ifdef V8_TARGET_ARCH_MIPS 362 #ifdef V8_TARGET_ARCH_MIPS
357 // Code and Embedded Object pointers in mips are stored split 363 // Code and Embedded Object pointers in mips are stored split
358 // across two consecutive 32-bit instructions. Heap management 364 // across two consecutive 32-bit instructions. Heap management
359 // routines expect to access these pointers indirectly. The following 365 // routines expect to access these pointers indirectly. The following
360 // location provides a place for these pointers to exist natually 366 // location provides a place for these pointers to exist natually
361 // when accessed via the Iterator. 367 // when accessed via the Iterator.
362 Object *reconstructed_obj_ptr_; 368 Object *reconstructed_obj_ptr_;
363 // External-reference pointers are also split across instruction-pairs 369 // External-reference pointers are also split across instruction-pairs
364 // in mips, but are accessed via indirect pointers. This location 370 // in mips, but are accessed via indirect pointers. This location
365 // provides a place for that pointer to exist naturally. Its address 371 // provides a place for that pointer to exist naturally. Its address
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 560
555 explicit ExternalReference(const SCTableReference& table_ref); 561 explicit ExternalReference(const SCTableReference& table_ref);
556 562
557 // Isolate::Current() as an external reference. 563 // Isolate::Current() as an external reference.
558 static ExternalReference isolate_address(); 564 static ExternalReference isolate_address();
559 565
560 // One-of-a-kind references. These references are not part of a general 566 // One-of-a-kind references. These references are not part of a general
561 // pattern. This means that they have to be added to the 567 // pattern. This means that they have to be added to the
562 // ExternalReferenceTable in serialize.cc manually. 568 // ExternalReferenceTable in serialize.cc manually.
563 569
570 static ExternalReference incremental_marking_record_write_function(
571 Isolate* isolate);
572 static ExternalReference incremental_evacuation_record_write_function(
573 Isolate* isolate);
574 static ExternalReference store_buffer_overflow_function(
575 Isolate* isolate);
564 static ExternalReference flush_icache_function(Isolate* isolate); 576 static ExternalReference flush_icache_function(Isolate* isolate);
565 static ExternalReference perform_gc_function(Isolate* isolate); 577 static ExternalReference perform_gc_function(Isolate* isolate);
566 static ExternalReference fill_heap_number_with_random_function( 578 static ExternalReference fill_heap_number_with_random_function(
567 Isolate* isolate); 579 Isolate* isolate);
568 static ExternalReference random_uint32_function(Isolate* isolate); 580 static ExternalReference random_uint32_function(Isolate* isolate);
569 static ExternalReference transcendental_cache_array_address(Isolate* isolate); 581 static ExternalReference transcendental_cache_array_address(Isolate* isolate);
570 static ExternalReference delete_handle_scope_extensions(Isolate* isolate); 582 static ExternalReference delete_handle_scope_extensions(Isolate* isolate);
571 583
572 // Deoptimization support. 584 // Deoptimization support.
573 static ExternalReference new_deoptimizer_function(Isolate* isolate); 585 static ExternalReference new_deoptimizer_function(Isolate* isolate);
(...skipping 26 matching lines...) Expand all
600 static ExternalReference address_of_static_offsets_vector(Isolate* isolate); 612 static ExternalReference address_of_static_offsets_vector(Isolate* isolate);
601 static ExternalReference address_of_regexp_stack_memory_address( 613 static ExternalReference address_of_regexp_stack_memory_address(
602 Isolate* isolate); 614 Isolate* isolate);
603 static ExternalReference address_of_regexp_stack_memory_size( 615 static ExternalReference address_of_regexp_stack_memory_size(
604 Isolate* isolate); 616 Isolate* isolate);
605 617
606 // Static variable Heap::NewSpaceStart() 618 // Static variable Heap::NewSpaceStart()
607 static ExternalReference new_space_start(Isolate* isolate); 619 static ExternalReference new_space_start(Isolate* isolate);
608 static ExternalReference new_space_mask(Isolate* isolate); 620 static ExternalReference new_space_mask(Isolate* isolate);
609 static ExternalReference heap_always_allocate_scope_depth(Isolate* isolate); 621 static ExternalReference heap_always_allocate_scope_depth(Isolate* isolate);
622 static ExternalReference new_space_mark_bits(Isolate* isolate);
623
624 // Write barrier.
625 static ExternalReference store_buffer_top(Isolate* isolate);
610 626
611 // Used for fast allocation in generated code. 627 // Used for fast allocation in generated code.
612 static ExternalReference new_space_allocation_top_address(Isolate* isolate); 628 static ExternalReference new_space_allocation_top_address(Isolate* isolate);
613 static ExternalReference new_space_allocation_limit_address(Isolate* isolate); 629 static ExternalReference new_space_allocation_limit_address(Isolate* isolate);
614 630
615 static ExternalReference double_fp_operation(Token::Value operation, 631 static ExternalReference double_fp_operation(Token::Value operation,
616 Isolate* isolate); 632 Isolate* isolate);
617 static ExternalReference compare_doubles(Isolate* isolate); 633 static ExternalReference compare_doubles(Isolate* isolate);
618 static ExternalReference power_double_double_function(Isolate* isolate); 634 static ExternalReference power_double_double_function(Isolate* isolate);
619 static ExternalReference power_double_int_function(Isolate* isolate); 635 static ExternalReference power_double_int_function(Isolate* isolate);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 public: 872 public:
857 NullCallWrapper() { } 873 NullCallWrapper() { }
858 virtual ~NullCallWrapper() { } 874 virtual ~NullCallWrapper() { }
859 virtual void BeforeCall(int call_size) const { } 875 virtual void BeforeCall(int call_size) const { }
860 virtual void AfterCall() const { } 876 virtual void AfterCall() const { }
861 }; 877 };
862 878
863 } } // namespace v8::internal 879 } } // namespace v8::internal
864 880
865 #endif // V8_ASSEMBLER_H_ 881 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698