Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: src/lithium-codegen.cc

Issue 587623002: Introduce a class to carry around a deoptimization reason. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Re-added a few Comment calls which were accidentally removed. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lithium-codegen.h ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/lithium-codegen.h ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698