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

Unified Diff: src/compiler.cc

Issue 71783003: Reland and fix "Add support for keyed-call on arrays of fast elements" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test + fix Created 7 years, 1 month 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/deoptimizer.cc » ('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 e86baa02aa3faee01657ee2a7bc980dfc25210b0..1ec2626da9b2ce22eefd25de31468035ba3804c1 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -59,7 +59,8 @@ CompilationInfo::CompilationInfo(Handle<Script> script,
: flags_(LanguageModeField::encode(CLASSIC_MODE)),
script_(script),
osr_ast_id_(BailoutId::None()),
- osr_pc_offset_(0) {
+ osr_pc_offset_(0),
+ parameter_count_(0) {
Initialize(script->GetIsolate(), BASE, zone);
}
@@ -70,7 +71,8 @@ CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info,
shared_info_(shared_info),
script_(Handle<Script>(Script::cast(shared_info->script()))),
osr_ast_id_(BailoutId::None()),
- osr_pc_offset_(0) {
+ osr_pc_offset_(0),
+ parameter_count_(0) {
Initialize(script_->GetIsolate(), BASE, zone);
}
@@ -83,7 +85,8 @@ CompilationInfo::CompilationInfo(Handle<JSFunction> closure,
script_(Handle<Script>(Script::cast(shared_info_->script()))),
context_(closure->context()),
osr_ast_id_(BailoutId::None()),
- osr_pc_offset_(0) {
+ osr_pc_offset_(0),
+ parameter_count_(0) {
Initialize(script_->GetIsolate(), BASE, zone);
}
@@ -94,7 +97,8 @@ CompilationInfo::CompilationInfo(HydrogenCodeStub* stub,
: flags_(LanguageModeField::encode(CLASSIC_MODE) |
IsLazy::encode(true)),
osr_ast_id_(BailoutId::None()),
- osr_pc_offset_(0) {
+ osr_pc_offset_(0),
+ parameter_count_(0) {
Initialize(isolate, STUB, zone);
code_stub_ = stub;
}
@@ -184,8 +188,12 @@ void CompilationInfo::RollbackDependencies() {
int CompilationInfo::num_parameters() const {
- ASSERT(!IsStub());
- return scope()->num_parameters();
+ if (IsStub()) {
+ ASSERT(parameter_count_ > 0);
+ return parameter_count_;
+ } else {
+ return scope()->num_parameters();
+ }
}
« no previous file with comments | « src/compiler.h ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698