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

Unified Diff: src/ia32/full-codegen-ia32.cc

Issue 15740007: Add for-of Crankshaft support Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase onto master; fix AstTyper for ForOfStatement Created 7 years, 6 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/hydrogen.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/full-codegen-ia32.cc
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
index 82ef657c2900ebb2a89469c4751790c58509092f..09b072516604f2eaf0d6247faa9245c6d69c5e0d 100644
--- a/src/ia32/full-codegen-ia32.cc
+++ b/src/ia32/full-codegen-ia32.cc
@@ -1213,16 +1213,6 @@ void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
__ CompareRoot(eax, Heap::kNullValueRootIndex);
__ j(equal, loop_statement.break_label());
- // Convert the iterator to a JS object.
- Label convert, done_convert;
- __ JumpIfSmi(eax, &convert);
- __ CmpObjectType(eax, FIRST_SPEC_OBJECT_TYPE, ecx);
- __ j(above_equal, &done_convert);
- __ bind(&convert);
- __ push(eax);
- __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION);
- __ bind(&done_convert);
-
// Loop entry.
__ bind(loop_statement.continue_label());
@@ -1237,14 +1227,15 @@ void FullCodeGenerator::VisitForOfStatement(ForOfStatement* stmt) {
&result_not_done);
__ bind(&result_not_done);
+ PrepareForBailoutForId(stmt->BodyId(), NO_REGISTERS);
+
// each = result.value
VisitForEffect(stmt->assign_each());
// Generate code for the body of the loop.
Visit(stmt->body());
- // Check stack before looping.
- PrepareForBailoutForId(stmt->BackEdgeId(), NO_REGISTERS);
+ // Loop.
EmitBackEdgeBookkeeping(stmt, loop_statement.continue_label());
__ jmp(loop_statement.continue_label());
« no previous file with comments | « src/hydrogen.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698