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

Unified Diff: src/compiler/js-operator.h

Issue 435393004: Carry along ContextualMode in JSLoadNamed operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/js-generic-lowering.cc ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-operator.h
diff --git a/src/compiler/js-operator.h b/src/compiler/js-operator.h
index 6cd4ce1d0e2fb8aabc79abf298bd5397b9507b36..d32eb5a39108b7ead2b7224be6c0d241cc42a432 100644
--- a/src/compiler/js-operator.h
+++ b/src/compiler/js-operator.h
@@ -36,6 +36,13 @@ class ContextAccess {
const uint32_t index_;
};
+// Defines the property being loaded from an object by a named load. This is
+// used as a parameter by JSLoadNamed operators.
+struct LoadNamedParameters {
+ PrintableUnique<Name> name;
+ ContextualMode contextual_mode;
+};
+
// Defines the arity and the call flags for a JavaScript function call. This is
// used as a parameter by JSCall operators.
struct CallParameters {
@@ -109,9 +116,11 @@ class JSOperatorBuilder {
}
Operator* LoadProperty() { BINOP(JSLoadProperty); }
- Operator* LoadNamed(PrintableUnique<Name> name) {
- OP1(JSLoadNamed, PrintableUnique<Name>, name, Operator::kNoProperties, 1,
- 1);
+ Operator* LoadNamed(PrintableUnique<Name> name,
+ ContextualMode contextual_mode = NOT_CONTEXTUAL) {
+ LoadNamedParameters parameters = {name, contextual_mode};
+ OP1(JSLoadNamed, LoadNamedParameters, parameters, Operator::kNoProperties,
+ 1, 1);
}
Operator* StoreProperty() { NOPROPS(JSStoreProperty, 3, 0); }
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/compiler/js-typed-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698