changeset in /hg/icedtea6: Merge with upstream

Deepak Bhole dbhole at redhat.com
Fri Nov 21 12:36:19 PST 2008


changeset 16d57d401734 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=16d57d401734
description:
	Merge with upstream

diffstat:

7 files changed, 42 insertions(+), 11 deletions(-)
ChangeLog                                              |   21 ++++++++++++++++
ports/hotspot/src/share/vm/shark/sharkBlock.cpp        |    8 ++++--
ports/hotspot/src/share/vm/shark/sharkBuilder.cpp      |    2 -
ports/hotspot/src/share/vm/shark/sharkBuilder.hpp      |    8 +++---
ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp |    8 +++++-
ports/hotspot/src/share/vm/shark/sharkFunction.cpp     |    2 -
ports/hotspot/src/share/vm/shark/sharkValue.hpp        |    4 +--

diffs (169 lines):

diff -r 85921aeaed32 -r 16d57d401734 ChangeLog
--- a/ChangeLog	Fri Nov 21 11:39:51 2008 -0500
+++ b/ChangeLog	Fri Nov 21 15:23:16 2008 -0500
@@ -11,6 +11,27 @@ 2008-11-21  Deepak Bhole  <dbhole at redhat
 	condition that froze the vm under the right circumstances.
 	* rt/net/sourceforge/jnlp/NetxPanel.java: Provide function to return the
 	applet classloader.
+
+2008-11-21 Andrew Haley <aph at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkValue.hpp
+	(class SharkComputableValue): Use IRBuilder<>, not IRBuilder.
+	(class SharkValue): Use IRBuilder<>, not IRBuilder.
+	* ports/hotspot/src/share/vm/shark/sharkFunction.cpp
+	(SharkFunction::CreatePopFrame): Change a few jint_types to
+	intptr_types.
+	* ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp
+	(SharkConstantPool::cache_entry_at): Byte-swap the cache index.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
+	(SharkBuilder::SharkBuilder) Inherit from template class
+	IRBuilder<>.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp:
+	(SharkBuilder::SharkBuilder) Inherit from template class
+	IRBuilder<>.
+	Change a few jint_types to intptr_types.
+	* ports/hotspot/src/share/vm/shark/sharkBlock.cpp
+	(SharkBlock::get_interface_callee): Change a few jint_types to
+	intptr_types.
 
 2008-11-18  Deepak Bhole  <dbhole at redhat.com>
 	* IcedTeaPlugin.cc: Encode newline characters instead of stripping them.
diff -r 85921aeaed32 -r 16d57d401734 ports/hotspot/src/share/vm/shark/sharkBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp	Fri Nov 21 11:39:51 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp	Fri Nov 21 15:23:16 2008 -0500
@@ -1814,6 +1814,8 @@ Value* SharkBlock::get_interface_callee(
     in_ByteSize(instanceKlass::vtable_length_offset() * HeapWordSize),
     SharkType::jint_type(),
     "vtable_length");
+  vtable_length =
+    builder()->CreateIntCast(vtable_length, SharkType::intptr_type(), false);
 
   bool needs_aligning = HeapWordsPerLong > 1;
   const char *itable_start_name = "itable_start";
@@ -1821,7 +1823,7 @@ Value* SharkBlock::get_interface_callee(
     vtable_start,
     builder()->CreateShl(
       vtable_length,
-      LLVMValue::jint_constant(exact_log2(vtableEntry::size() * wordSize))),
+      LLVMValue::intptr_constant(exact_log2(vtableEntry::size() * wordSize))),
     needs_aligning ? "" : itable_start_name);
   if (needs_aligning)
     itable_start = builder()->CreateAlign(
@@ -1878,6 +1880,8 @@ Value* SharkBlock::get_interface_callee(
     in_ByteSize(itableOffsetEntry::offset_offset_in_bytes()),
     SharkType::jint_type(),
     "offset");
+  offset =
+    builder()->CreateIntCast(offset, SharkType::intptr_type(), false);
 
   Value *index = builder()->CreateValueOfStructEntry(
     cache, ConstantPoolCacheEntry::f2_offset(),
@@ -1894,7 +1898,7 @@ Value* SharkBlock::get_interface_callee(
             offset),
           builder()->CreateShl(
             index,
-            LLVMValue::jint_constant(
+            LLVMValue::intptr_constant(
               exact_log2(itableMethodEntry::size() * wordSize)))),
         LLVMValue::intptr_constant(
           itableMethodEntry::method_offset_in_bytes())),
diff -r 85921aeaed32 -r 16d57d401734 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp	Fri Nov 21 11:39:51 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp	Fri Nov 21 15:23:16 2008 -0500
@@ -29,7 +29,7 @@ using namespace llvm;
 using namespace llvm;
 
 SharkBuilder::SharkBuilder()
-  : IRBuilder(),
+  : IRBuilder<>(),
       _module("shark"),
       _module_provider(module()),
       _execution_engine(ExecutionEngine::create(&_module_provider))
diff -r 85921aeaed32 -r 16d57d401734 ports/hotspot/src/share/vm/shark/sharkBuilder.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp	Fri Nov 21 11:39:51 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.hpp	Fri Nov 21 15:23:16 2008 -0500
@@ -23,7 +23,7 @@
  *
  */
 
-class SharkBuilder : public llvm::IRBuilder {
+class SharkBuilder : public llvm::IRBuilder<> {
  public:
   SharkBuilder();
 
@@ -81,13 +81,13 @@ class SharkBuilder : public llvm::IRBuil
                                   llvm::Value*      index,
                                   const char*       name = "")
   {
-    llvm::Value* offset = index;
+    llvm::Value* offset = CreateIntCast(index, SharkType::intptr_type(), false);
     if (element_bytes != 1)
       offset = CreateShl(
         offset,
-        LLVMValue::jint_constant(exact_log2(element_bytes)));
+        LLVMValue::intptr_constant(exact_log2(element_bytes)));
     offset = CreateAdd(
-      LLVMValue::jint_constant(in_bytes(base_offset)), offset);
+      LLVMValue::intptr_constant(in_bytes(base_offset)), offset);
 
     return CreateIntToPtr(
       CreateAdd(CreatePtrToInt(arrayoop, SharkType::intptr_type()), offset),
diff -r 85921aeaed32 -r 16d57d401734 ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp	Fri Nov 21 11:39:51 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkConstantPool.cpp	Fri Nov 21 15:23:16 2008 -0500
@@ -82,6 +82,12 @@ Value *SharkConstantPool::tag_at(int whi
 
 Value *SharkConstantPool::cache_entry_at(int which)
 {
+  // Takes a constant pool cache index in byte-swapped byte order
+  // (which comes from the bytecodes after rewriting).  This is a
+  // bizarre hack but it's the same as
+  // constantPoolOopDesc::field_or_method_at().
+  which = Bytes::swap_u2(which);
+
   Value *entry = builder()->CreateIntToPtr(
     builder()->CreateAdd(
       builder()->CreatePtrToInt(
@@ -109,7 +115,7 @@ Value *SharkConstantPool::cache_entry_at
       builder()->CreateValueOfStructEntry(
         entry, ConstantPoolCacheEntry::indices_offset(),
         SharkType::intptr_type()),
-      LLVMValue::jint_constant(shift)),
+      LLVMValue::intptr_constant(shift)),
     LLVMValue::intptr_constant(0xff));
 
   BasicBlock *orig_block = builder()->GetInsertBlock();
diff -r 85921aeaed32 -r 16d57d401734 ports/hotspot/src/share/vm/shark/sharkFunction.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkFunction.cpp	Fri Nov 21 11:39:51 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkFunction.cpp	Fri Nov 21 15:23:16 2008 -0500
@@ -182,7 +182,7 @@ Value* SharkFunction::CreatePopFrame(int
   Value *fp = CreateLoadZeroFramePointer();
   Value *sp = builder()->CreateAdd(
     fp,
-    LLVMValue::jint_constant((1 + locals_to_pop) * wordSize));
+    LLVMValue::intptr_constant((1 + locals_to_pop) * wordSize));
 
   CreateStoreZeroStackPointer(sp);
   CreateStoreZeroFramePointer(
diff -r 85921aeaed32 -r 16d57d401734 ports/hotspot/src/share/vm/shark/sharkValue.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkValue.hpp	Fri Nov 21 11:39:51 2008 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkValue.hpp	Fri Nov 21 15:23:16 2008 -0500
@@ -246,7 +246,7 @@ class SharkValue : public ResourceObj {
   {
     ShouldNotCallThis();
   }
-  virtual llvm::Value* intptr_value(llvm::IRBuilder* builder) const
+  virtual llvm::Value* intptr_value(llvm::IRBuilder<>* builder) const
   {
     ShouldNotCallThis();
   }
@@ -370,7 +370,7 @@ class SharkComputableValue : public Shar
   {
     return llvm_value();
   }
-  llvm::Value* intptr_value(llvm::IRBuilder* builder) const
+  llvm::Value* intptr_value(llvm::IRBuilder<>* builder) const
   {
     assert(is_jobject(), "should be");
     return builder->CreatePtrToInt(llvm_value(), SharkType::intptr_type());



More information about the distro-pkg-dev mailing list