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

Side by Side Diff: src/factory.cc

Issue 1516833002: Tighten the interface to the optimized code map (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nit. Created 5 years 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.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 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1361 1361
1362 } else if (!info->bound()) { 1362 } else if (!info->bound()) {
1363 int number_of_literals = info->num_literals(); 1363 int number_of_literals = info->num_literals();
1364 Handle<LiteralsArray> literals = 1364 Handle<LiteralsArray> literals =
1365 LiteralsArray::New(isolate(), handle(info->feedback_vector()), 1365 LiteralsArray::New(isolate(), handle(info->feedback_vector()),
1366 number_of_literals, pretenure); 1366 number_of_literals, pretenure);
1367 result->set_literals(*literals); 1367 result->set_literals(*literals);
1368 1368
1369 // Cache context-specific literals. 1369 // Cache context-specific literals.
1370 Handle<Context> native_context(context->native_context()); 1370 Handle<Context> native_context(context->native_context());
1371 SharedFunctionInfo::AddToOptimizedCodeMap( 1371 SharedFunctionInfo::AddLiteralsToOptimizedCodeMap(
1372 info, native_context, undefined_value(), literals, BailoutId::None()); 1372 info, native_context, literals, BailoutId::None());
1373 } 1373 }
1374 1374
1375 return result; 1375 return result;
1376 } 1376 }
1377 1377
1378 1378
1379 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { 1379 Handle<ScopeInfo> Factory::NewScopeInfo(int length) {
1380 Handle<FixedArray> array = NewFixedArray(length, TENURED); 1380 Handle<FixedArray> array = NewFixedArray(length, TENURED);
1381 array->set_map_no_write_barrier(*scope_info_map()); 1381 array->set_map_no_write_barrier(*scope_info_map());
1382 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast(array); 1382 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast(array);
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 } 2321 }
2322 2322
2323 2323
2324 Handle<Object> Factory::ToBoolean(bool value) { 2324 Handle<Object> Factory::ToBoolean(bool value) {
2325 return value ? true_value() : false_value(); 2325 return value ? true_value() : false_value();
2326 } 2326 }
2327 2327
2328 2328
2329 } // namespace internal 2329 } // namespace internal
2330 } // namespace v8 2330 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698