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

Side by Side Diff: src/factory.cc

Issue 1161393007: OLD type Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/deoptimizer.cc ('k') | src/flag-definitions.h » ('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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 Handle<JSFunction> result = NewFunction(map, info, context, pretenure); 1371 Handle<JSFunction> result = NewFunction(map, info, context, pretenure);
1372 1372
1373 if (info->ic_age() != isolate()->heap()->global_ic_age()) { 1373 if (info->ic_age() != isolate()->heap()->global_ic_age()) {
1374 info->ResetForNewContext(isolate()->heap()->global_ic_age()); 1374 info->ResetForNewContext(isolate()->heap()->global_ic_age());
1375 } 1375 }
1376 1376
1377 if (FLAG_always_opt && info->allows_lazy_compilation()) { 1377 if (FLAG_always_opt && info->allows_lazy_compilation()) {
1378 result->MarkForOptimization(); 1378 result->MarkForOptimization();
1379 } 1379 }
1380 1380
1381 if (info->asm_mode() == ASM_FUNCTION) {
1382 DCHECK(info->num_literals() == 0);
1383 DCHECK(info->asm_code()->kind() == Code::OPTIMIZED_FUNCTION);
1384 result->ReplaceCode(info->asm_code());
1385 if (FLAG_trace_asm) {
1386 PrintF("[asm: installing function %s]\n",
1387 info->DebugName()->ToCString().get());
1388 }
1389 return result;
1390 }
1391
1381 int index = info->SearchOptimizedCodeMap(context->native_context(), 1392 int index = info->SearchOptimizedCodeMap(context->native_context(),
1382 BailoutId::None()); 1393 BailoutId::None());
1383 if (!info->bound() && index < 0) { 1394 if (!info->bound() && index < 0) {
1384 int number_of_literals = info->num_literals(); 1395 int number_of_literals = info->num_literals();
1385 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); 1396 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure);
1386 result->set_literals(*literals); 1397 result->set_literals(*literals);
1387 } 1398 }
1388 1399
1389 if (index > 0) { 1400 if (index > 0) {
1390 // Caching of optimized code enabled and optimized code found. 1401 // Caching of optimized code enabled and optimized code found.
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 } 2442 }
2432 2443
2433 2444
2434 Handle<Object> Factory::ToBoolean(bool value) { 2445 Handle<Object> Factory::ToBoolean(bool value) {
2435 return value ? true_value() : false_value(); 2446 return value ? true_value() : false_value();
2436 } 2447 }
2437 2448
2438 2449
2439 } // namespace internal 2450 } // namespace internal
2440 } // namespace v8 2451 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698