src/share/vm/shark/sharkIntrinsics.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7118863 Sdiff src/share/vm/shark

src/share/vm/shark/sharkIntrinsics.cpp

Print this page




 196   SharkValue *empty = state()->pop();
 197   assert(empty == NULL, "should be");
 198   Value *y = state()->pop()->jdouble_value();
 199   empty = state()->pop();
 200   assert(empty == NULL, "should be");
 201   Value *x = state()->pop()->jdouble_value();
 202 
 203   state()->push(
 204     SharkValue::create_jdouble(
 205       builder()->CreateCall2(function, x, y)));
 206   state()->push(NULL);
 207 }
 208 
 209 void SharkIntrinsics::do_Object_getClass() {
 210   Value *klass = builder()->CreateValueOfStructEntry(
 211     state()->pop()->jobject_value(),
 212     in_ByteSize(oopDesc::klass_offset_in_bytes()),
 213     SharkType::oop_type(),
 214     "klass");
 215 
 216   Value *klass_part = builder()->CreateAddressOfStructEntry(
 217     klass,
 218     in_ByteSize(klassOopDesc::klass_part_offset_in_bytes()),
 219     SharkType::klass_type(),
 220     "klass_part");
 221 
 222   state()->push(
 223     SharkValue::create_jobject(
 224       builder()->CreateValueOfStructEntry(
 225         klass_part,
 226         in_ByteSize(Klass::java_mirror_offset_in_bytes()),
 227         SharkType::oop_type(),
 228         "java_mirror"),
 229       true));
 230 }
 231 
 232 void SharkIntrinsics::do_System_currentTimeMillis() {
 233   state()->push(
 234     SharkValue::create_jlong(
 235       builder()->CreateCall(builder()->current_time_millis()),
 236       false));
 237   state()->push(NULL);
 238 }
 239 
 240 void SharkIntrinsics::do_Thread_currentThread() {
 241   state()->push(
 242     SharkValue::create_jobject(
 243       builder()->CreateValueOfStructEntry(
 244         thread(), JavaThread::threadObj_offset(),
 245         SharkType::oop_type(),




 196   SharkValue *empty = state()->pop();
 197   assert(empty == NULL, "should be");
 198   Value *y = state()->pop()->jdouble_value();
 199   empty = state()->pop();
 200   assert(empty == NULL, "should be");
 201   Value *x = state()->pop()->jdouble_value();
 202 
 203   state()->push(
 204     SharkValue::create_jdouble(
 205       builder()->CreateCall2(function, x, y)));
 206   state()->push(NULL);
 207 }
 208 
 209 void SharkIntrinsics::do_Object_getClass() {
 210   Value *klass = builder()->CreateValueOfStructEntry(
 211     state()->pop()->jobject_value(),
 212     in_ByteSize(oopDesc::klass_offset_in_bytes()),
 213     SharkType::oop_type(),
 214     "klass");
 215 






 216   state()->push(
 217     SharkValue::create_jobject(
 218       builder()->CreateValueOfStructEntry(
 219         klass,
 220         in_ByteSize(Klass::java_mirror_offset_in_bytes()),
 221         SharkType::oop_type(),
 222         "java_mirror"),
 223       true));
 224 }
 225 
 226 void SharkIntrinsics::do_System_currentTimeMillis() {
 227   state()->push(
 228     SharkValue::create_jlong(
 229       builder()->CreateCall(builder()->current_time_millis()),
 230       false));
 231   state()->push(NULL);
 232 }
 233 
 234 void SharkIntrinsics::do_Thread_currentThread() {
 235   state()->push(
 236     SharkValue::create_jobject(
 237       builder()->CreateValueOfStructEntry(
 238         thread(), JavaThread::threadObj_offset(),
 239         SharkType::oop_type(),


src/share/vm/shark/sharkIntrinsics.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File