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

Side by Side Diff: src/factory.cc

Issue 1374723002: Introduce LiteralsArray to hide it's implementation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break. Created 5 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
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/full-codegen/arm/full-codegen-arm.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/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 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 DCHECK(!cached.code->marked_for_deoptimization()); 1335 DCHECK(!cached.code->marked_for_deoptimization());
1336 DCHECK(result->shared()->is_compiled()); 1336 DCHECK(result->shared()->is_compiled());
1337 result->ReplaceCode(cached.code); 1337 result->ReplaceCode(cached.code);
1338 } 1338 }
1339 1339
1340 if (cached.literals != nullptr) { 1340 if (cached.literals != nullptr) {
1341 result->set_literals(cached.literals); 1341 result->set_literals(cached.literals);
1342 1342
1343 } else if (!info->bound()) { 1343 } else if (!info->bound()) {
1344 int number_of_literals = info->num_literals(); 1344 int number_of_literals = info->num_literals();
1345 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); 1345 Handle<LiteralsArray> literals =
1346 LiteralsArray::New(isolate(), handle(info->feedback_vector()),
1347 number_of_literals, pretenure);
1346 result->set_literals(*literals); 1348 result->set_literals(*literals);
1347 // Cache context-specific literals. 1349 // Cache context-specific literals.
1348 if (FLAG_cache_optimized_code) { 1350 if (FLAG_cache_optimized_code) {
1349 Handle<Context> native_context(context->native_context()); 1351 Handle<Context> native_context(context->native_context());
1350 SharedFunctionInfo::AddToOptimizedCodeMap( 1352 SharedFunctionInfo::AddToOptimizedCodeMap(
1351 info, native_context, undefined_value(), literals, BailoutId::None()); 1353 info, native_context, undefined_value(), literals, BailoutId::None());
1352 } 1354 }
1353 } 1355 }
1354 1356
1355 return result; 1357 return result;
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 } 2394 }
2393 2395
2394 2396
2395 Handle<Object> Factory::ToBoolean(bool value) { 2397 Handle<Object> Factory::ToBoolean(bool value) {
2396 return value ? true_value() : false_value(); 2398 return value ? true_value() : false_value();
2397 } 2399 }
2398 2400
2399 2401
2400 } // namespace internal 2402 } // namespace internal
2401 } // namespace v8 2403 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/liveedit.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698