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) { |
| 151 Comment(";;; deoptimize %s: %s", mnemonic, |
| 152 reason == NULL ? "unknown reason" : reason); |
| 153 } |
| 154 |
| 155 |
150 int LCodeGenBase::GetNextEmittedBlock() const { | 156 int LCodeGenBase::GetNextEmittedBlock() const { |
151 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { | 157 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { |
152 if (!graph()->blocks()->at(i)->IsReachable()) continue; | 158 if (!graph()->blocks()->at(i)->IsReachable()) continue; |
153 if (!chunk_->GetLabel(i)->HasReplacement()) return i; | 159 if (!chunk_->GetLabel(i)->HasReplacement()) return i; |
154 } | 160 } |
155 return -1; | 161 return -1; |
156 } | 162 } |
157 | 163 |
158 | 164 |
159 static void AddWeakObjectToCodeDependency(Isolate* isolate, | 165 static void AddWeakObjectToCodeDependency(Isolate* isolate, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 chunk_->AddDeprecationDependency(map); | 233 chunk_->AddDeprecationDependency(map); |
228 } | 234 } |
229 | 235 |
230 | 236 |
231 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { | 237 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { |
232 if (!map->is_stable()) return Abort(kMapBecameUnstable); | 238 if (!map->is_stable()) return Abort(kMapBecameUnstable); |
233 chunk_->AddStabilityDependency(map); | 239 chunk_->AddStabilityDependency(map); |
234 } | 240 } |
235 | 241 |
236 } } // namespace v8::internal | 242 } } // namespace v8::internal |
OLD | NEW |