Chromium Code Reviews

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 2258073002: [Turbofan]: Use new MachineTypes in access-builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 138 matching lines...)
149 149
150 void JSGenericLowering::LowerJSLoadProperty(Node* node) { 150 void JSGenericLowering::LowerJSLoadProperty(Node* node) {
151 Node* closure = NodeProperties::GetValueInput(node, 2); 151 Node* closure = NodeProperties::GetValueInput(node, 2);
152 Node* effect = NodeProperties::GetEffectInput(node); 152 Node* effect = NodeProperties::GetEffectInput(node);
153 Node* control = NodeProperties::GetControlInput(node); 153 Node* control = NodeProperties::GetControlInput(node);
154 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 154 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
155 const PropertyAccess& p = PropertyAccessOf(node->op()); 155 const PropertyAccess& p = PropertyAccessOf(node->op());
156 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(isolate()); 156 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(isolate());
157 // Load the type feedback vector from the closure. 157 // Load the type feedback vector from the closure.
158 Node* literals = effect = graph()->NewNode( 158 Node* literals = effect = graph()->NewNode(
159 machine()->Load(MachineType::AnyTagged()), closure, 159 machine()->Load(MachineType::TaggedPointer()), closure,
160 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 160 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
161 effect, control); 161 effect, control);
162 Node* vector = effect = graph()->NewNode( 162 Node* vector = effect = graph()->NewNode(
163 machine()->Load(MachineType::AnyTagged()), literals, 163 machine()->Load(MachineType::TaggedPointer()), literals,
164 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 164 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
165 kHeapObjectTag), 165 kHeapObjectTag),
166 effect, control); 166 effect, control);
167 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 167 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
168 node->ReplaceInput(3, vector); 168 node->ReplaceInput(3, vector);
169 node->ReplaceInput(6, effect); 169 node->ReplaceInput(6, effect);
170 ReplaceWithStubCall(node, callable, flags); 170 ReplaceWithStubCall(node, callable, flags);
171 } 171 }
172 172
173 173
174 void JSGenericLowering::LowerJSLoadNamed(Node* node) { 174 void JSGenericLowering::LowerJSLoadNamed(Node* node) {
175 Node* closure = NodeProperties::GetValueInput(node, 1); 175 Node* closure = NodeProperties::GetValueInput(node, 1);
176 Node* effect = NodeProperties::GetEffectInput(node); 176 Node* effect = NodeProperties::GetEffectInput(node);
177 Node* control = NodeProperties::GetControlInput(node); 177 Node* control = NodeProperties::GetControlInput(node);
178 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 178 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
179 NamedAccess const& p = NamedAccessOf(node->op()); 179 NamedAccess const& p = NamedAccessOf(node->op());
180 Callable callable = CodeFactory::LoadICInOptimizedCode(isolate()); 180 Callable callable = CodeFactory::LoadICInOptimizedCode(isolate());
181 // Load the type feedback vector from the closure. 181 // Load the type feedback vector from the closure.
182 Node* literals = effect = graph()->NewNode( 182 Node* literals = effect = graph()->NewNode(
183 machine()->Load(MachineType::AnyTagged()), closure, 183 machine()->Load(MachineType::TaggedPointer()), closure,
184 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 184 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
185 effect, control); 185 effect, control);
186 Node* vector = effect = graph()->NewNode( 186 Node* vector = effect = graph()->NewNode(
187 machine()->Load(MachineType::AnyTagged()), literals, 187 machine()->Load(MachineType::TaggedPointer()), literals,
188 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 188 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
189 kHeapObjectTag), 189 kHeapObjectTag),
190 effect, control); 190 effect, control);
191 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); 191 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
192 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 192 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
193 node->ReplaceInput(3, vector); 193 node->ReplaceInput(3, vector);
194 node->ReplaceInput(6, effect); 194 node->ReplaceInput(6, effect);
195 ReplaceWithStubCall(node, callable, flags); 195 ReplaceWithStubCall(node, callable, flags);
196 } 196 }
197 197
198 198
199 void JSGenericLowering::LowerJSLoadGlobal(Node* node) { 199 void JSGenericLowering::LowerJSLoadGlobal(Node* node) {
200 Node* closure = NodeProperties::GetValueInput(node, 0); 200 Node* closure = NodeProperties::GetValueInput(node, 0);
201 Node* effect = NodeProperties::GetEffectInput(node); 201 Node* effect = NodeProperties::GetEffectInput(node);
202 Node* control = NodeProperties::GetControlInput(node); 202 Node* control = NodeProperties::GetControlInput(node);
203 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 203 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
204 const LoadGlobalParameters& p = LoadGlobalParametersOf(node->op()); 204 const LoadGlobalParameters& p = LoadGlobalParametersOf(node->op());
205 Callable callable = 205 Callable callable =
206 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), p.typeof_mode()); 206 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), p.typeof_mode());
207 // Load the type feedback vector from the closure. 207 // Load the type feedback vector from the closure.
208 Node* literals = effect = graph()->NewNode( 208 Node* literals = effect = graph()->NewNode(
209 machine()->Load(MachineType::AnyTagged()), closure, 209 machine()->Load(MachineType::TaggedPointer()), closure,
210 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 210 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
211 effect, control); 211 effect, control);
212 Node* vector = effect = graph()->NewNode( 212 Node* vector = effect = graph()->NewNode(
213 machine()->Load(MachineType::AnyTagged()), literals, 213 machine()->Load(MachineType::TaggedPointer()), literals,
214 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 214 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
215 kHeapObjectTag), 215 kHeapObjectTag),
216 effect, control); 216 effect, control);
217 node->InsertInput(zone(), 0, jsgraph()->SmiConstant(p.feedback().index())); 217 node->InsertInput(zone(), 0, jsgraph()->SmiConstant(p.feedback().index()));
218 node->ReplaceInput(1, vector); 218 node->ReplaceInput(1, vector);
219 node->ReplaceInput(4, effect); 219 node->ReplaceInput(4, effect);
220 ReplaceWithStubCall(node, callable, flags); 220 ReplaceWithStubCall(node, callable, flags);
221 } 221 }
222 222
223 223
224 void JSGenericLowering::LowerJSStoreProperty(Node* node) { 224 void JSGenericLowering::LowerJSStoreProperty(Node* node) {
225 Node* receiver = NodeProperties::GetValueInput(node, 0); 225 Node* receiver = NodeProperties::GetValueInput(node, 0);
226 Node* key = NodeProperties::GetValueInput(node, 1); 226 Node* key = NodeProperties::GetValueInput(node, 1);
227 Node* value = NodeProperties::GetValueInput(node, 2); 227 Node* value = NodeProperties::GetValueInput(node, 2);
228 Node* closure = NodeProperties::GetValueInput(node, 3); 228 Node* closure = NodeProperties::GetValueInput(node, 3);
229 Node* effect = NodeProperties::GetEffectInput(node); 229 Node* effect = NodeProperties::GetEffectInput(node);
230 Node* control = NodeProperties::GetControlInput(node); 230 Node* control = NodeProperties::GetControlInput(node);
231 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 231 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
232 PropertyAccess const& p = PropertyAccessOf(node->op()); 232 PropertyAccess const& p = PropertyAccessOf(node->op());
233 LanguageMode language_mode = p.language_mode(); 233 LanguageMode language_mode = p.language_mode();
234 Callable callable = 234 Callable callable =
235 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode); 235 CodeFactory::KeyedStoreICInOptimizedCode(isolate(), language_mode);
236 // Load the type feedback vector from the closure. 236 // Load the type feedback vector from the closure.
237 Node* literals = effect = graph()->NewNode( 237 Node* literals = effect = graph()->NewNode(
238 machine()->Load(MachineType::AnyTagged()), closure, 238 machine()->Load(MachineType::TaggedPointer()), closure,
239 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 239 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
240 effect, control); 240 effect, control);
241 Node* vector = effect = graph()->NewNode( 241 Node* vector = effect = graph()->NewNode(
242 machine()->Load(MachineType::AnyTagged()), literals, 242 machine()->Load(MachineType::TaggedPointer()), literals,
243 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 243 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
244 kHeapObjectTag), 244 kHeapObjectTag),
245 effect, control); 245 effect, control);
246 typedef StoreWithVectorDescriptor Descriptor; 246 typedef StoreWithVectorDescriptor Descriptor;
247 node->InsertInputs(zone(), 0, 1); 247 node->InsertInputs(zone(), 0, 1);
248 node->ReplaceInput(Descriptor::kReceiver, receiver); 248 node->ReplaceInput(Descriptor::kReceiver, receiver);
249 node->ReplaceInput(Descriptor::kName, key); 249 node->ReplaceInput(Descriptor::kName, key);
250 node->ReplaceInput(Descriptor::kValue, value); 250 node->ReplaceInput(Descriptor::kValue, value);
251 node->ReplaceInput(Descriptor::kSlot, 251 node->ReplaceInput(Descriptor::kSlot,
252 jsgraph()->SmiConstant(p.feedback().index())); 252 jsgraph()->SmiConstant(p.feedback().index()));
253 node->ReplaceInput(Descriptor::kVector, vector); 253 node->ReplaceInput(Descriptor::kVector, vector);
254 node->ReplaceInput(7, effect); 254 node->ReplaceInput(7, effect);
255 ReplaceWithStubCall(node, callable, flags); 255 ReplaceWithStubCall(node, callable, flags);
256 } 256 }
257 257
258 258
259 void JSGenericLowering::LowerJSStoreNamed(Node* node) { 259 void JSGenericLowering::LowerJSStoreNamed(Node* node) {
260 Node* receiver = NodeProperties::GetValueInput(node, 0); 260 Node* receiver = NodeProperties::GetValueInput(node, 0);
261 Node* value = NodeProperties::GetValueInput(node, 1); 261 Node* value = NodeProperties::GetValueInput(node, 1);
262 Node* closure = NodeProperties::GetValueInput(node, 2); 262 Node* closure = NodeProperties::GetValueInput(node, 2);
263 Node* effect = NodeProperties::GetEffectInput(node); 263 Node* effect = NodeProperties::GetEffectInput(node);
264 Node* control = NodeProperties::GetControlInput(node); 264 Node* control = NodeProperties::GetControlInput(node);
265 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 265 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
266 NamedAccess const& p = NamedAccessOf(node->op()); 266 NamedAccess const& p = NamedAccessOf(node->op());
267 Callable callable = 267 Callable callable =
268 CodeFactory::StoreICInOptimizedCode(isolate(), p.language_mode()); 268 CodeFactory::StoreICInOptimizedCode(isolate(), p.language_mode());
269 // Load the type feedback vector from the closure. 269 // Load the type feedback vector from the closure.
270 Node* literals = effect = graph()->NewNode( 270 Node* literals = effect = graph()->NewNode(
271 machine()->Load(MachineType::AnyTagged()), closure, 271 machine()->Load(MachineType::TaggedPointer()), closure,
272 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 272 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
273 effect, control); 273 effect, control);
274 Node* vector = effect = graph()->NewNode( 274 Node* vector = effect = graph()->NewNode(
275 machine()->Load(MachineType::AnyTagged()), literals, 275 machine()->Load(MachineType::TaggedPointer()), literals,
276 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 276 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
277 kHeapObjectTag), 277 kHeapObjectTag),
278 effect, control); 278 effect, control);
279 typedef StoreWithVectorDescriptor Descriptor; 279 typedef StoreWithVectorDescriptor Descriptor;
280 node->InsertInputs(zone(), 0, 2); 280 node->InsertInputs(zone(), 0, 2);
281 node->ReplaceInput(Descriptor::kReceiver, receiver); 281 node->ReplaceInput(Descriptor::kReceiver, receiver);
282 node->ReplaceInput(Descriptor::kName, jsgraph()->HeapConstant(p.name())); 282 node->ReplaceInput(Descriptor::kName, jsgraph()->HeapConstant(p.name()));
283 node->ReplaceInput(Descriptor::kValue, value); 283 node->ReplaceInput(Descriptor::kValue, value);
284 node->ReplaceInput(Descriptor::kSlot, 284 node->ReplaceInput(Descriptor::kSlot,
285 jsgraph()->SmiConstant(p.feedback().index())); 285 jsgraph()->SmiConstant(p.feedback().index()));
286 node->ReplaceInput(Descriptor::kVector, vector); 286 node->ReplaceInput(Descriptor::kVector, vector);
287 node->ReplaceInput(7, effect); 287 node->ReplaceInput(7, effect);
288 ReplaceWithStubCall(node, callable, flags); 288 ReplaceWithStubCall(node, callable, flags);
289 } 289 }
290 290
291 291
292 void JSGenericLowering::LowerJSStoreGlobal(Node* node) { 292 void JSGenericLowering::LowerJSStoreGlobal(Node* node) {
293 Node* value = NodeProperties::GetValueInput(node, 0); 293 Node* value = NodeProperties::GetValueInput(node, 0);
294 Node* closure = NodeProperties::GetValueInput(node, 1); 294 Node* closure = NodeProperties::GetValueInput(node, 1);
295 Node* context = NodeProperties::GetContextInput(node); 295 Node* context = NodeProperties::GetContextInput(node);
296 Node* effect = NodeProperties::GetEffectInput(node); 296 Node* effect = NodeProperties::GetEffectInput(node);
297 Node* control = NodeProperties::GetControlInput(node); 297 Node* control = NodeProperties::GetControlInput(node);
298 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 298 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
299 const StoreGlobalParameters& p = StoreGlobalParametersOf(node->op()); 299 const StoreGlobalParameters& p = StoreGlobalParametersOf(node->op());
300 Callable callable = 300 Callable callable =
301 CodeFactory::StoreICInOptimizedCode(isolate(), p.language_mode()); 301 CodeFactory::StoreICInOptimizedCode(isolate(), p.language_mode());
302 // Load the type feedback vector from the closure. 302 // Load the type feedback vector from the closure.
303 Node* literals = effect = graph()->NewNode( 303 Node* literals = effect = graph()->NewNode(
304 machine()->Load(MachineType::AnyTagged()), closure, 304 machine()->Load(MachineType::TaggedPointer()), closure,
305 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag), 305 jsgraph()->IntPtrConstant(JSFunction::kLiteralsOffset - kHeapObjectTag),
306 effect, control); 306 effect, control);
307 Node* vector = effect = graph()->NewNode( 307 Node* vector = effect = graph()->NewNode(
308 machine()->Load(MachineType::AnyTagged()), literals, 308 machine()->Load(MachineType::TaggedPointer()), literals,
309 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset - 309 jsgraph()->IntPtrConstant(LiteralsArray::kFeedbackVectorOffset -
310 kHeapObjectTag), 310 kHeapObjectTag),
311 effect, control); 311 effect, control);
312 // Load global object from the context. 312 // Load global object from the context.
313 Node* native_context = effect = 313 Node* native_context = effect =
314 graph()->NewNode(machine()->Load(MachineType::AnyTagged()), context, 314 graph()->NewNode(machine()->Load(MachineType::TaggedPointer()), context,
315 jsgraph()->IntPtrConstant( 315 jsgraph()->IntPtrConstant(
316 Context::SlotOffset(Context::NATIVE_CONTEXT_INDEX)), 316 Context::SlotOffset(Context::NATIVE_CONTEXT_INDEX)),
317 effect, control); 317 effect, control);
318 Node* global = effect = graph()->NewNode( 318 Node* global = effect = graph()->NewNode(
319 machine()->Load(MachineType::AnyTagged()), native_context, 319 machine()->Load(MachineType::TaggedPointer()), native_context,
320 jsgraph()->IntPtrConstant(Context::SlotOffset(Context::EXTENSION_INDEX)), 320 jsgraph()->IntPtrConstant(Context::SlotOffset(Context::EXTENSION_INDEX)),
321 effect, control); 321 effect, control);
322 typedef StoreWithVectorDescriptor Descriptor; 322 typedef StoreWithVectorDescriptor Descriptor;
323 node->InsertInputs(zone(), 0, 3); 323 node->InsertInputs(zone(), 0, 3);
324 node->ReplaceInput(Descriptor::kReceiver, global); 324 node->ReplaceInput(Descriptor::kReceiver, global);
325 node->ReplaceInput(Descriptor::kName, jsgraph()->HeapConstant(p.name())); 325 node->ReplaceInput(Descriptor::kName, jsgraph()->HeapConstant(p.name()));
326 node->ReplaceInput(Descriptor::kValue, value); 326 node->ReplaceInput(Descriptor::kValue, value);
327 node->ReplaceInput(Descriptor::kSlot, 327 node->ReplaceInput(Descriptor::kSlot,
328 jsgraph()->SmiConstant(p.feedback().index())); 328 jsgraph()->SmiConstant(p.feedback().index()));
329 node->ReplaceInput(Descriptor::kVector, vector); 329 node->ReplaceInput(Descriptor::kVector, vector);
(...skipping 14 matching lines...)
344 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 344 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
345 Callable callable = CodeFactory::InstanceOf(isolate()); 345 Callable callable = CodeFactory::InstanceOf(isolate());
346 ReplaceWithStubCall(node, callable, flags); 346 ReplaceWithStubCall(node, callable, flags);
347 } 347 }
348 348
349 349
350 void JSGenericLowering::LowerJSLoadContext(Node* node) { 350 void JSGenericLowering::LowerJSLoadContext(Node* node) {
351 const ContextAccess& access = ContextAccessOf(node->op()); 351 const ContextAccess& access = ContextAccessOf(node->op());
352 for (size_t i = 0; i < access.depth(); ++i) { 352 for (size_t i = 0; i < access.depth(); ++i) {
353 node->ReplaceInput( 353 node->ReplaceInput(
354 0, graph()->NewNode(machine()->Load(MachineType::AnyTagged()), 354 0, graph()->NewNode(machine()->Load(MachineType::TaggedPointer()),
355 NodeProperties::GetValueInput(node, 0), 355 NodeProperties::GetValueInput(node, 0),
356 jsgraph()->Int32Constant( 356 jsgraph()->Int32Constant(
357 Context::SlotOffset(Context::PREVIOUS_INDEX)), 357 Context::SlotOffset(Context::PREVIOUS_INDEX)),
358 NodeProperties::GetEffectInput(node), 358 NodeProperties::GetEffectInput(node),
359 graph()->start())); 359 graph()->start()));
360 } 360 }
361 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( 361 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset(
362 static_cast<int>(access.index())))); 362 static_cast<int>(access.index()))));
363 node->AppendInput(zone(), graph()->start()); 363 node->AppendInput(zone(), graph()->start());
364 NodeProperties::ChangeOp(node, machine()->Load(MachineType::AnyTagged())); 364 NodeProperties::ChangeOp(node, machine()->Load(MachineType::TaggedPointer()));
Michael Starzinger 2016/08/22 12:59:46 This is the load of the actual context slot (not t
mvstanton 2016/08/24 16:06:28 Done.
365 } 365 }
366 366
367 367
368 void JSGenericLowering::LowerJSStoreContext(Node* node) { 368 void JSGenericLowering::LowerJSStoreContext(Node* node) {
369 const ContextAccess& access = ContextAccessOf(node->op()); 369 const ContextAccess& access = ContextAccessOf(node->op());
370 for (size_t i = 0; i < access.depth(); ++i) { 370 for (size_t i = 0; i < access.depth(); ++i) {
371 node->ReplaceInput( 371 node->ReplaceInput(
372 0, graph()->NewNode(machine()->Load(MachineType::AnyTagged()), 372 0, graph()->NewNode(machine()->Load(MachineType::TaggedPointer()),
373 NodeProperties::GetValueInput(node, 0), 373 NodeProperties::GetValueInput(node, 0),
374 jsgraph()->Int32Constant( 374 jsgraph()->Int32Constant(
375 Context::SlotOffset(Context::PREVIOUS_INDEX)), 375 Context::SlotOffset(Context::PREVIOUS_INDEX)),
376 NodeProperties::GetEffectInput(node), 376 NodeProperties::GetEffectInput(node),
377 graph()->start())); 377 graph()->start()));
378 } 378 }
379 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1)); 379 node->ReplaceInput(2, NodeProperties::GetValueInput(node, 1));
380 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset( 380 node->ReplaceInput(1, jsgraph()->Int32Constant(Context::SlotOffset(
381 static_cast<int>(access.index())))); 381 static_cast<int>(access.index()))));
382 NodeProperties::ChangeOp( 382 NodeProperties::ChangeOp(
(...skipping 210 matching lines...)
593 ReplaceWithRuntimeCall(node, Runtime::kForInStep); 593 ReplaceWithRuntimeCall(node, Runtime::kForInStep);
594 } 594 }
595 595
596 596
597 void JSGenericLowering::LowerJSLoadMessage(Node* node) { 597 void JSGenericLowering::LowerJSLoadMessage(Node* node) {
598 ExternalReference message_address = 598 ExternalReference message_address =
599 ExternalReference::address_of_pending_message_obj(isolate()); 599 ExternalReference::address_of_pending_message_obj(isolate());
600 node->RemoveInput(NodeProperties::FirstContextIndex(node)); 600 node->RemoveInput(NodeProperties::FirstContextIndex(node));
601 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address)); 601 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address));
602 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0)); 602 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0));
603 NodeProperties::ChangeOp(node, machine()->Load(MachineType::AnyTagged())); 603 NodeProperties::ChangeOp(node, machine()->Load(MachineType::TaggedPointer()));
Michael Starzinger 2016/08/22 12:59:46 nit: The ThreadLocalTop::pending_message_obj_ is o
mvstanton 2016/08/24 16:06:28 Done.
604 } 604 }
605 605
606 606
607 void JSGenericLowering::LowerJSStoreMessage(Node* node) { 607 void JSGenericLowering::LowerJSStoreMessage(Node* node) {
608 ExternalReference message_address = 608 ExternalReference message_address =
609 ExternalReference::address_of_pending_message_obj(isolate()); 609 ExternalReference::address_of_pending_message_obj(isolate());
610 node->RemoveInput(NodeProperties::FirstContextIndex(node)); 610 node->RemoveInput(NodeProperties::FirstContextIndex(node));
611 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address)); 611 node->InsertInput(zone(), 0, jsgraph()->ExternalConstant(message_address));
612 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0)); 612 node->InsertInput(zone(), 1, jsgraph()->IntPtrConstant(0));
613 StoreRepresentation representation(MachineRepresentation::kTagged, 613 StoreRepresentation representation(MachineRepresentation::kTagged,
(...skipping 70 matching lines...)
684 } 684 }
685 685
686 686
687 MachineOperatorBuilder* JSGenericLowering::machine() const { 687 MachineOperatorBuilder* JSGenericLowering::machine() const {
688 return jsgraph()->machine(); 688 return jsgraph()->machine();
689 } 689 }
690 690
691 } // namespace compiler 691 } // namespace compiler
692 } // namespace internal 692 } // namespace internal
693 } // namespace v8 693 } // namespace v8
OLDNEW

Powered by Google App Engine