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

Side by Side Diff: src/hydrogen.cc

Issue 663313003: Cleanup ConsStringIteratorOp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/codegen.cc ('k') | src/isolate.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/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 3491 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 inlined_functions_.Add(InlinedFunctionInfo(shared), zone()); 3502 inlined_functions_.Add(InlinedFunctionInfo(shared), zone());
3503 3503
3504 if (!shared->script()->IsUndefined()) { 3504 if (!shared->script()->IsUndefined()) {
3505 Handle<Script> script(Script::cast(shared->script())); 3505 Handle<Script> script(Script::cast(shared->script()));
3506 if (!script->source()->IsUndefined()) { 3506 if (!script->source()->IsUndefined()) {
3507 CodeTracer::Scope tracing_scopex(isolate()->GetCodeTracer()); 3507 CodeTracer::Scope tracing_scopex(isolate()->GetCodeTracer());
3508 OFStream os(tracing_scopex.file()); 3508 OFStream os(tracing_scopex.file());
3509 os << "--- FUNCTION SOURCE (" << shared->DebugName()->ToCString().get() 3509 os << "--- FUNCTION SOURCE (" << shared->DebugName()->ToCString().get()
3510 << ") id{" << info()->optimization_id() << "," << id << "} ---\n"; 3510 << ") id{" << info()->optimization_id() << "," << id << "} ---\n";
3511 { 3511 {
3512 ConsStringIteratorOp op;
3513 StringCharacterStream stream(String::cast(script->source()), 3512 StringCharacterStream stream(String::cast(script->source()),
3514 &op,
3515 shared->start_position()); 3513 shared->start_position());
3516 // fun->end_position() points to the last character in the stream. We 3514 // fun->end_position() points to the last character in the stream. We
3517 // need to compensate by adding one to calculate the length. 3515 // need to compensate by adding one to calculate the length.
3518 int source_len = 3516 int source_len =
3519 shared->end_position() - shared->start_position() + 1; 3517 shared->end_position() - shared->start_position() + 1;
3520 for (int i = 0; i < source_len; i++) { 3518 for (int i = 0; i < source_len; i++) {
3521 if (stream.HasMore()) { 3519 if (stream.HasMore()) {
3522 os << AsReversiblyEscapedUC16(stream.GetNext()); 3520 os << AsReversiblyEscapedUC16(stream.GetNext());
3523 } 3521 }
3524 } 3522 }
(...skipping 9130 matching lines...) Expand 10 before | Expand all | Expand 10 after
12655 if (ShouldProduceTraceOutput()) { 12653 if (ShouldProduceTraceOutput()) {
12656 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12654 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12657 } 12655 }
12658 12656
12659 #ifdef DEBUG 12657 #ifdef DEBUG
12660 graph_->Verify(false); // No full verify. 12658 graph_->Verify(false); // No full verify.
12661 #endif 12659 #endif
12662 } 12660 }
12663 12661
12664 } } // namespace v8::internal 12662 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698