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

Side by Side Diff: src/string-builder.cc

Issue 1322883002: Make isolate.h usable without objects-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-includes-frames-2
Patch Set: Rebased. Created 5 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
« no previous file with comments | « src/runtime/runtime-uri.cc ('k') | src/v8threads.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/string-builder.h" 5 #include "src/string-builder.h"
6 6
7 #include "src/isolate-inl.h"
7 #include "src/objects-inl.h" 8 #include "src/objects-inl.h"
8 9
9 namespace v8 { 10 namespace v8 {
10 namespace internal { 11 namespace internal {
11 12
12 MaybeHandle<String> ReplacementStringBuilder::ToString() { 13 MaybeHandle<String> ReplacementStringBuilder::ToString() {
13 Isolate* isolate = heap_->isolate(); 14 Isolate* isolate = heap_->isolate();
14 if (array_builder_.length() == 0) { 15 if (array_builder_.length() == 0) {
15 return isolate->factory()->empty_string(); 16 return isolate->factory()->empty_string();
16 } 17 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 102
102 void IncrementalStringBuilder::AppendString(Handle<String> string) { 103 void IncrementalStringBuilder::AppendString(Handle<String> string) {
103 ShrinkCurrentPart(); 104 ShrinkCurrentPart();
104 part_length_ = kInitialPartLength; // Allocate conservatively. 105 part_length_ = kInitialPartLength; // Allocate conservatively.
105 Extend(); // Attach current part and allocate new part. 106 Extend(); // Attach current part and allocate new part.
106 Accumulate(string); 107 Accumulate(string);
107 } 108 }
108 } // namespace internal 109 } // namespace internal
109 } // namespace v8 110 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-uri.cc ('k') | src/v8threads.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698