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

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: Removed spurious edit 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 35c581f6b09b2bdb09fc3edb499e15ced5005e43..4ab16c5750b052ac0ae2d541ce423feffe4d2423 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 scope() == nullptr ? parameter_count_ : scope()->num_parameters();
}
int CompilationInfo::num_heap_slots() const {
- if (IsStub()) {
- return 0;
- } else {
- return scope()->num_heap_slots();
- }
+ return scope() == nullptr ? 0 : scope()->num_heap_slots();
}
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') | src/compiler/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698