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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1384 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); | 1384 Handle<FixedArray> literals = NewFixedArray(number_of_literals, pretenure); |
1385 result->set_literals(*literals); | 1385 result->set_literals(*literals); |
1386 } | 1386 } |
1387 | 1387 |
1388 if (index > 0) { | 1388 if (index > 0) { |
1389 // Caching of optimized code enabled and optimized code found. | 1389 // Caching of optimized code enabled and optimized code found. |
1390 FixedArray* literals = info->GetLiteralsFromOptimizedCodeMap(index); | 1390 FixedArray* literals = info->GetLiteralsFromOptimizedCodeMap(index); |
1391 if (literals != NULL) result->set_literals(literals); | 1391 if (literals != NULL) result->set_literals(literals); |
1392 Code* code = info->GetCodeFromOptimizedCodeMap(index); | 1392 Code* code = info->GetCodeFromOptimizedCodeMap(index); |
1393 DCHECK(!code->marked_for_deoptimization()); | 1393 DCHECK(!code->marked_for_deoptimization()); |
| 1394 DCHECK(result->shared()->is_compiled()); |
1394 result->ReplaceCode(code); | 1395 result->ReplaceCode(code); |
1395 } | 1396 } |
1396 | 1397 |
1397 return result; | 1398 return result; |
1398 } | 1399 } |
1399 | 1400 |
1400 | 1401 |
1401 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { | 1402 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { |
1402 Handle<FixedArray> array = NewFixedArray(length, TENURED); | 1403 Handle<FixedArray> array = NewFixedArray(length, TENURED); |
1403 array->set_map_no_write_barrier(*scope_info_map()); | 1404 array->set_map_no_write_barrier(*scope_info_map()); |
(...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2429 } | 2430 } |
2430 | 2431 |
2431 | 2432 |
2432 Handle<Object> Factory::ToBoolean(bool value) { | 2433 Handle<Object> Factory::ToBoolean(bool value) { |
2433 return value ? true_value() : false_value(); | 2434 return value ? true_value() : false_value(); |
2434 } | 2435 } |
2435 | 2436 |
2436 | 2437 |
2437 } // namespace internal | 2438 } // namespace internal |
2438 } // namespace v8 | 2439 } // namespace v8 |
OLD | NEW |