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

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

Issue 618643002: Replace OStream with std::ostream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 2 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/jsregexp.cc ('k') | src/log.cc » ('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/lithium-codegen.h"
6
7 #include <sstream>
8
5 #include "src/v8.h" 9 #include "src/v8.h"
6 10
7 #include "src/lithium-codegen.h"
8
9 #if V8_TARGET_ARCH_IA32 11 #if V8_TARGET_ARCH_IA32
10 #include "src/ia32/lithium-ia32.h" // NOLINT 12 #include "src/ia32/lithium-ia32.h" // NOLINT
11 #include "src/ia32/lithium-codegen-ia32.h" // NOLINT 13 #include "src/ia32/lithium-codegen-ia32.h" // NOLINT
12 #elif V8_TARGET_ARCH_X64 14 #elif V8_TARGET_ARCH_X64
13 #include "src/x64/lithium-x64.h" // NOLINT 15 #include "src/x64/lithium-x64.h" // NOLINT
14 #include "src/x64/lithium-codegen-x64.h" // NOLINT 16 #include "src/x64/lithium-codegen-x64.h" // NOLINT
15 #elif V8_TARGET_ARCH_ARM 17 #elif V8_TARGET_ARCH_ARM
16 #include "src/arm/lithium-arm.h" // NOLINT 18 #include "src/arm/lithium-arm.h" // NOLINT
17 #include "src/arm/lithium-codegen-arm.h" // NOLINT 19 #include "src/arm/lithium-codegen-arm.h" // NOLINT
18 #elif V8_TARGET_ARCH_ARM64 20 #elif V8_TARGET_ARCH_ARM64
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Copy the string before recording it in the assembler to avoid 143 // Copy the string before recording it in the assembler to avoid
142 // issues when the stack allocated buffer goes out of scope. 144 // issues when the stack allocated buffer goes out of scope.
143 size_t length = builder.position(); 145 size_t length = builder.position();
144 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); 146 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1);
145 MemCopy(copy.start(), builder.Finalize(), copy.length()); 147 MemCopy(copy.start(), builder.Finalize(), copy.length());
146 masm()->RecordComment(copy.start()); 148 masm()->RecordComment(copy.start());
147 } 149 }
148 150
149 151
150 void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) { 152 void LCodeGenBase::DeoptComment(const Deoptimizer::Reason& reason) {
151 OStringStream os; 153 std::ostringstream os;
152 os << ";;; deoptimize at " << HSourcePosition(reason.raw_position) << " " 154 os << ";;; deoptimize at " << HSourcePosition(reason.raw_position) << " "
153 << reason.mnemonic; 155 << reason.mnemonic;
154 if (reason.detail != NULL) os << ": " << reason.detail; 156 if (reason.detail != NULL) os << ": " << reason.detail;
155 Comment("%s", os.c_str()); 157 Comment("%s", os.str().c_str());
156 } 158 }
157 159
158 160
159 int LCodeGenBase::GetNextEmittedBlock() const { 161 int LCodeGenBase::GetNextEmittedBlock() const {
160 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { 162 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) {
161 if (!graph()->blocks()->at(i)->IsReachable()) continue; 163 if (!graph()->blocks()->at(i)->IsReachable()) continue;
162 if (!chunk_->GetLabel(i)->HasReplacement()) return i; 164 if (!chunk_->GetLabel(i)->HasReplacement()) return i;
163 } 165 }
164 return -1; 166 return -1;
165 } 167 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 chunk_->AddDeprecationDependency(map); 244 chunk_->AddDeprecationDependency(map);
243 } 245 }
244 246
245 247
246 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { 248 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) {
247 if (!map->is_stable()) return Retry(kMapBecameUnstable); 249 if (!map->is_stable()) return Retry(kMapBecameUnstable);
248 chunk_->AddStabilityDependency(map); 250 chunk_->AddStabilityDependency(map);
249 } 251 }
250 252
251 } } // namespace v8::internal 253 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698