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

Side by Side Diff: src/factory.cc

Issue 1252473002: Reduce SharedFunctionInfo size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects-inl.h » ('J')
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/factory.h" 5 #include "src/factory.h"
6 6
7 #include "src/allocation-site-scopes.h" 7 #include "src/allocation-site-scopes.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 2251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 2262
2263 // We tenure the allocated string since it is referenced from the 2263 // We tenure the allocated string since it is referenced from the
2264 // number-string cache which lives in the old space. 2264 // number-string cache which lives in the old space.
2265 Handle<String> js_string = NewStringFromAsciiChecked(str, TENURED); 2265 Handle<String> js_string = NewStringFromAsciiChecked(str, TENURED);
2266 SetNumberStringCache(number, js_string); 2266 SetNumberStringCache(number, js_string);
2267 return js_string; 2267 return js_string;
2268 } 2268 }
2269 2269
2270 2270
2271 Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) { 2271 Handle<DebugInfo> Factory::NewDebugInfo(Handle<SharedFunctionInfo> shared) {
2272 // API functions cannot be debugged and cannot have a debug info.
2273 DCHECK(!shared->IsApiFunction());
2272 // Allocate initial fixed array for active break points before allocating the 2274 // Allocate initial fixed array for active break points before allocating the
2273 // debug info object to avoid allocation while setting up the debug info 2275 // debug info object to avoid allocation while setting up the debug info
2274 // object. 2276 // object.
2275 Handle<FixedArray> break_points( 2277 Handle<FixedArray> break_points(
2276 NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction)); 2278 NewFixedArray(DebugInfo::kEstimatedNofBreakPointsInFunction));
2277 2279
2278 // Create and set up the debug info object. Debug info contains function, a 2280 // Create and set up the debug info object. Debug info contains function, a
2279 // copy of the original code, the executing code and initial fixed array for 2281 // copy of the original code, the executing code and initial fixed array for
2280 // active break points. 2282 // active break points.
2281 Handle<DebugInfo> debug_info = 2283 Handle<DebugInfo> debug_info =
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2419 } 2421 }
2420 2422
2421 2423
2422 Handle<Object> Factory::ToBoolean(bool value) { 2424 Handle<Object> Factory::ToBoolean(bool value) {
2423 return value ? true_value() : false_value(); 2425 return value ? true_value() : false_value();
2424 } 2426 }
2425 2427
2426 2428
2427 } // namespace internal 2429 } // namespace internal
2428 } // namespace v8 2430 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698