Changeset 198228 in webkit for trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h
- Timestamp:
- Mar 15, 2016, 1:41:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.h
r198154 r198228 101 101 102 102 if (resolveType == UnresolvedProperty || resolveType == UnresolvedPropertyWithVarInjectionChecks) { 103 if (JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsDynamicCast<JSGlobalLexicalEnvironment*>(scope)) { 103 if (scope->isGlobalObject()) { 104 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalProperty : GlobalPropertyWithVarInjectionChecks; 105 resolveType = newResolveType; 106 getPutInfo = GetPutInfo(getPutInfo.resolveMode(), newResolveType, getPutInfo.initializationMode()); 107 pc[4].u.operand = getPutInfo.operand(); 108 } else if (scope->isGlobalLexicalEnvironment()) { 109 JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsCast<JSGlobalLexicalEnvironment*>(scope); 104 110 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalLexicalVar : GlobalLexicalVarWithVarInjectionChecks; 105 111 pc[4].u.operand = GetPutInfo(getPutInfo.resolveMode(), newResolveType, getPutInfo.initializationMode()).operand(); … … 108 114 pc[5].u.watchpointSet = entry.watchpointSet(); 109 115 pc[6].u.pointer = static_cast<void*>(globalLexicalEnvironment->variableAt(entry.scopeOffset()).slot()); 110 } else if (jsDynamicCast<JSGlobalObject*>(scope)) {111 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalProperty : GlobalPropertyWithVarInjectionChecks;112 resolveType = newResolveType;113 getPutInfo = GetPutInfo(getPutInfo.resolveMode(), newResolveType, getPutInfo.initializationMode());114 pc[4].u.operand = getPutInfo.operand();115 116 } 116 117 } … … 143 144 144 145 if (resolveType == UnresolvedProperty || resolveType == UnresolvedPropertyWithVarInjectionChecks) { 145 if (JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsDynamicCast<JSGlobalLexicalEnvironment*>(scope)) { 146 if (scope->isGlobalObject()) { 147 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalProperty : GlobalPropertyWithVarInjectionChecks; 148 resolveType = newResolveType; // Allow below caching mechanism to kick in. 149 pc[4].u.operand = GetPutInfo(getPutInfo.resolveMode(), newResolveType, getPutInfo.initializationMode()).operand(); 150 } else if (scope->isGlobalLexicalEnvironment()) { 151 JSGlobalLexicalEnvironment* globalLexicalEnvironment = jsCast<JSGlobalLexicalEnvironment*>(scope); 146 152 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalLexicalVar : GlobalLexicalVarWithVarInjectionChecks; 147 153 pc[4].u.operand = GetPutInfo(getPutInfo.resolveMode(), newResolveType, getPutInfo.initializationMode()).operand(); … … 150 156 pc[5].u.watchpointSet = entry.watchpointSet(); 151 157 pc[6].u.pointer = static_cast<void*>(globalLexicalEnvironment->variableAt(entry.scopeOffset()).slot()); 152 } else if (jsDynamicCast<JSGlobalObject*>(scope)) {153 ResolveType newResolveType = resolveType == UnresolvedProperty ? GlobalProperty : GlobalPropertyWithVarInjectionChecks;154 resolveType = newResolveType; // Allow below caching mechanism to kick in.155 pc[4].u.operand = GetPutInfo(getPutInfo.resolveMode(), newResolveType, getPutInfo.initializationMode()).operand();156 158 } 157 159 }
Note:
See TracChangeset
for help on using the changeset viewer.