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

Side by Side Diff: src/ast/ast.cc

Issue 1511773009: Revert of [es6] support AssignmentPattern as LHS in for-in/of loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ast/ast.h" 5 #include "src/ast/ast.h"
6 6
7 #include <cmath> // For isfinite. 7 #include <cmath> // For isfinite.
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins.h" 9 #include "src/builtins.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ? FeedbackVectorSlotKind::KEYED_STORE_IC 130 ? FeedbackVectorSlotKind::KEYED_STORE_IC
131 : FeedbackVectorSlotKind::STORE_IC; 131 : FeedbackVectorSlotKind::STORE_IC;
132 *out_slot = spec->AddSlot(kind); 132 *out_slot = spec->AddSlot(kind);
133 } 133 }
134 } 134 }
135 135
136 136
137 void ForEachStatement::AssignFeedbackVectorSlots( 137 void ForEachStatement::AssignFeedbackVectorSlots(
138 Isolate* isolate, FeedbackVectorSpec* spec, 138 Isolate* isolate, FeedbackVectorSpec* spec,
139 FeedbackVectorSlotCache* cache) { 139 FeedbackVectorSlotCache* cache) {
140 // TODO(caitp): for-of statements do not make use of this feedback slot.
141 // The each_slot_ should be specific to ForInStatement, and this work moved
142 // there.
143 if (IsForOfStatement()) return;
144 AssignVectorSlots(each(), spec, &each_slot_); 140 AssignVectorSlots(each(), spec, &each_slot_);
145 } 141 }
146 142
147 143
148 Assignment::Assignment(Zone* zone, Token::Value op, Expression* target, 144 Assignment::Assignment(Zone* zone, Token::Value op, Expression* target,
149 Expression* value, int pos) 145 Expression* value, int pos)
150 : Expression(zone, pos), 146 : Expression(zone, pos),
151 bit_field_( 147 bit_field_(
152 IsUninitializedField::encode(false) | KeyTypeField::encode(ELEMENT) | 148 IsUninitializedField::encode(false) | KeyTypeField::encode(ELEMENT) |
153 StoreModeField::encode(STANDARD_STORE) | TokenField::encode(op)), 149 StoreModeField::encode(STANDARD_STORE) | TokenField::encode(op)),
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 bool Literal::Match(void* literal1, void* literal2) { 1143 bool Literal::Match(void* literal1, void* literal2) {
1148 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); 1144 const AstValue* x = static_cast<Literal*>(literal1)->raw_value();
1149 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); 1145 const AstValue* y = static_cast<Literal*>(literal2)->raw_value();
1150 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || 1146 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) ||
1151 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); 1147 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber());
1152 } 1148 }
1153 1149
1154 1150
1155 } // namespace internal 1151 } // namespace internal
1156 } // namespace v8 1152 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698