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

Side by Side Diff: src/factory.cc

Issue 441273002: Reland "Make --always-opt also optimize toplevel code." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Well, yeah. Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen.cc » ('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/bootstrapper.h"
8 #include "src/conversions.h" 9 #include "src/conversions.h"
9 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
10 #include "src/macro-assembler.h" 11 #include "src/macro-assembler.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 16
16 template<typename T> 17 template<typename T>
17 Handle<T> Factory::New(Handle<Map> map, AllocationSpace space) { 18 Handle<T> Factory::New(Handle<Map> map, AllocationSpace space) {
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 if (literals != NULL) result->set_literals(literals); 1371 if (literals != NULL) result->set_literals(literals);
1371 Code* code = info->GetCodeFromOptimizedCodeMap(index); 1372 Code* code = info->GetCodeFromOptimizedCodeMap(index);
1372 DCHECK(!code->marked_for_deoptimization()); 1373 DCHECK(!code->marked_for_deoptimization());
1373 result->ReplaceCode(code); 1374 result->ReplaceCode(code);
1374 return result; 1375 return result;
1375 } 1376 }
1376 1377
1377 if (isolate()->use_crankshaft() && 1378 if (isolate()->use_crankshaft() &&
1378 FLAG_always_opt && 1379 FLAG_always_opt &&
1379 result->is_compiled() && 1380 result->is_compiled() &&
1380 !info->is_toplevel() && 1381 // TODO(mstarzinger): Extend to optimization of builtin code.
1382 !isolate()->bootstrapper()->IsActive() &&
1381 info->allows_lazy_compilation() && 1383 info->allows_lazy_compilation() &&
1382 !info->optimization_disabled() && 1384 !info->optimization_disabled() &&
1383 !isolate()->DebuggerHasBreakPoints()) { 1385 !isolate()->DebuggerHasBreakPoints()) {
1384 result->MarkForOptimization(); 1386 result->MarkForOptimization();
1385 } 1387 }
1386 return result; 1388 return result;
1387 } 1389 }
1388 1390
1389 1391
1390 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { 1392 Handle<ScopeInfo> Factory::NewScopeInfo(int length) {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2370 return Handle<Object>::null(); 2372 return Handle<Object>::null();
2371 } 2373 }
2372 2374
2373 2375
2374 Handle<Object> Factory::ToBoolean(bool value) { 2376 Handle<Object> Factory::ToBoolean(bool value) {
2375 return value ? true_value() : false_value(); 2377 return value ? true_value() : false_value();
2376 } 2378 }
2377 2379
2378 2380
2379 } } // namespace v8::internal 2381 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/lithium-codegen-arm64.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698