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

Side by Side Diff: src/compiler.cc

Issue 755883003: Refactor use of Isolate::use_crankshaft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove bogus assert Created 6 years 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
« no previous file with comments | « no previous file | src/objects.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 Handle<Code> cached_code; 1375 Handle<Code> cached_code;
1376 if (GetCodeFromOptimizedCodeMap( 1376 if (GetCodeFromOptimizedCodeMap(
1377 function, osr_ast_id).ToHandle(&cached_code)) { 1377 function, osr_ast_id).ToHandle(&cached_code)) {
1378 return cached_code; 1378 return cached_code;
1379 } 1379 }
1380 1380
1381 SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(function)); 1381 SmartPointer<CompilationInfo> info(new CompilationInfoWithZone(function));
1382 Isolate* isolate = info->isolate(); 1382 Isolate* isolate = info->isolate();
1383 DCHECK(AllowCompilation::IsAllowed(isolate)); 1383 DCHECK(AllowCompilation::IsAllowed(isolate));
1384 VMState<COMPILER> state(isolate); 1384 VMState<COMPILER> state(isolate);
1385 DCHECK(isolate->use_crankshaft());
1385 DCHECK(!isolate->has_pending_exception()); 1386 DCHECK(!isolate->has_pending_exception());
1386 PostponeInterruptsScope postpone(isolate); 1387 PostponeInterruptsScope postpone(isolate);
1387 1388
1388 Handle<SharedFunctionInfo> shared = info->shared_info(); 1389 Handle<SharedFunctionInfo> shared = info->shared_info();
1389 shared->set_optimize_next_closure(false); 1390 shared->set_optimize_next_closure(false);
1390 if (shared->code()->kind() != Code::FUNCTION || 1391 if (shared->code()->kind() != Code::FUNCTION ||
1391 ScopeInfo::Empty(isolate) == shared->scope_info()) { 1392 ScopeInfo::Empty(isolate) == shared->scope_info()) {
1392 // The function was never compiled. Compile it unoptimized first. 1393 // The function was never compiled. Compile it unoptimized first.
1393 // TODO(titzer): reuse the AST and scope info from this compile. 1394 // TODO(titzer): reuse the AST and scope info from this compile.
1394 CompilationInfoWithZone nested(function); 1395 CompilationInfoWithZone nested(function);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 AllowHandleDereference allow_deref; 1500 AllowHandleDereference allow_deref;
1500 bool tracing_on = info()->IsStub() 1501 bool tracing_on = info()->IsStub()
1501 ? FLAG_trace_hydrogen_stubs 1502 ? FLAG_trace_hydrogen_stubs
1502 : (FLAG_trace_hydrogen && 1503 : (FLAG_trace_hydrogen &&
1503 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); 1504 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter));
1504 return (tracing_on && 1505 return (tracing_on &&
1505 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); 1506 base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
1506 } 1507 }
1507 1508
1508 } } // namespace v8::internal 1509 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698