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

Side by Side Diff: src/interpreter/control-flow-builders.cc

Issue 1422033002: [Interpreter] Add support for for..in. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment nits. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/control-flow-builders.h" 5 #include "src/interpreter/control-flow-builders.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace interpreter { 9 namespace interpreter {
10 10
(...skipping 13 matching lines...) Expand all
24 BindLabels(target, &break_sites_); 24 BindLabels(target, &break_sites_);
25 } 25 }
26 26
27 27
28 void LoopBuilder::EmitJump(ZoneVector<BytecodeLabel>* sites) { 28 void LoopBuilder::EmitJump(ZoneVector<BytecodeLabel>* sites) {
29 sites->push_back(BytecodeLabel()); 29 sites->push_back(BytecodeLabel());
30 builder()->Jump(&sites->back()); 30 builder()->Jump(&sites->back());
31 } 31 }
32 32
33 33
34 void LoopBuilder::EmitJumpIfTrue(ZoneVector<BytecodeLabel>* sites) {
35 sites->push_back(BytecodeLabel());
36 builder()->JumpIfTrue(&sites->back());
37 }
38
39
40 void LoopBuilder::EmitJumpIfUndefined(ZoneVector<BytecodeLabel>* sites) {
41 sites->push_back(BytecodeLabel());
42 builder()->JumpIfUndefined(&sites->back());
43 }
44
45
46 void LoopBuilder::EmitJumpIfNull(ZoneVector<BytecodeLabel>* sites) {
47 sites->push_back(BytecodeLabel());
48 builder()->JumpIfNull(&sites->back());
49 }
50
51
34 void LoopBuilder::BindLabels(const BytecodeLabel& target, 52 void LoopBuilder::BindLabels(const BytecodeLabel& target,
35 ZoneVector<BytecodeLabel>* sites) { 53 ZoneVector<BytecodeLabel>* sites) {
36 for (size_t i = 0; i < sites->size(); i++) { 54 for (size_t i = 0; i < sites->size(); i++) {
37 BytecodeLabel& site = sites->at(i); 55 BytecodeLabel& site = sites->at(i);
38 builder()->Bind(target, &site); 56 builder()->Bind(target, &site);
39 } 57 }
40 sites->clear(); 58 sites->clear();
41 } 59 }
42 60
43 } // namespace interpreter 61 } // namespace interpreter
44 } // namespace internal 62 } // namespace internal
45 } // namespace v8 63 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698