| 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/bootstrapper.h" | |
| 9 #include "src/conversions.h" | 8 #include "src/conversions.h" |
| 10 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 11 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| 12 | 11 |
| 13 namespace v8 { | 12 namespace v8 { |
| 14 namespace internal { | 13 namespace internal { |
| 15 | 14 |
| 16 | 15 |
| 17 template<typename T> | 16 template<typename T> |
| 18 Handle<T> Factory::New(Handle<Map> map, AllocationSpace space) { | 17 Handle<T> Factory::New(Handle<Map> map, AllocationSpace space) { |
| (...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 Code* code = info->GetCodeFromOptimizedCodeMap(index); | 1366 Code* code = info->GetCodeFromOptimizedCodeMap(index); |
| 1368 ASSERT(!code->marked_for_deoptimization()); | 1367 ASSERT(!code->marked_for_deoptimization()); |
| 1369 result->ReplaceCode(code); | 1368 result->ReplaceCode(code); |
| 1370 return result; | 1369 return result; |
| 1371 } | 1370 } |
| 1372 | 1371 |
| 1373 if (isolate()->use_crankshaft() && | 1372 if (isolate()->use_crankshaft() && |
| 1374 FLAG_always_opt && | 1373 FLAG_always_opt && |
| 1375 result->is_compiled() && | 1374 result->is_compiled() && |
| 1376 !info->is_toplevel() && | 1375 !info->is_toplevel() && |
| 1377 // TODO(mstarzinger): Extend to optimization of builtin code. | |
| 1378 !isolate()->bootstrapper()->IsActive() && | |
| 1379 info->allows_lazy_compilation() && | 1376 info->allows_lazy_compilation() && |
| 1380 !info->optimization_disabled() && | 1377 !info->optimization_disabled() && |
| 1381 !isolate()->DebuggerHasBreakPoints()) { | 1378 !isolate()->DebuggerHasBreakPoints()) { |
| 1382 result->MarkForOptimization(); | 1379 result->MarkForOptimization(); |
| 1383 } | 1380 } |
| 1384 return result; | 1381 return result; |
| 1385 } | 1382 } |
| 1386 | 1383 |
| 1387 | 1384 |
| 1388 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { | 1385 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2368 return Handle<Object>::null(); | 2365 return Handle<Object>::null(); |
| 2369 } | 2366 } |
| 2370 | 2367 |
| 2371 | 2368 |
| 2372 Handle<Object> Factory::ToBoolean(bool value) { | 2369 Handle<Object> Factory::ToBoolean(bool value) { |
| 2373 return value ? true_value() : false_value(); | 2370 return value ? true_value() : false_value(); |
| 2374 } | 2371 } |
| 2375 | 2372 |
| 2376 | 2373 |
| 2377 } } // namespace v8::internal | 2374 } } // namespace v8::internal |
| OLD | NEW |