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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3493 ConsStringIteratorOp op; | 3493 ConsStringIteratorOp op; |
3494 StringCharacterStream stream(String::cast(script->source()), | 3494 StringCharacterStream stream(String::cast(script->source()), |
3495 &op, | 3495 &op, |
3496 shared->start_position()); | 3496 shared->start_position()); |
3497 // fun->end_position() points to the last character in the stream. We | 3497 // fun->end_position() points to the last character in the stream. We |
3498 // need to compensate by adding one to calculate the length. | 3498 // need to compensate by adding one to calculate the length. |
3499 int source_len = | 3499 int source_len = |
3500 shared->end_position() - shared->start_position() + 1; | 3500 shared->end_position() - shared->start_position() + 1; |
3501 for (int i = 0; i < source_len; i++) { | 3501 for (int i = 0; i < source_len; i++) { |
3502 if (stream.HasMore()) { | 3502 if (stream.HasMore()) { |
3503 os << AsUC16(stream.GetNext()); | 3503 os << AsReversiblyEscapedUC16(stream.GetNext()); |
3504 } | 3504 } |
3505 } | 3505 } |
3506 } | 3506 } |
3507 | 3507 |
3508 os << "\n--- END ---\n"; | 3508 os << "\n--- END ---\n"; |
3509 } | 3509 } |
3510 } | 3510 } |
3511 } | 3511 } |
3512 | 3512 |
3513 int inline_id = next_inline_id_++; | 3513 int inline_id = next_inline_id_++; |
(...skipping 8977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12491 if (ShouldProduceTraceOutput()) { | 12491 if (ShouldProduceTraceOutput()) { |
12492 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 12492 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
12493 } | 12493 } |
12494 | 12494 |
12495 #ifdef DEBUG | 12495 #ifdef DEBUG |
12496 graph_->Verify(false); // No full verify. | 12496 graph_->Verify(false); // No full verify. |
12497 #endif | 12497 #endif |
12498 } | 12498 } |
12499 | 12499 |
12500 } } // namespace v8::internal | 12500 } } // namespace v8::internal |
OLD | NEW |