| OLD | NEW |
| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 static const int kMaxSmallPCDelta; | 247 static const int kMaxSmallPCDelta; |
| 248 | 248 |
| 249 enum Mode { | 249 enum Mode { |
| 250 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). | 250 // Please note the order is important (see IsCodeTarget, IsGCRelocMode). |
| 251 CODE_TARGET, // Code target which is not any of the above. | 251 CODE_TARGET, // Code target which is not any of the above. |
| 252 CODE_TARGET_WITH_ID, | 252 CODE_TARGET_WITH_ID, |
| 253 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. | 253 CONSTRUCT_CALL, // code target that is a call to a JavaScript constructor. |
| 254 CODE_TARGET_CONTEXT, // Code target used for contextual loads and stores. | 254 CODE_TARGET_CONTEXT, // Code target used for contextual loads and stores. |
| 255 DEBUG_BREAK, // Code target for the debugger statement. | 255 DEBUG_BREAK, // Code target for the debugger statement. |
| 256 EMBEDDED_OBJECT, | 256 EMBEDDED_OBJECT, |
| 257 GLOBAL_PROPERTY_CELL, | 257 CELL, |
| 258 | 258 |
| 259 // Everything after runtime_entry (inclusive) is not GC'ed. | 259 // Everything after runtime_entry (inclusive) is not GC'ed. |
| 260 RUNTIME_ENTRY, | 260 RUNTIME_ENTRY, |
| 261 JS_RETURN, // Marks start of the ExitJSFrame code. | 261 JS_RETURN, // Marks start of the ExitJSFrame code. |
| 262 COMMENT, | 262 COMMENT, |
| 263 POSITION, // See comment for kNoPosition above. | 263 POSITION, // See comment for kNoPosition above. |
| 264 STATEMENT_POSITION, // See comment for kNoPosition above. | 264 STATEMENT_POSITION, // See comment for kNoPosition above. |
| 265 DEBUG_BREAK_SLOT, // Additional code inserted for debug break slot. | 265 DEBUG_BREAK_SLOT, // Additional code inserted for debug break slot. |
| 266 EXTERNAL_REFERENCE, // The address of an external C++ function. | 266 EXTERNAL_REFERENCE, // The address of an external C++ function. |
| 267 INTERNAL_REFERENCE, // An address inside the same function. | 267 INTERNAL_REFERENCE, // An address inside the same function. |
| 268 | 268 |
| 269 // Marks a constant pool. Only used on ARM. | 269 // Marks a constant pool. Only used on ARM. |
| 270 // It uses a custom noncompact encoding. | 270 // It uses a custom noncompact encoding. |
| 271 CONST_POOL, | 271 CONST_POOL, |
| 272 | 272 |
| 273 // add more as needed | 273 // add more as needed |
| 274 // Pseudo-types | 274 // Pseudo-types |
| 275 NUMBER_OF_MODES, // There are at most 15 modes with noncompact encoding. | 275 NUMBER_OF_MODES, // There are at most 15 modes with noncompact encoding. |
| 276 NONE32, // never recorded 32-bit value | 276 NONE32, // never recorded 32-bit value |
| 277 NONE64, // never recorded 64-bit value | 277 NONE64, // never recorded 64-bit value |
| 278 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by | 278 CODE_AGE_SEQUENCE, // Not stored in RelocInfo array, used explictly by |
| 279 // code aging. | 279 // code aging. |
| 280 FIRST_REAL_RELOC_MODE = CODE_TARGET, | 280 FIRST_REAL_RELOC_MODE = CODE_TARGET, |
| 281 LAST_REAL_RELOC_MODE = CONST_POOL, | 281 LAST_REAL_RELOC_MODE = CONST_POOL, |
| 282 FIRST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, | 282 FIRST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, |
| 283 LAST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, | 283 LAST_PSEUDO_RELOC_MODE = CODE_AGE_SEQUENCE, |
| 284 LAST_CODE_ENUM = DEBUG_BREAK, | 284 LAST_CODE_ENUM = DEBUG_BREAK, |
| 285 LAST_GCED_ENUM = GLOBAL_PROPERTY_CELL, | 285 LAST_GCED_ENUM = CELL, |
| 286 // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding. | 286 // Modes <= LAST_COMPACT_ENUM are guaranteed to have compact encoding. |
| 287 LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID, | 287 LAST_COMPACT_ENUM = CODE_TARGET_WITH_ID, |
| 288 LAST_STANDARD_NONCOMPACT_ENUM = INTERNAL_REFERENCE | 288 LAST_STANDARD_NONCOMPACT_ENUM = INTERNAL_REFERENCE |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 | 291 |
| 292 RelocInfo() {} | 292 RelocInfo() {} |
| 293 | 293 |
| 294 RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host) | 294 RelocInfo(byte* pc, Mode rmode, intptr_t data, Code* host) |
| 295 : pc_(pc), rmode_(rmode), data_(data), host_(host) { | 295 : pc_(pc), rmode_(rmode), data_(data), host_(host) { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); | 379 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
| 380 INLINE(Object* target_object()); | 380 INLINE(Object* target_object()); |
| 381 INLINE(Handle<Object> target_object_handle(Assembler* origin)); | 381 INLINE(Handle<Object> target_object_handle(Assembler* origin)); |
| 382 INLINE(Object** target_object_address()); | 382 INLINE(Object** target_object_address()); |
| 383 INLINE(void set_target_object(Object* target, | 383 INLINE(void set_target_object(Object* target, |
| 384 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); | 384 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
| 385 INLINE(Address target_runtime_entry(Assembler* origin)); | 385 INLINE(Address target_runtime_entry(Assembler* origin)); |
| 386 INLINE(void set_target_runtime_entry(Address target, | 386 INLINE(void set_target_runtime_entry(Address target, |
| 387 WriteBarrierMode mode = | 387 WriteBarrierMode mode = |
| 388 UPDATE_WRITE_BARRIER)); | 388 UPDATE_WRITE_BARRIER)); |
| 389 INLINE(JSGlobalPropertyCell* target_cell()); | 389 INLINE(Cell* target_cell()); |
| 390 INLINE(Handle<JSGlobalPropertyCell> target_cell_handle()); | 390 INLINE(Handle<Cell> target_cell_handle()); |
| 391 INLINE(void set_target_cell(JSGlobalPropertyCell* cell, | 391 INLINE(void set_target_cell(Cell* cell, |
| 392 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); | 392 WriteBarrierMode mode = UPDATE_WRITE_BARRIER)); |
| 393 INLINE(Code* code_age_stub()); | 393 INLINE(Code* code_age_stub()); |
| 394 INLINE(void set_code_age_stub(Code* stub)); | 394 INLINE(void set_code_age_stub(Code* stub)); |
| 395 | 395 |
| 396 // Read the address of the word containing the target_address in an | 396 // Read the address of the word containing the target_address in an |
| 397 // instruction stream. What this means exactly is architecture-independent. | 397 // instruction stream. What this means exactly is architecture-independent. |
| 398 // The only architecture-independent user of this function is the serializer. | 398 // The only architecture-independent user of this function is the serializer. |
| 399 // The serializer uses it to find out how many raw bytes of instruction to | 399 // The serializer uses it to find out how many raw bytes of instruction to |
| 400 // output before the next target. Architecture-independent code shouldn't | 400 // output before the next target. Architecture-independent code shouldn't |
| 401 // dereference the pointer it gets back from this. | 401 // dereference the pointer it gets back from this. |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 public: | 1041 public: |
| 1042 NullCallWrapper() { } | 1042 NullCallWrapper() { } |
| 1043 virtual ~NullCallWrapper() { } | 1043 virtual ~NullCallWrapper() { } |
| 1044 virtual void BeforeCall(int call_size) const { } | 1044 virtual void BeforeCall(int call_size) const { } |
| 1045 virtual void AfterCall() const { } | 1045 virtual void AfterCall() const { } |
| 1046 }; | 1046 }; |
| 1047 | 1047 |
| 1048 } } // namespace v8::internal | 1048 } } // namespace v8::internal |
| 1049 | 1049 |
| 1050 #endif // V8_ASSEMBLER_H_ | 1050 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |