| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 namespace internal { | 47 namespace internal { |
| 48 | 48 |
| 49 #define DEFINE_COMPILE(type) \ | 49 #define DEFINE_COMPILE(type) \ |
| 50 LInstruction* H##type::CompileToLithium(LChunkBuilder* builder) { \ | 50 LInstruction* H##type::CompileToLithium(LChunkBuilder* builder) { \ |
| 51 return builder->Do##type(this); \ | 51 return builder->Do##type(this); \ |
| 52 } | 52 } |
| 53 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) | 53 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) |
| 54 #undef DEFINE_COMPILE | 54 #undef DEFINE_COMPILE |
| 55 | 55 |
| 56 | 56 |
| 57 const char* Representation::Mnemonic() const { | |
| 58 switch (kind_) { | |
| 59 case kNone: return "v"; | |
| 60 case kTagged: return "t"; | |
| 61 case kDouble: return "d"; | |
| 62 case kInteger32: return "i"; | |
| 63 case kExternal: return "x"; | |
| 64 default: | |
| 65 UNREACHABLE(); | |
| 66 return NULL; | |
| 67 } | |
| 68 } | |
| 69 | |
| 70 | |
| 71 int HValue::LoopWeight() const { | 57 int HValue::LoopWeight() const { |
| 72 const int w = FLAG_loop_weight; | 58 const int w = FLAG_loop_weight; |
| 73 static const int weights[] = { 1, w, w*w, w*w*w, w*w*w*w }; | 59 static const int weights[] = { 1, w, w*w, w*w*w, w*w*w*w }; |
| 74 return weights[Min(block()->LoopNestingDepth(), | 60 return weights[Min(block()->LoopNestingDepth(), |
| 75 static_cast<int>(ARRAY_SIZE(weights)-1))]; | 61 static_cast<int>(ARRAY_SIZE(weights)-1))]; |
| 76 } | 62 } |
| 77 | 63 |
| 78 | 64 |
| 79 Isolate* HValue::isolate() const { | 65 Isolate* HValue::isolate() const { |
| 80 ASSERT(block() != NULL); | 66 ASSERT(block() != NULL); |
| (...skipping 3516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3597 | 3583 |
| 3598 | 3584 |
| 3599 void HCheckFunction::Verify() { | 3585 void HCheckFunction::Verify() { |
| 3600 HInstruction::Verify(); | 3586 HInstruction::Verify(); |
| 3601 ASSERT(HasNoUses()); | 3587 ASSERT(HasNoUses()); |
| 3602 } | 3588 } |
| 3603 | 3589 |
| 3604 #endif | 3590 #endif |
| 3605 | 3591 |
| 3606 } } // namespace v8::internal | 3592 } } // namespace v8::internal |
| OLD | NEW |