/hg/icedtea6: Reformat Shark to match upstream HotSpot

gbenson at icedtea.classpath.org gbenson at icedtea.classpath.org
Tue Feb 23 09:29:30 PST 2010


changeset a9569f1ff015 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a9569f1ff015
author: Gary Benson <gbenson at redhat.com>
date: Tue Feb 23 12:08:37 2010 -0500

	Reformat Shark to match upstream HotSpot


diffstat:

39 files changed, 706 insertions(+), 1340 deletions(-)
ChangeLog                                               |   42 +++
ports/hotspot/src/share/vm/shark/sharkBlock.cpp         |  111 ++------
ports/hotspot/src/share/vm/shark/sharkBlock.hpp         |   75 +----
ports/hotspot/src/share/vm/shark/sharkBuilder.cpp       |  189 +++++----------
ports/hotspot/src/share/vm/shark/sharkBuilder.hpp       |    6 
ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp  |   63 +----
ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp  |  123 +++------
ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp    |   18 -
ports/hotspot/src/share/vm/shark/sharkCompiler.cpp      |   26 --
ports/hotspot/src/share/vm/shark/sharkCompiler.hpp      |   15 -
ports/hotspot/src/share/vm/shark/sharkConstant.cpp      |    9 
ports/hotspot/src/share/vm/shark/sharkConstant.hpp      |   12 
ports/hotspot/src/share/vm/shark/sharkContext.cpp       |   15 -
ports/hotspot/src/share/vm/shark/sharkContext.hpp       |   85 ++----
ports/hotspot/src/share/vm/shark/sharkEntry.hpp         |   21 -
ports/hotspot/src/share/vm/shark/sharkFunction.cpp      |   36 --
ports/hotspot/src/share/vm/shark/sharkFunction.hpp      |   33 --
ports/hotspot/src/share/vm/shark/sharkInliner.cpp       |   87 ++----
ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp    |   30 --
ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp    |    3 
ports/hotspot/src/share/vm/shark/sharkInvariants.cpp    |    3 
ports/hotspot/src/share/vm/shark/sharkInvariants.hpp    |   48 +--
ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp |   51 +---
ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp |   10 
ports/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp |    3 
ports/hotspot/src/share/vm/shark/sharkNativeWrapper.hpp |   66 +----
ports/hotspot/src/share/vm/shark/sharkRuntime.cpp       |   32 --
ports/hotspot/src/share/vm/shark/sharkRuntime.hpp       |   15 -
ports/hotspot/src/share/vm/shark/sharkStack.cpp         |   57 +---
ports/hotspot/src/share/vm/shark/sharkStack.hpp         |   84 ++----
ports/hotspot/src/share/vm/shark/sharkState.cpp         |   24 -
ports/hotspot/src/share/vm/shark/sharkState.hpp         |   63 +----
ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp  |    9 
ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp  |    3 
ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp |  168 ++++---------
ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp |  111 ++------
ports/hotspot/src/share/vm/shark/sharkType.hpp          |   75 +----
ports/hotspot/src/share/vm/shark/sharkValue.cpp         |  168 ++++---------
ports/hotspot/src/share/vm/shark/sharkValue.hpp         |   57 +---

diffs (truncated from 5206 to 500 lines):

diff -r 1365cc7a840d -r a9569f1ff015 ChangeLog
--- a/ChangeLog	Tue Feb 23 11:46:21 2010 -0500
+++ b/ChangeLog	Tue Feb 23 12:08:37 2010 -0500
@@ -1,3 +1,45 @@ 2010-02-23  Deepak Bhole <dbhole at redhat.
+2010-02-23  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkBlock.cpp: Reformatted
+	with trailing opening braces to match upstream HotSpot.
+	* ports/hotspot/src/share/vm/shark/sharkBlock.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkBuilder.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCacheDecache.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCacheDecache.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCodeBuffer.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkConstant.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkConstant.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkContext.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkContext.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkEntry.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkFunction.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkFunction.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkInliner.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkIntrinsics.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkIntrinsics.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkInvariants.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkInvariants.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkMemoryManager.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkMemoryManager.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkNativeWrapper.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkNativeWrapper.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkRuntime.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkRuntime.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkStack.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkStack.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkState.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkState.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkStateScanner.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkStateScanner.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkType.hpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkValue.cpp: Likewise.
+	* ports/hotspot/src/share/vm/shark/sharkValue.hpp: Likewise.
+
 2010-02-23  Deepak Bhole <dbhole at redhat.com>
 
 	* Makefile.am: Provide JDK_UPDATE_VERSION when compiling the plugin
diff -r 1365cc7a840d -r a9569f1ff015 ports/hotspot/src/share/vm/shark/sharkBlock.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.cpp	Tue Feb 23 11:46:21 2010 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.cpp	Tue Feb 23 12:08:37 2010 -0500
@@ -28,8 +28,7 @@
 
 using namespace llvm;
 
-void SharkBlock::parse_bytecode(int start, int limit)
-{
+void SharkBlock::parse_bytecode(int start, int limit) {
   SharkValue *a, *b, *c, *d;
   int i;
 
@@ -890,18 +889,15 @@ void SharkBlock::parse_bytecode(int star
   }
 }
 
-SharkState* SharkBlock::initial_current_state()
-{
+SharkState* SharkBlock::initial_current_state() {
   return entry_state()->copy();
 }
 
-int SharkBlock::switch_default_dest()
-{
+int SharkBlock::switch_default_dest() {
   return iter()->get_dest_table(0);
 }
 
-int SharkBlock::switch_table_length()
-{
+int SharkBlock::switch_table_length() {
   switch(bc()) {
   case Bytecodes::_tableswitch:
     return iter()->get_int_table(2) - iter()->get_int_table(1) + 1;
@@ -914,8 +910,7 @@ int SharkBlock::switch_table_length()
   } 
 }
 
-int SharkBlock::switch_key(int i)
-{
+int SharkBlock::switch_key(int i) {
   switch(bc()) {
   case Bytecodes::_tableswitch:
     return iter()->get_int_table(1) + i;
@@ -928,8 +923,7 @@ int SharkBlock::switch_key(int i)
   } 
 }
 
-int SharkBlock::switch_dest(int i)
-{
+int SharkBlock::switch_dest(int i) {
   switch(bc()) {
   case Bytecodes::_tableswitch:
     return iter()->get_dest_table(i + 3);
@@ -942,8 +936,7 @@ int SharkBlock::switch_dest(int i)
   } 
 }
 
-void SharkBlock::do_div_or_rem(bool is_long, bool is_rem)
-{
+void SharkBlock::do_div_or_rem(bool is_long, bool is_rem) {
   SharkValue *sb = pop();
   SharkValue *sa = pop();
 
@@ -1010,8 +1003,7 @@ void SharkBlock::do_div_or_rem(bool is_l
     push(SharkValue::create_jint(result, false));
 }
 
-void SharkBlock::do_field_access(bool is_get, bool is_field)
-{
+void SharkBlock::do_field_access(bool is_get, bool is_field) {
   bool will_link;
   ciField *field = iter()->get_field(will_link);
   assert(will_link, "typeflow responsibility");
@@ -1079,8 +1071,7 @@ void SharkBlock::do_field_access(bool is
     push(value);
 }
 
-void SharkBlock::do_lcmp()
-{
+void SharkBlock::do_lcmp() {
   Value *b = pop()->jlong_value();
   Value *a = pop()->jlong_value();
 
@@ -1111,8 +1102,7 @@ void SharkBlock::do_lcmp()
   push(SharkValue::create_jint(result, false));
 }
 
-void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater)
-{
+void SharkBlock::do_fcmp(bool is_double, bool unordered_is_greater) {
   Value *a, *b;
   if (is_double) {
     b = pop()->jdouble_value();
@@ -1159,137 +1149,110 @@ void SharkBlock::do_fcmp(bool is_double,
   push(SharkValue::create_jint(result, false));
 }
 
-void SharkBlock::emit_IR()
-{
+void SharkBlock::emit_IR() {
   ShouldNotCallThis();
 }
 
-SharkState* SharkBlock::entry_state()
-{
+SharkState* SharkBlock::entry_state() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_zero_check(SharkValue* value)
-{
+void SharkBlock::do_zero_check(SharkValue* value) {
   ShouldNotCallThis();
 }
 
-void SharkBlock::maybe_add_backedge_safepoint()
-{
+void SharkBlock::maybe_add_backedge_safepoint() {
   ShouldNotCallThis();
 }
 
-bool SharkBlock::has_trap()
-{
+bool SharkBlock::has_trap() {
   return false;
 }
 
-int SharkBlock::trap_request()
-{
+int SharkBlock::trap_request() {
   ShouldNotCallThis();
 }
 
-int SharkBlock::trap_bci()
-{
+int SharkBlock::trap_bci() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_trap(int trap_request)
-{
+void SharkBlock::do_trap(int trap_request) {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_arraylength()
-{
+void SharkBlock::do_arraylength() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_aload(BasicType basic_type)
-{
+void SharkBlock::do_aload(BasicType basic_type) {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_astore(BasicType basic_type)
-{
+void SharkBlock::do_astore(BasicType basic_type) {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_return(BasicType type)
-{
+void SharkBlock::do_return(BasicType type) {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_athrow()
-{
+void SharkBlock::do_athrow() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_goto()
-{
+void SharkBlock::do_goto() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_jsr()
-{
+void SharkBlock::do_jsr() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_ret()
-{
+void SharkBlock::do_ret() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a)
-{
+void SharkBlock::do_if(ICmpInst::Predicate p, SharkValue* b, SharkValue* a) {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_switch()
-{
+void SharkBlock::do_switch() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_call()
-{
+void SharkBlock::do_call() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_instance_check()
-{
+void SharkBlock::do_instance_check() {
   ShouldNotCallThis();
 }
 
-bool SharkBlock::maybe_do_instanceof_if()
-{
+bool SharkBlock::maybe_do_instanceof_if() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_new()
-{
+void SharkBlock::do_new() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_newarray()
-{
+void SharkBlock::do_newarray() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_anewarray()
-{
+void SharkBlock::do_anewarray() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_multianewarray()
-{
+void SharkBlock::do_multianewarray() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_monitorenter()
-{
+void SharkBlock::do_monitorenter() {
   ShouldNotCallThis();
 }
 
-void SharkBlock::do_monitorexit()
-{
+void SharkBlock::do_monitorexit() {
   ShouldNotCallThis();
 }
diff -r 1365cc7a840d -r a9569f1ff015 ports/hotspot/src/share/vm/shark/sharkBlock.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkBlock.hpp	Tue Feb 23 11:46:21 2010 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBlock.hpp	Tue Feb 23 12:08:37 2010 -0500
@@ -42,16 +42,13 @@ class SharkBlock : public SharkTargetInv
   SharkState*      _current_state;
 
  public:
-  ciBytecodeStream* iter()
-  {
+  ciBytecodeStream* iter() {
     return &_iter;
   }
-  Bytecodes::Code bc()
-  {
+  Bytecodes::Code bc() {
     return iter()->cur_bc();
   }
-  int bci()
-  {
+  int bci() {
     return iter()->cur_bci();
   }
 
@@ -64,23 +61,20 @@ class SharkBlock : public SharkTargetInv
   SharkState* initial_current_state();
   
  public:
-  SharkState* current_state()
-  {
+  SharkState* current_state() {
     if (_current_state == NULL)
       set_current_state(initial_current_state());
     return _current_state;
   }
 
  protected:
-  void set_current_state(SharkState* current_state)
-  {
+  void set_current_state(SharkState* current_state) {
     _current_state = current_state;
   }
 
   // Local variables  
  protected:
-  SharkValue* local(int index)
-  {
+  SharkValue* local(int index) {
     SharkValue *value = current_state()->local(index);
     assert(value != NULL, "shouldn't be");
     assert(value->is_one_word() ||
@@ -88,8 +82,7 @@ class SharkBlock : public SharkTargetInv
             current_state()->local(index + 1) == NULL), "should be");
     return value;
   }
-  void set_local(int index, SharkValue* value)
-  {
+  void set_local(int index, SharkValue* value) {
     assert(value != NULL, "shouldn't be");
     current_state()->set_local(index, value);
     if (value->is_two_word())
@@ -98,16 +91,13 @@ class SharkBlock : public SharkTargetInv
 
   // Expression stack (raw)
  protected:
-  void xpush(SharkValue* value)
-  {
+  void xpush(SharkValue* value) {
     current_state()->push(value);
   }
-  SharkValue* xpop()
-  {
+  SharkValue* xpop() {
     return current_state()->pop();
   }
-  SharkValue* xstack(int slot)
-  {
+  SharkValue* xstack(int slot) {
     SharkValue *value = current_state()->stack(slot);
     assert(value != NULL, "shouldn't be");
     assert(value->is_one_word() ||
@@ -115,22 +105,19 @@ class SharkBlock : public SharkTargetInv
             current_state()->stack(slot - 1) == NULL), "should be");
     return value;
   }
-  int xstack_depth()
-  {
+  int xstack_depth() {
     return current_state()->stack_depth();
   }
 
   // Expression stack (cooked)
  protected:
-  void push(SharkValue* value)
-  {
+  void push(SharkValue* value) {
     assert(value != NULL, "shouldn't be");
     xpush(value);
     if (value->is_two_word())
       xpush(NULL);
   }
-  SharkValue* pop()
-  {
+  SharkValue* pop() {
     int size = current_state()->stack(0) == NULL ? 2 : 1;
     if (size == 2)
       xpop();
@@ -138,8 +125,7 @@ class SharkBlock : public SharkTargetInv
     assert(value && value->size() == size, "should be");
     return value;
   }
-  SharkValue* pop_result(BasicType type)
-  {
+  SharkValue* pop_result(BasicType type) {
     SharkValue *result = pop();
 
 #ifdef ASSERT
@@ -176,17 +162,14 @@ class SharkBlock : public SharkTargetInv
 
   // Zero checking
  protected:
-  void check_null(SharkValue* object)
-  {
+  void check_null(SharkValue* object) {
     zero_check(object);
   }
-  void check_divide_by_zero(SharkValue* value)
-  {
+  void check_divide_by_zero(SharkValue* value) {
     zero_check(value);
   }
  private:
-  void zero_check(SharkValue* value)
-  {
+  void zero_check(SharkValue* value) {
     if (!value->zero_checked())
       do_zero_check(value);
   }
@@ -213,40 +196,32 @@ class SharkBlock : public SharkTargetInv
 
   // *div and *rem
  private:
-  void do_idiv()
-  {
+  void do_idiv() {
     do_div_or_rem(false, false);
   }
-  void do_irem()
-  {
+  void do_irem() {
     do_div_or_rem(false, true);
   }
-  void do_ldiv()
-  {
+  void do_ldiv() {
     do_div_or_rem(true, false);
   }
-  void do_lrem()
-  {
+  void do_lrem() {
     do_div_or_rem(true, true);
   }
   void do_div_or_rem(bool is_long, bool is_rem);  
 
   // get* and put*
  private:
-  void do_getstatic()
-  {
+  void do_getstatic() {
     do_field_access(true, false);
   }
-  void do_getfield()
-  {
+  void do_getfield() {
     do_field_access(true, true);
   }
-  void do_putstatic()
-  {
+  void do_putstatic() {
     do_field_access(false, false);
   }
-  void do_putfield()
-  {
+  void do_putfield() {
     do_field_access(false, true);
   }
   void do_field_access(bool is_get, bool is_field);
diff -r 1365cc7a840d -r a9569f1ff015 ports/hotspot/src/share/vm/shark/sharkBuilder.cpp
--- a/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp	Tue Feb 23 11:46:21 2010 -0500
+++ b/ports/hotspot/src/share/vm/shark/sharkBuilder.cpp	Tue Feb 23 12:08:37 2010 -0500
@@ -30,24 +30,21 @@ using namespace llvm;
 



More information about the distro-pkg-dev mailing list