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

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: minor fix 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 341aedc09910e393ea375c32184e62d981dee77a..832f7cf09a732c475eb75b77d5701dcca922b4fd 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()) {
@@ -3266,7 +3266,7 @@ Node* AstGraphBuilder::BuildVariableLoad(Variable* variable,
// Global var, const, or let variable.
Node* global = BuildLoadGlobalObject();
Handle<Name> name = variable->name();
- Node* value = BuildGlobalLoad(global, name, feedback, contextual_mode);
+ Node* value = BuildGlobalLoad(global, name, feedback, typeof_mode);
states.AddToNode(value, bailout_id, combine);
return value;
}
@@ -3322,7 +3322,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) {
@@ -3347,7 +3347,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);
}
@@ -3613,9 +3613,9 @@ Node* AstGraphBuilder::BuildNamedSuperStore(Node* receiver, Node* home_object,
Node* AstGraphBuilder::BuildGlobalLoad(Node* object, Handle<Name> name,
const VectorSlotPair& feedback,
- ContextualMode mode) {
+ TypeofMode typeof_mode) {
const Operator* op =
- javascript()->LoadGlobal(MakeUnique(name), feedback, mode);
+ javascript()->LoadGlobal(MakeUnique(name), feedback, typeof_mode);
Node* node = NewNode(op, object, BuildLoadFeedbackVector());
return Record(js_type_feedback_, node, feedback.slot());
}

Powered by Google App Engine
This is Rietveld 408576698