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

Unified Diff: src/compiler/js-native-context-specialization.h

Issue 2191823002: [turbofan] Refactor the lowering of element/property accesses. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/access-info.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-native-context-specialization.h
diff --git a/src/compiler/js-native-context-specialization.h b/src/compiler/js-native-context-specialization.h
index be74e5d9c48f1c9d80b89b8fc2f0b1ed072dce22..ace47b0eeec489f56aa8a252b14c952e5c5a780d 100644
--- a/src/compiler/js-native-context-specialization.h
+++ b/src/compiler/js-native-context-specialization.h
@@ -24,9 +24,11 @@ namespace compiler {
// Forward declarations.
enum class AccessMode;
class CommonOperatorBuilder;
+class ElementAccessInfo;
class JSGraph;
class JSOperatorBuilder;
class MachineOperatorBuilder;
+class PropertyAccessInfo;
class SimplifiedOperatorBuilder;
@@ -80,9 +82,41 @@ class JSNativeContextSpecialization final : public AdvancedReducer {
Reduction ReduceSoftDeoptimize(Node* node, DeoptimizeReason reason);
+ // A triple of nodes that represents a continuation.
+ class ValueEffectControl final {
+ public:
+ ValueEffectControl(Node* value, Node* effect, Node* control)
+ : value_(value), effect_(effect), control_(control) {}
+
+ Node* value() const { return value_; }
+ Node* effect() const { return effect_; }
+ Node* control() const { return control_; }
+
+ private:
+ Node* const value_;
+ Node* const effect_;
+ Node* const control_;
+ };
+
+ // Construct the appropriate subgraph for property access.
+ ValueEffectControl BuildPropertyAccess(Node* receiver, Node* value,
+ Node* effect, Node* control,
+ Handle<Name> name,
+ Handle<Context> native_context,
+ PropertyAccessInfo const& access_info,
+ AccessMode access_mode);
+
+ // Construct the appropriate subgraph for element access.
+ ValueEffectControl BuildElementAccess(Node* receiver, Node* index,
+ Node* value, Node* effect,
+ Node* control,
+ Handle<Context> native_context,
+ ElementAccessInfo const& access_info,
+ AccessMode access_mode);
+
// Adds stability dependencies on all prototypes of every class in
// {receiver_type} up to (and including) the {holder}.
- void AssumePrototypesStable(Type* receiver_type,
+ void AssumePrototypesStable(std::vector<Handle<Map>> const& receiver_maps,
Handle<Context> native_context,
Handle<JSObject> holder);
« no previous file with comments | « src/compiler/access-info.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698