| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/lithium-codegen.h" | 7 #include "src/lithium-codegen.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
| 10 #include "src/ia32/lithium-ia32.h" // NOLINT | 10 #include "src/ia32/lithium-ia32.h" // NOLINT |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 #ifdef DEBUG | 109 #ifdef DEBUG |
| 110 bool dead_block = false; | 110 bool dead_block = false; |
| 111 for (int i = 0; i < instructions_->length(); i++) { | 111 for (int i = 0; i < instructions_->length(); i++) { |
| 112 LInstruction* instr = instructions_->at(i); | 112 LInstruction* instr = instructions_->at(i); |
| 113 HValue* hval = instr->hydrogen_value(); | 113 HValue* hval = instr->hydrogen_value(); |
| 114 if (instr->IsLabel()) dead_block = LLabel::cast(instr)->HasReplacement(); | 114 if (instr->IsLabel()) dead_block = LLabel::cast(instr)->HasReplacement(); |
| 115 if (dead_block || !hval->block()->IsReachable()) continue; | 115 if (dead_block || !hval->block()->IsReachable()) continue; |
| 116 | 116 |
| 117 HInstruction* hinstr = HInstruction::cast(hval); | 117 HInstruction* hinstr = HInstruction::cast(hval); |
| 118 if (!hinstr->CanDeoptimize() && instr->HasEnvironment()) { | 118 if (!hinstr->CanDeoptimize() && instr->HasEnvironment()) { |
| 119 V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)\n", | 119 V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)", |
| 120 hinstr->Mnemonic(), instr->Mnemonic()); | 120 hinstr->Mnemonic(), instr->Mnemonic()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 if (instr->HasEnvironment() && !instr->environment()->has_been_used()) { | 123 if (instr->HasEnvironment() && !instr->environment()->has_been_used()) { |
| 124 V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)\n", | 124 V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)", |
| 125 hinstr->Mnemonic(), instr->Mnemonic()); | 125 hinstr->Mnemonic(), instr->Mnemonic()); |
| 126 } | 126 } |
| 127 } | 127 } |
| 128 #endif | 128 #endif |
| 129 } | 129 } |
| 130 | 130 |
| 131 | 131 |
| 132 void LCodeGenBase::Comment(const char* format, ...) { | 132 void LCodeGenBase::Comment(const char* format, ...) { |
| 133 if (!FLAG_code_comments) return; | 133 if (!FLAG_code_comments) return; |
| 134 char buffer[4 * KB]; | 134 char buffer[4 * KB]; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 chunk_->AddDeprecationDependency(map); | 227 chunk_->AddDeprecationDependency(map); |
| 228 } | 228 } |
| 229 | 229 |
| 230 | 230 |
| 231 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { | 231 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { |
| 232 if (!map->is_stable()) return Abort(kMapBecameUnstable); | 232 if (!map->is_stable()) return Abort(kMapBecameUnstable); |
| 233 chunk_->AddStabilityDependency(map); | 233 chunk_->AddStabilityDependency(map); |
| 234 } | 234 } |
| 235 | 235 |
| 236 } } // namespace v8::internal | 236 } } // namespace v8::internal |
| OLD | NEW |