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

Unified Diff: src/compiler.cc

Issue 1010673004: Tweak the TurboFan pipeline for stub compilation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed feedback Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b622d9ce8574932f79225fcef40f9ec7b6997da4..d31cbeac851d3ef01ebe008e3e0c03e60c8a2ea3 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -221,33 +221,21 @@ void CompilationInfo::RollbackDependencies() {
int CompilationInfo::num_parameters() const {
- if (IsStub()) {
- DCHECK(parameter_count_ > 0);
- return parameter_count_;
- } else {
- return scope()->num_parameters();
- }
+ return has_scope() ? scope()->num_parameters() : parameter_count_;
}
int CompilationInfo::num_heap_slots() const {
- if (IsStub()) {
- return 0;
- } else {
- return scope()->num_heap_slots();
- }
+ return has_scope() ? scope()->num_heap_slots() : 0;
}
Code::Flags CompilationInfo::flags() const {
- if (IsStub()) {
- return Code::ComputeFlags(code_stub()->GetCodeKind(),
- code_stub()->GetICState(),
- code_stub()->GetExtraICState(),
- code_stub()->GetStubType());
- } else {
- return Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
- }
+ return code_stub() != nullptr
+ ? Code::ComputeFlags(
+ code_stub()->GetCodeKind(), code_stub()->GetICState(),
+ code_stub()->GetExtraICState(), code_stub()->GetStubType())
+ : Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
}
« no previous file with comments | « src/compiler.h ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698