| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Redistribution and use in source and binary forms, with or without |     2 // Redistribution and use in source and binary forms, with or without | 
|     3 // modification, are permitted provided that the following conditions are |     3 // modification, are permitted provided that the following conditions are | 
|     4 // met: |     4 // met: | 
|     5 // |     5 // | 
|     6 //     * Redistributions of source code must retain the above copyright |     6 //     * Redistributions of source code must retain the above copyright | 
|     7 //       notice, this list of conditions and the following disclaimer. |     7 //       notice, this list of conditions and the following disclaimer. | 
|     8 //     * Redistributions in binary form must reproduce the above |     8 //     * Redistributions in binary form must reproduce the above | 
|     9 //       copyright notice, this list of conditions and the following |     9 //       copyright notice, this list of conditions and the following | 
|    10 //       disclaimer in the documentation and/or other materials provided |    10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
|    39 #include "arm/lithium-arm.h" |    39 #include "arm/lithium-arm.h" | 
|    40 #elif V8_TARGET_ARCH_MIPS |    40 #elif V8_TARGET_ARCH_MIPS | 
|    41 #include "mips/lithium-mips.h" |    41 #include "mips/lithium-mips.h" | 
|    42 #else |    42 #else | 
|    43 #error "Unknown architecture." |    43 #error "Unknown architecture." | 
|    44 #endif |    44 #endif | 
|    45  |    45  | 
|    46 namespace v8 { |    46 namespace v8 { | 
|    47 namespace internal { |    47 namespace internal { | 
|    48  |    48  | 
 |    49  | 
 |    50 #define DEFINE_OPERAND_CACHE(name, type)                      \ | 
 |    51   name name::cache[name::kNumCachedOperands];                 \ | 
 |    52   void name::SetUpCache() {                                   \ | 
 |    53     for (int i = 0; i < kNumCachedOperands; i++) {            \ | 
 |    54       cache[i].ConvertTo(type, i);                            \ | 
 |    55     }                                                         \ | 
 |    56   }                                                           \ | 
 |    57   static bool name##_initialize() {                           \ | 
 |    58     name::SetUpCache();                                       \ | 
 |    59     return true;                                              \ | 
 |    60   }                                                           \ | 
 |    61   static bool name##_cache_initialized = name##_initialize(); | 
 |    62  | 
 |    63 DEFINE_OPERAND_CACHE(LConstantOperand, CONSTANT_OPERAND) | 
 |    64 DEFINE_OPERAND_CACHE(LStackSlot,       STACK_SLOT) | 
 |    65 DEFINE_OPERAND_CACHE(LDoubleStackSlot, DOUBLE_STACK_SLOT) | 
 |    66 DEFINE_OPERAND_CACHE(LRegister,        REGISTER) | 
 |    67 DEFINE_OPERAND_CACHE(LDoubleRegister,  DOUBLE_REGISTER) | 
 |    68  | 
 |    69 #undef DEFINE_OPERAND_CACHE | 
 |    70  | 
 |    71  | 
|    49 static inline LifetimePosition Min(LifetimePosition a, LifetimePosition b) { |    72 static inline LifetimePosition Min(LifetimePosition a, LifetimePosition b) { | 
|    50   return a.Value() < b.Value() ? a : b; |    73   return a.Value() < b.Value() ? a : b; | 
|    51 } |    74 } | 
|    52  |    75  | 
|    53  |    76  | 
|    54 static inline LifetimePosition Max(LifetimePosition a, LifetimePosition b) { |    77 static inline LifetimePosition Max(LifetimePosition a, LifetimePosition b) { | 
|    55   return a.Value() > b.Value() ? a : b; |    78   return a.Value() > b.Value() ? a : b; | 
|    56 } |    79 } | 
|    57  |    80  | 
|    58  |    81  | 
| (...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2109     LiveRange* current = live_ranges()->at(i); |  2132     LiveRange* current = live_ranges()->at(i); | 
|  2110     if (current != NULL) current->Verify(); |  2133     if (current != NULL) current->Verify(); | 
|  2111   } |  2134   } | 
|  2112 } |  2135 } | 
|  2113  |  2136  | 
|  2114  |  2137  | 
|  2115 #endif |  2138 #endif | 
|  2116  |  2139  | 
|  2117  |  2140  | 
|  2118 } }  // namespace v8::internal |  2141 } }  // namespace v8::internal | 
| OLD | NEW |