| 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/conversions.h" | 9 #include "src/conversions.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1412 FixedArray* literals = info->GetLiteralsFromOptimizedCodeMap(index); | 1412 FixedArray* literals = info->GetLiteralsFromOptimizedCodeMap(index); |
| 1413 if (literals != NULL) result->set_literals(literals); | 1413 if (literals != NULL) result->set_literals(literals); |
| 1414 Code* code = info->GetCodeFromOptimizedCodeMap(index); | 1414 Code* code = info->GetCodeFromOptimizedCodeMap(index); |
| 1415 DCHECK(!code->marked_for_deoptimization()); | 1415 DCHECK(!code->marked_for_deoptimization()); |
| 1416 result->ReplaceCode(code); | 1416 result->ReplaceCode(code); |
| 1417 return result; | 1417 return result; |
| 1418 } | 1418 } |
| 1419 | 1419 |
| 1420 if (FLAG_always_opt && ShouldOptimizeNewClosure(isolate(), info)) { | 1420 if (FLAG_always_opt && ShouldOptimizeNewClosure(isolate(), info)) { |
| 1421 result->MarkForOptimization(); | 1421 result->MarkForOptimization(); |
| 1422 } else if (info->optimize_next_closure() && | |
| 1423 ShouldOptimizeNewClosure(isolate(), info)) { | |
| 1424 result->AttemptConcurrentOptimization(); | |
| 1425 } | 1422 } |
| 1426 return result; | 1423 return result; |
| 1427 } | 1424 } |
| 1428 | 1425 |
| 1429 | 1426 |
| 1430 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { | 1427 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { |
| 1431 Handle<FixedArray> array = NewFixedArray(length, TENURED); | 1428 Handle<FixedArray> array = NewFixedArray(length, TENURED); |
| 1432 array->set_map_no_write_barrier(*scope_info_map()); | 1429 array->set_map_no_write_barrier(*scope_info_map()); |
| 1433 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast(array); | 1430 Handle<ScopeInfo> scope_info = Handle<ScopeInfo>::cast(array); |
| 1434 return scope_info; | 1431 return scope_info; |
| (...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2521 return Handle<Object>::null(); | 2518 return Handle<Object>::null(); |
| 2522 } | 2519 } |
| 2523 | 2520 |
| 2524 | 2521 |
| 2525 Handle<Object> Factory::ToBoolean(bool value) { | 2522 Handle<Object> Factory::ToBoolean(bool value) { |
| 2526 return value ? true_value() : false_value(); | 2523 return value ? true_value() : false_value(); |
| 2527 } | 2524 } |
| 2528 | 2525 |
| 2529 | 2526 |
| 2530 } } // namespace v8::internal | 2527 } } // namespace v8::internal |
| OLD | NEW |