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

Side by Side Diff: src/factory.cc

Issue 410153002: Make --always-opt also optimize toplevel code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jacob Bramley. 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 1347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 if (literals != NULL) result->set_literals(literals); 1366 if (literals != NULL) result->set_literals(literals);
1366 Code* code = info->GetCodeFromOptimizedCodeMap(index); 1367 Code* code = info->GetCodeFromOptimizedCodeMap(index);
1367 ASSERT(!code->marked_for_deoptimization()); 1368 ASSERT(!code->marked_for_deoptimization());
1368 result->ReplaceCode(code); 1369 result->ReplaceCode(code);
1369 return result; 1370 return result;
1370 } 1371 }
1371 1372
1372 if (isolate()->use_crankshaft() && 1373 if (isolate()->use_crankshaft() &&
1373 FLAG_always_opt && 1374 FLAG_always_opt &&
1374 result->is_compiled() && 1375 result->is_compiled() &&
1375 !info->is_toplevel() && 1376 // TODO(mstarzinger): Extend to optimization of builtin code.
1377 !isolate()->bootstrapper()->IsActive() &&
1376 info->allows_lazy_compilation() && 1378 info->allows_lazy_compilation() &&
1377 !info->optimization_disabled() && 1379 !info->optimization_disabled() &&
1378 !isolate()->DebuggerHasBreakPoints()) { 1380 !isolate()->DebuggerHasBreakPoints()) {
1379 result->MarkForOptimization(); 1381 result->MarkForOptimization();
1380 } 1382 }
1381 return result; 1383 return result;
1382 } 1384 }
1383 1385
1384 1386
1385 Handle<ScopeInfo> Factory::NewScopeInfo(int length) { 1387 Handle<ScopeInfo> Factory::NewScopeInfo(int length) {
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
2365 return Handle<Object>::null(); 2367 return Handle<Object>::null();
2366 } 2368 }
2367 2369
2368 2370
2369 Handle<Object> Factory::ToBoolean(bool value) { 2371 Handle<Object> Factory::ToBoolean(bool value) {
2370 return value ? true_value() : false_value(); 2372 return value ? true_value() : false_value();
2371 } 2373 }
2372 2374
2373 2375
2374 } } // namespace v8::internal 2376 } } // 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