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

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

Issue 1185343005: Revert of Revert of [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.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 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 308
309 void JSGenericLowering::LowerJSToObject(Node* node) { 309 void JSGenericLowering::LowerJSToObject(Node* node) {
310 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); 310 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1);
311 } 311 }
312 312
313 313
314 void JSGenericLowering::LowerJSLoadProperty(Node* node) { 314 void JSGenericLowering::LowerJSLoadProperty(Node* node) {
315 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 315 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
316 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); 316 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op());
317 Callable callable = 317 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(
318 CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED); 318 isolate(), p.language_mode(), UNINITIALIZED);
319 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 319 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
320 ReplaceWithStubCall(node, callable, flags); 320 ReplaceWithStubCall(node, callable, flags);
321 } 321 }
322 322
323 323
324 void JSGenericLowering::LowerJSLoadNamed(Node* node) { 324 void JSGenericLowering::LowerJSLoadNamed(Node* node) {
325 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 325 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
326 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); 326 const LoadNamedParameters& p = LoadNamedParametersOf(node->op());
327 Callable callable = CodeFactory::LoadICInOptimizedCode( 327 Callable callable = CodeFactory::LoadICInOptimizedCode(
328 isolate(), p.contextual_mode(), UNINITIALIZED); 328 isolate(), p.contextual_mode(), p.language_mode(), UNINITIALIZED);
329 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); 329 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
330 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 330 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
331 ReplaceWithStubCall(node, callable, flags); 331 ReplaceWithStubCall(node, callable, flags);
332 } 332 }
333 333
334 334
335 void JSGenericLowering::LowerJSStoreProperty(Node* node) { 335 void JSGenericLowering::LowerJSStoreProperty(Node* node) {
336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
337 LanguageMode language_mode = OpParameter<LanguageMode>(node); 337 LanguageMode language_mode = OpParameter<LanguageMode>(node);
338 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( 338 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 } 770 }
771 771
772 772
773 MachineOperatorBuilder* JSGenericLowering::machine() const { 773 MachineOperatorBuilder* JSGenericLowering::machine() const {
774 return jsgraph()->machine(); 774 return jsgraph()->machine();
775 } 775 }
776 776
777 } // namespace compiler 777 } // namespace compiler
778 } // namespace internal 778 } // namespace internal
779 } // namespace v8 779 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698