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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 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/ast-graph-builder.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index c8b0a2daac836b9eab02c05aa6b41b2e8b7a1336..44420d6b90303cc93fb3bb09f46d9d62a587fba8 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2945,7 +2945,7 @@ void AstGraphBuilder::VisitTypeof(UnaryOperation* expr) {
FrameStateBeforeAndAfter states(this, BeforeId(proxy));
operand =
BuildVariableLoad(proxy->var(), expr->expression()->id(), states, pair,
- OutputFrameStateCombine::Push(), NOT_CONTEXTUAL);
+ OutputFrameStateCombine::Push(), INSIDE_TYPEOF);
} else {
VisitForValue(expr->expression());
operand = environment()->Pop();
@@ -3257,7 +3257,7 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
FrameStateBeforeAndAfter& states,
const VectorSlotPair& feedback,
OutputFrameStateCombine combine,
- ContextualMode contextual_mode) {
+ TypeofMode typeof_mode) {
Node* the_hole = jsgraph()->TheHoleConstant();
VariableMode mode = variable->mode();
switch (variable->location()) {
@@ -3280,7 +3280,7 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
Node* global = BuildLoadGlobalObject();
Handle<Name> name = variable->name();
Node* value = BuildGlobalLoad(script_context, global, name, feedback,
- contextual_mode, slot_index);
+ typeof_mode, slot_index);
states.AddToNode(value, bailout_id, combine);
return value;
}
@@ -3336,7 +3336,7 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
if (mode == DYNAMIC_GLOBAL) {
uint32_t check_bitset = ComputeBitsetForDynamicGlobal(variable);
const Operator* op = javascript()->LoadDynamicGlobal(
- name, check_bitset, feedback, contextual_mode);
+ name, check_bitset, feedback, typeof_mode);
value = NewNode(op, BuildLoadFeedbackVector(), current_context());
states.AddToNode(value, bailout_id, combine);
} else if (mode == DYNAMIC_LOCAL) {
@@ -3361,7 +3361,7 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
} else if (mode == DYNAMIC) {
uint32_t check_bitset = DynamicGlobalAccess::kFullCheckRequired;
const Operator* op = javascript()->LoadDynamicGlobal(
- name, check_bitset, feedback, contextual_mode);
+ name, check_bitset, feedback, typeof_mode);
value = NewNode(op, BuildLoadFeedbackVector(), current_context());
states.AddToNode(value, bailout_id, combine);
}
@@ -3642,9 +3642,9 @@ Node* AstGraphBuilder::BuildNamedSuperStore(Node* receiver, Node* home_object,
Node* AstGraphBuilder::BuildGlobalLoad(Node* script_context, Node* global,
Handle<Name> name,
const VectorSlotPair& feedback,
- ContextualMode mode, int slot_index) {
- const Operator* op =
- javascript()->LoadGlobal(MakeUnique(name), feedback, mode, slot_index);
+ TypeofMode typeof_mode, int slot_index) {
+ const Operator* op = javascript()->LoadGlobal(MakeUnique(name), feedback,
+ typeof_mode, slot_index);
Node* node = NewNode(op, script_context, global, BuildLoadFeedbackVector());
return Record(js_type_feedback_, node, feedback.slot());
}
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698