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

Side by Side Diff: src/code-stubs.cc

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. Created 6 years, 5 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/builtins.cc ('k') | src/codegen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/factory.h" 10 #include "src/factory.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 HandleScope scope(isolate()); 182 HandleScope scope(isolate());
183 183
184 Handle<Code> new_object = GenerateCode(); 184 Handle<Code> new_object = GenerateCode();
185 new_object->set_major_key(MajorKey()); 185 new_object->set_major_key(MajorKey());
186 FinishCode(new_object); 186 FinishCode(new_object);
187 RecordCodeGeneration(new_object); 187 RecordCodeGeneration(new_object);
188 188
189 #ifdef ENABLE_DISASSEMBLER 189 #ifdef ENABLE_DISASSEMBLER
190 if (FLAG_print_code_stubs) { 190 if (FLAG_print_code_stubs) {
191 CodeTracer::Scope trace_scope(isolate()->GetCodeTracer()); 191 CodeTracer::Scope trace_scope(isolate()->GetCodeTracer());
192 OStringStream os; 192 OFStream os(trace_scope.file());
193 os << *this; 193 OStringStream name;
194 new_object->Disassemble(os.c_str(), trace_scope.file()); 194 name << *this;
195 PrintF(trace_scope.file(), "\n"); 195 new_object->Disassemble(name.c_str(), os);
196 os << "\n";
196 } 197 }
197 #endif 198 #endif
198 199
199 if (UseSpecialCache()) { 200 if (UseSpecialCache()) {
200 AddToSpecialCache(new_object); 201 AddToSpecialCache(new_object);
201 } else { 202 } else {
202 // Update the dictionary and the root in Heap. 203 // Update the dictionary and the root in Heap.
203 Handle<UnseededNumberDictionary> dict = 204 Handle<UnseededNumberDictionary> dict =
204 UnseededNumberDictionary::AtNumberPut( 205 UnseededNumberDictionary::AtNumberPut(
205 Handle<UnseededNumberDictionary>(heap->code_stubs()), 206 Handle<UnseededNumberDictionary>(heap->code_stubs()),
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 InstallDescriptor(isolate, &stub3); 941 InstallDescriptor(isolate, &stub3);
941 } 942 }
942 943
943 InternalArrayConstructorStub::InternalArrayConstructorStub( 944 InternalArrayConstructorStub::InternalArrayConstructorStub(
944 Isolate* isolate) : PlatformCodeStub(isolate) { 945 Isolate* isolate) : PlatformCodeStub(isolate) {
945 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 946 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
946 } 947 }
947 948
948 949
949 } } // namespace v8::internal 950 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698