| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 140 |
| 141 // Copy the string before recording it in the assembler to avoid | 141 // Copy the string before recording it in the assembler to avoid |
| 142 // issues when the stack allocated buffer goes out of scope. | 142 // issues when the stack allocated buffer goes out of scope. |
| 143 size_t length = builder.position(); | 143 size_t length = builder.position(); |
| 144 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); | 144 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); |
| 145 MemCopy(copy.start(), builder.Finalize(), copy.length()); | 145 MemCopy(copy.start(), builder.Finalize(), copy.length()); |
| 146 masm()->RecordComment(copy.start()); | 146 masm()->RecordComment(copy.start()); |
| 147 } | 147 } |
| 148 | 148 |
| 149 | 149 |
| 150 void LCodeGenBase::DeoptComment(const char* mnemonic, const char* reason) { | 150 void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) { |
| 151 Comment(";;; deoptimize %s: %s", mnemonic, | 151 Comment(";;; deoptimize %s: %s", reason.mnemonic, |
| 152 reason == NULL ? "unknown reason" : reason); | 152 reason.detail == NULL ? "unknown reason" : reason.detail); |
| 153 } | 153 } |
| 154 | 154 |
| 155 | 155 |
| 156 int LCodeGenBase::GetNextEmittedBlock() const { | 156 int LCodeGenBase::GetNextEmittedBlock() const { |
| 157 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { | 157 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { |
| 158 if (!graph()->blocks()->at(i)->IsReachable()) continue; | 158 if (!graph()->blocks()->at(i)->IsReachable()) continue; |
| 159 if (!chunk_->GetLabel(i)->HasReplacement()) return i; | 159 if (!chunk_->GetLabel(i)->HasReplacement()) return i; |
| 160 } | 160 } |
| 161 return -1; | 161 return -1; |
| 162 } | 162 } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 chunk_->AddDeprecationDependency(map); | 233 chunk_->AddDeprecationDependency(map); |
| 234 } | 234 } |
| 235 | 235 |
| 236 | 236 |
| 237 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { | 237 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { |
| 238 if (!map->is_stable()) return Abort(kMapBecameUnstable); | 238 if (!map->is_stable()) return Abort(kMapBecameUnstable); |
| 239 chunk_->AddStabilityDependency(map); | 239 chunk_->AddStabilityDependency(map); |
| 240 } | 240 } |
| 241 | 241 |
| 242 } } // namespace v8::internal | 242 } } // namespace v8::internal |
| OLD | NEW |