336 private: 337 static bool _is_initialized; 338 static const char* _name [number_of_codes]; 339 static BasicType _result_type [number_of_codes]; 340 static s_char _depth [number_of_codes]; 341 static u_char _lengths [number_of_codes]; 342 static Code _java_code [number_of_codes]; 343 static jchar _flags [(1<<BitsPerByte)*2]; // all second page for wide formats 344 345 static void def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap); 346 static void def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap, Code java_code); 347 348 // Verify that bcp points into method 349 #ifdef ASSERT 350 static bool check_method(const Method* method, address bcp); 351 #endif 352 static bool check_must_rewrite(Bytecodes::Code bc); 353 354 public: 355 // Conversion 356 static void check (Code code) { assert(is_defined(code), err_msg("illegal code: %d", (int)code)); } 357 static void wide_check (Code code) { assert(wide_is_defined(code), err_msg("illegal code: %d", (int)code)); } 358 static Code cast (int code) { return (Code)code; } 359 360 361 // Fetch a bytecode, hiding breakpoints as necessary. The method 362 // argument is used for conversion of breakpoints into the original 363 // bytecode. The CI uses these methods but guarantees that 364 // breakpoints are hidden so the method argument should be passed as 365 // NULL since in that case the bcp and Method* are unrelated 366 // memory. 367 static Code code_at(const Method* method, address bcp) { 368 assert(method == NULL || check_method(method, bcp), "bcp must point into method"); 369 Code code = cast(*bcp); 370 assert(code != _breakpoint || method != NULL, "need Method* to decode breakpoint"); 371 return (code != _breakpoint) ? code : non_breakpoint_code_at(method, bcp); 372 } 373 static Code java_code_at(const Method* method, address bcp) { 374 return java_code(code_at(method, bcp)); 375 } 376 377 // Fetch a bytecode or a breakpoint: | 336 private: 337 static bool _is_initialized; 338 static const char* _name [number_of_codes]; 339 static BasicType _result_type [number_of_codes]; 340 static s_char _depth [number_of_codes]; 341 static u_char _lengths [number_of_codes]; 342 static Code _java_code [number_of_codes]; 343 static jchar _flags [(1<<BitsPerByte)*2]; // all second page for wide formats 344 345 static void def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap); 346 static void def(Code code, const char* name, const char* format, const char* wide_format, BasicType result_type, int depth, bool can_trap, Code java_code); 347 348 // Verify that bcp points into method 349 #ifdef ASSERT 350 static bool check_method(const Method* method, address bcp); 351 #endif 352 static bool check_must_rewrite(Bytecodes::Code bc); 353 354 public: 355 // Conversion 356 static void check (Code code) { assert(is_defined(code), "illegal code: %d", (int)code); } 357 static void wide_check (Code code) { assert(wide_is_defined(code), "illegal code: %d", (int)code); } 358 static Code cast (int code) { return (Code)code; } 359 360 361 // Fetch a bytecode, hiding breakpoints as necessary. The method 362 // argument is used for conversion of breakpoints into the original 363 // bytecode. The CI uses these methods but guarantees that 364 // breakpoints are hidden so the method argument should be passed as 365 // NULL since in that case the bcp and Method* are unrelated 366 // memory. 367 static Code code_at(const Method* method, address bcp) { 368 assert(method == NULL || check_method(method, bcp), "bcp must point into method"); 369 Code code = cast(*bcp); 370 assert(code != _breakpoint || method != NULL, "need Method* to decode breakpoint"); 371 return (code != _breakpoint) ? code : non_breakpoint_code_at(method, bcp); 372 } 373 static Code java_code_at(const Method* method, address bcp) { 374 return java_code(code_at(method, bcp)); 375 } 376 377 // Fetch a bytecode or a breakpoint: |