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

Unified Diff: src/contexts.cc

Issue 1317383002: Crankshaft is now able to compile top level code even if there is a ScriptContext. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/contexts.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 37021ac7f67f789e33bdf6f91d876fc99eb4c551..d66a33043424c6cb13fc15214e3a97c4f3f36243 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -18,7 +18,7 @@ Handle<ScriptContextTable> ScriptContextTable::Extend(
int used = table->used();
int length = table->length();
CHECK(used >= 0 && length > 0 && used < length);
- if (used + 1 == length) {
+ if (used + kFirstContextSlot == length) {
CHECK(length < Smi::kMaxValue / 2);
Isolate* isolate = table->GetIsolate();
Handle<FixedArray> copy =
@@ -31,7 +31,7 @@ Handle<ScriptContextTable> ScriptContextTable::Extend(
result->set_used(used + 1);
DCHECK(script_context->IsScriptContext());
- result->set(used + 1, *script_context);
+ result->set(used + kFirstContextSlot, *script_context);
return result;
}
« no previous file with comments | « src/contexts.h ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698