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

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

Issue 1894953004: Add HasProperty code stub that tries simple lookups or jumps to runtime otherwise. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { 323 void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
324 LanguageMode language_mode = OpParameter<LanguageMode>(node); 324 LanguageMode language_mode = OpParameter<LanguageMode>(node);
325 ReplaceWithRuntimeCall(node, is_strict(language_mode) 325 ReplaceWithRuntimeCall(node, is_strict(language_mode)
326 ? Runtime::kDeleteProperty_Strict 326 ? Runtime::kDeleteProperty_Strict
327 : Runtime::kDeleteProperty_Sloppy); 327 : Runtime::kDeleteProperty_Sloppy);
328 } 328 }
329 329
330 330
331 void JSGenericLowering::LowerJSHasProperty(Node* node) { 331 void JSGenericLowering::LowerJSHasProperty(Node* node) {
332 ReplaceWithRuntimeCall(node, Runtime::kHasProperty); 332 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
333 Callable callable = CodeFactory::HasProperty(isolate());
334 ReplaceWithStubCall(node, callable, flags);
333 } 335 }
334 336
335 337
336 void JSGenericLowering::LowerJSInstanceOf(Node* node) { 338 void JSGenericLowering::LowerJSInstanceOf(Node* node) {
337 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 339 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
338 Callable callable = CodeFactory::InstanceOf(isolate()); 340 Callable callable = CodeFactory::InstanceOf(isolate());
339 ReplaceWithStubCall(node, callable, flags); 341 ReplaceWithStubCall(node, callable, flags);
340 } 342 }
341 343
342 344
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 } 732 }
731 733
732 734
733 MachineOperatorBuilder* JSGenericLowering::machine() const { 735 MachineOperatorBuilder* JSGenericLowering::machine() const {
734 return jsgraph()->machine(); 736 return jsgraph()->machine();
735 } 737 }
736 738
737 } // namespace compiler 739 } // namespace compiler
738 } // namespace internal 740 } // namespace internal
739 } // namespace v8 741 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698