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

Unified Diff: src/code-stubs.cc

Issue 2227723003: Fix mistake in FastNewFunctionContextStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index e38cf02a3615ba591dc947a09cd6322e817aedad..f458e5e465a8c8c0ed83429f797a201ee004984a 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -4797,14 +4797,14 @@ compiler::Node* FastNewFunctionContextStub::Generate(
assembler->Bind(&loop);
{
Node* slot_index = var_slot_index.value();
- // check for < length later, there are at least Context::MIN_CONTEXT_SLOTS
+ assembler->GotoUnless(assembler->Int32LessThan(slot_index, length),
+ &after_loop);
assembler->StoreFixedArrayElement(function_context, slot_index, undefined,
SKIP_WRITE_BARRIER);
Node* one = assembler->Int32Constant(1);
Node* next_index = assembler->Int32Add(slot_index, one);
var_slot_index.Bind(next_index);
- assembler->Branch(assembler->Int32LessThan(next_index, length), &loop,
- &after_loop);
+ assembler->Goto(&loop);
}
assembler->Bind(&after_loop);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698