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

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

Issue 1168093002: [strong] Implement strong mode restrictions on property access (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: slim down, improve tests 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
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 335
336 void JSGenericLowering::LowerJSToObject(Node* node) { 336 void JSGenericLowering::LowerJSToObject(Node* node) {
337 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1); 337 ReplaceWithBuiltinCall(node, Builtins::TO_OBJECT, 1);
338 } 338 }
339 339
340 340
341 void JSGenericLowering::LowerJSLoadProperty(Node* node) { 341 void JSGenericLowering::LowerJSLoadProperty(Node* node) {
342 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 342 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
343 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op()); 343 const LoadPropertyParameters& p = LoadPropertyParametersOf(node->op());
344 Callable callable = 344 Callable callable = CodeFactory::KeyedLoadICInOptimizedCode(
345 CodeFactory::KeyedLoadICInOptimizedCode(isolate(), UNINITIALIZED); 345 isolate(), p.language_mode(), UNINITIALIZED);
346 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 346 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
347 ReplaceWithStubCall(node, callable, flags); 347 ReplaceWithStubCall(node, callable, flags);
348 } 348 }
349 349
350 350
351 void JSGenericLowering::LowerJSLoadNamed(Node* node) { 351 void JSGenericLowering::LowerJSLoadNamed(Node* node) {
352 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 352 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
353 const LoadNamedParameters& p = LoadNamedParametersOf(node->op()); 353 const LoadNamedParameters& p = LoadNamedParametersOf(node->op());
354 Callable callable = CodeFactory::LoadICInOptimizedCode( 354 Callable callable = CodeFactory::LoadICInOptimizedCode(
355 isolate(), p.contextual_mode(), UNINITIALIZED); 355 isolate(), p.contextual_mode(), p.language_mode(), UNINITIALIZED);
356 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); 356 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
357 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 357 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
358 ReplaceWithStubCall(node, callable, flags); 358 ReplaceWithStubCall(node, callable, flags);
359 } 359 }
360 360
361 361
362 void JSGenericLowering::LowerJSStoreProperty(Node* node) { 362 void JSGenericLowering::LowerJSStoreProperty(Node* node) {
363 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 363 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
364 LanguageMode language_mode = OpParameter<LanguageMode>(node); 364 LanguageMode language_mode = OpParameter<LanguageMode>(node);
365 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( 365 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 } 842 }
843 843
844 844
845 MachineOperatorBuilder* JSGenericLowering::machine() const { 845 MachineOperatorBuilder* JSGenericLowering::machine() const {
846 return jsgraph()->machine(); 846 return jsgraph()->machine();
847 } 847 }
848 848
849 } // namespace compiler 849 } // namespace compiler
850 } // namespace internal 850 } // namespace internal
851 } // namespace v8 851 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | src/lookup.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698