author | stefank |
Thu, 09 May 2019 14:28:30 +0200 | |
changeset 54786 | ebf733a324d4 |
parent 49982 | 9042ffe5b7fe |
permissions | -rw-r--r-- |
4013 | 1 |
/* |
34651
07b1cc0f6040
8144534: Refactor templateInterpreter and templateInterpreterGenerator functions
coleenp
parents:
22234
diff
changeset
|
2 |
* Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved. |
9136 | 3 |
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc. |
4013 | 4 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
* |
|
6 |
* This code is free software; you can redistribute it and/or modify it |
|
7 |
* under the terms of the GNU General Public License version 2 only, as |
|
8 |
* published by the Free Software Foundation. |
|
9 |
* |
|
10 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
* accompanied this code). |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License version |
|
17 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4745
diff
changeset
|
20 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4745
diff
changeset
|
21 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
4745
diff
changeset
|
22 |
* questions. |
4013 | 23 |
* |
24 |
*/ |
|
25 |
||
7397 | 26 |
#include "precompiled.hpp" |
27 |
#include "asm/assembler.hpp" |
|
28 |
#include "interpreter/bytecodeHistogram.hpp" |
|
35214 | 29 |
#include "interpreter/cppInterpreterGenerator.hpp" |
7397 | 30 |
#include "interpreter/interpreterRuntime.hpp" |
13728
882756847a04
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
13391
diff
changeset
|
31 |
#include "oops/method.hpp" |
7397 | 32 |
#include "runtime/arguments.hpp" |
9136 | 33 |
#include "interpreter/cppInterpreter.hpp" |
4013 | 34 |
|
35479
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
35 |
address CppInterpreterGenerator::generate_slow_signature_handler() { |
4013 | 36 |
_masm->advance(1); |
37 |
return (address) InterpreterRuntime::slow_signature_handler; |
|
38 |
} |
|
39 |
||
35214 | 40 |
address CppInterpreterGenerator::generate_math_entry( |
4013 | 41 |
AbstractInterpreter::MethodKind kind) { |
42 |
if (!InlineIntrinsics) |
|
43 |
return NULL; |
|
44 |
||
45 |
Unimplemented(); |
|
19336
ddceb0657500
8022956: Clang: enable return type warnings on BSD
twisti
parents:
13728
diff
changeset
|
46 |
return NULL; |
4013 | 47 |
} |
48 |
||
35214 | 49 |
address CppInterpreterGenerator::generate_abstract_entry() { |
9136 | 50 |
return generate_entry((address) ShouldNotCallThisEntry()); |
4013 | 51 |
} |
52 |
||
35479
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
53 |
address CppInterpreterGenerator::generate_empty_entry() { |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
54 |
if (!UseFastEmptyMethods) |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
55 |
return NULL; |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
56 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
57 |
return generate_entry((address) CppInterpreter::empty_entry); |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
58 |
} |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
59 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
60 |
address CppInterpreterGenerator::generate_accessor_entry() { |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
61 |
if (!UseFastAccessorMethods) |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
62 |
return NULL; |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
63 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
64 |
return generate_entry((address) CppInterpreter::accessor_entry); |
4745
5ec280d96474
6920970: Zero build fixes after 6849984 and 6911204
twisti
parents:
4013
diff
changeset
|
65 |
} |
35479
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
66 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
67 |
address CppInterpreterGenerator::generate_Reference_get_entry(void) { |
49982 | 68 |
#if INCLUDE_G1GC |
35479
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
69 |
if (UseG1GC) { |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
70 |
// We need to generate have a routine that generates code to: |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
71 |
// * load the value in the referent field |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
72 |
// * passes that value to the pre-barrier. |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
73 |
// |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
74 |
// In the case of G1 this will record the value of the |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
75 |
// referent in an SATB buffer if marking is active. |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
76 |
// This will cause concurrent marking to mark the referent |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
77 |
// field as live. |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
78 |
Unimplemented(); |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
79 |
} |
49982 | 80 |
#endif // INCLUDE_G1GC |
35479
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
81 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
82 |
// If G1 is not enabled then attempt to go through the normal entry point |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
83 |
// Reference.get could be instrumented by jvmti |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
84 |
return NULL; |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
85 |
} |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
86 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
87 |
address CppInterpreterGenerator::generate_native_entry(bool synchronized) { |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
88 |
return generate_entry((address) CppInterpreter::native_entry); |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
89 |
} |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
90 |
|
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
91 |
address CppInterpreterGenerator::generate_normal_entry(bool synchronized) { |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
92 |
return generate_entry((address) CppInterpreter::normal_entry); |
62c12ca7a45e
8146410: Interpreter functions are declared and defined in the wrong files
coleenp
parents:
35214
diff
changeset
|
93 |
} |