OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |