33 //
34 // For CompiledIC's:
35 //
36 // In cases where we do not have MT-safe state transformation,
37 // we go to a transition state, using ICStubs. At a safepoint,
38 // the inline caches are transferred from the transitional code:
39 //
40 // instruction_address --> 01 set xxx_oop, Ginline_cache_klass
41 // 23 jump_to Gtemp, yyyy
42 // 4 nop
43
44 class ICStub: public Stub {
45 private:
46 int _size; // total size of the stub incl. code
47 address _ic_site; // points at call instruction of owning ic-buffer
48 /* stub code follows here */
49 protected:
50 friend class ICStubInterface;
51 // This will be called only by ICStubInterface
52 void initialize(int size,
53 CodeComments comments) { _size = size; _ic_site = NULL; }
54 void finalize(); // called when a method is removed
55
56 // General info
57 int size() const { return _size; }
58 static int code_size_to_size(int code_size) { return round_to(sizeof(ICStub), CodeEntryAlignment) + code_size; }
59
60 public:
61 // Creation
62 void set_stub(CompiledIC *ic, void* cached_value, address dest_addr);
63
64 // Code info
65 address code_begin() const { return (address)this + round_to(sizeof(ICStub), CodeEntryAlignment); }
66 address code_end() const { return (address)this + size(); }
67
68 // Call site info
69 address ic_site() const { return _ic_site; }
70 void clear();
71 bool is_empty() const { return _ic_site == NULL; }
72
73 // stub info
|
33 //
34 // For CompiledIC's:
35 //
36 // In cases where we do not have MT-safe state transformation,
37 // we go to a transition state, using ICStubs. At a safepoint,
38 // the inline caches are transferred from the transitional code:
39 //
40 // instruction_address --> 01 set xxx_oop, Ginline_cache_klass
41 // 23 jump_to Gtemp, yyyy
42 // 4 nop
43
44 class ICStub: public Stub {
45 private:
46 int _size; // total size of the stub incl. code
47 address _ic_site; // points at call instruction of owning ic-buffer
48 /* stub code follows here */
49 protected:
50 friend class ICStubInterface;
51 // This will be called only by ICStubInterface
52 void initialize(int size,
53 CodeStrings strings) { _size = size; _ic_site = NULL; }
54 void finalize(); // called when a method is removed
55
56 // General info
57 int size() const { return _size; }
58 static int code_size_to_size(int code_size) { return round_to(sizeof(ICStub), CodeEntryAlignment) + code_size; }
59
60 public:
61 // Creation
62 void set_stub(CompiledIC *ic, void* cached_value, address dest_addr);
63
64 // Code info
65 address code_begin() const { return (address)this + round_to(sizeof(ICStub), CodeEntryAlignment); }
66 address code_end() const { return (address)this + size(); }
67
68 // Call site info
69 address ic_site() const { return _ic_site; }
70 void clear();
71 bool is_empty() const { return _ic_site == NULL; }
72
73 // stub info
|