src/share/vm/opto/parseHelper.cpp

changeset 4037
da91efe96a93
parent 3450
9a28ddfc1f4a
child 4115
e626685e9f6c
     1.1 --- a/src/share/vm/opto/parseHelper.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/share/vm/opto/parseHelper.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -46,7 +46,7 @@
    1.11    Node* thread = _gvn.transform( new (C, 1) ThreadLocalNode() );
    1.12  
    1.13    // Get method
    1.14 -  const TypeInstPtr* method_type = TypeInstPtr::make(TypePtr::Constant, method->klass(), true, method, 0);
    1.15 +  const TypePtr* method_type = TypeMetadataPtr::make(method);
    1.16    Node *method_node = _gvn.transform( ConNode::make(C, method_type) );
    1.17  
    1.18    kill_dead_locals();
    1.19 @@ -220,7 +220,7 @@
    1.20    _gvn.set_type(merge, Type::CONTROL);
    1.21    Node* kls = makecon(TypeKlassPtr::make(klass));
    1.22  
    1.23 -  Node* init_thread_offset = _gvn.MakeConX(in_bytes(instanceKlass::init_thread_offset()));
    1.24 +  Node* init_thread_offset = _gvn.MakeConX(in_bytes(InstanceKlass::init_thread_offset()));
    1.25    Node* adr_node = basic_plus_adr(kls, kls, init_thread_offset);
    1.26    Node* init_thread = make_load(NULL, adr_node, TypeRawPtr::BOTTOM, T_ADDRESS);
    1.27    Node *tst   = Bool( CmpP( init_thread, cur_thread), BoolTest::eq);
    1.28 @@ -228,12 +228,12 @@
    1.29    set_control(IfTrue(iff));
    1.30    merge->set_req(1, IfFalse(iff));
    1.31  
    1.32 -  Node* init_state_offset = _gvn.MakeConX(in_bytes(instanceKlass::init_state_offset()));
    1.33 +  Node* init_state_offset = _gvn.MakeConX(in_bytes(InstanceKlass::init_state_offset()));
    1.34    adr_node = basic_plus_adr(kls, kls, init_state_offset);
    1.35 -  // Use T_BOOLEAN for instanceKlass::_init_state so the compiler
    1.36 +  // Use T_BOOLEAN for InstanceKlass::_init_state so the compiler
    1.37    // can generate code to load it as unsigned byte.
    1.38    Node* init_state = make_load(NULL, adr_node, TypeInt::UBYTE, T_BOOLEAN);
    1.39 -  Node* being_init = _gvn.intcon(instanceKlass::being_initialized);
    1.40 +  Node* being_init = _gvn.intcon(InstanceKlass::being_initialized);
    1.41    tst   = Bool( CmpI( init_state, being_init), BoolTest::eq);
    1.42    iff = create_and_map_if(control(), tst, PROB_ALWAYS, COUNT_UNKNOWN);
    1.43    set_control(IfTrue(iff));
    1.44 @@ -336,13 +336,13 @@
    1.45  void Parse::increment_and_test_invocation_counter(int limit) {
    1.46    if (!count_invocations()) return;
    1.47  
    1.48 -  // Get the methodOop node.
    1.49 -  const TypePtr* adr_type = TypeOopPtr::make_from_constant(method());
    1.50 -  Node *methodOop_node = makecon(adr_type);
    1.51 +  // Get the Method* node.
    1.52 +  const TypePtr* adr_type = TypeMetadataPtr::make(method());
    1.53 +  Node *method_node = makecon(adr_type);
    1.54  
    1.55 -  // Load the interpreter_invocation_counter from the methodOop.
    1.56 -  int offset = methodOopDesc::interpreter_invocation_counter_offset_in_bytes();
    1.57 -  Node* adr_node = basic_plus_adr(methodOop_node, methodOop_node, offset);
    1.58 +  // Load the interpreter_invocation_counter from the Method*.
    1.59 +  int offset = Method::interpreter_invocation_counter_offset_in_bytes();
    1.60 +  Node* adr_node = basic_plus_adr(method_node, method_node, offset);
    1.61    Node* cnt = make_load(NULL, adr_node, TypeInt::INT, T_INT, adr_type);
    1.62  
    1.63    test_counter_against_threshold(cnt, limit);
    1.64 @@ -354,8 +354,8 @@
    1.65  
    1.66  //----------------------------method_data_addressing---------------------------
    1.67  Node* Parse::method_data_addressing(ciMethodData* md, ciProfileData* data, ByteSize counter_offset, Node* idx, uint stride) {
    1.68 -  // Get offset within methodDataOop of the data array
    1.69 -  ByteSize data_offset = methodDataOopDesc::data_offset();
    1.70 +  // Get offset within MethodData* of the data array
    1.71 +  ByteSize data_offset = MethodData::data_offset();
    1.72  
    1.73    // Get cell offset of the ProfileData within data array
    1.74    int cell_offset = md->dp_to_di(data->dp());
    1.75 @@ -363,7 +363,7 @@
    1.76    // Add in counter_offset, the # of bytes into the ProfileData of counter or flag
    1.77    int offset = in_bytes(data_offset) + cell_offset + in_bytes(counter_offset);
    1.78  
    1.79 -  const TypePtr* adr_type = TypeOopPtr::make_from_constant(md);
    1.80 +  const TypePtr* adr_type = TypeMetadataPtr::make(md);
    1.81    Node* mdo = makecon(adr_type);
    1.82    Node* ptr = basic_plus_adr(mdo, mdo, offset);
    1.83  

mercurial