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

Side by Side Diff: src/compiler.cc

Issue 1131713004: Revert of Remove Scope::scope_uses_this_ flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast-numbering.h" 9 #include "src/ast-numbering.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 } 208 }
209 } 209 }
210 210
211 211
212 bool CompilationInfo::is_simple_parameter_list() { 212 bool CompilationInfo::is_simple_parameter_list() {
213 return scope()->is_simple_parameter_list(); 213 return scope()->is_simple_parameter_list();
214 } 214 }
215 215
216 216
217 bool CompilationInfo::MayUseThis() const { 217 bool CompilationInfo::MayUseThis() const {
218 return scope()->has_this_declaration() && scope()->receiver()->is_used(); 218 return scope()->uses_this() || scope()->inner_uses_this() ||
219 scope()->calls_sloppy_eval();
219 } 220 }
220 221
221 222
222 int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared, 223 int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
223 SourcePosition position, 224 SourcePosition position,
224 int parent_id) { 225 int parent_id) {
225 DCHECK(track_positions_); 226 DCHECK(track_positions_);
226 227
227 int inline_id = static_cast<int>(inlined_function_infos_.size()); 228 int inline_id = static_cast<int>(inlined_function_infos_.size());
228 InlinedFunctionInfo info(parent_id, position, UnboundScript::kNoScriptId, 229 InlinedFunctionInfo info(parent_id, position, UnboundScript::kNoScriptId,
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 } 1546 }
1546 1547
1547 1548
1548 #if DEBUG 1549 #if DEBUG
1549 void CompilationInfo::PrintAstForTesting() { 1550 void CompilationInfo::PrintAstForTesting() {
1550 PrintF("--- Source from AST ---\n%s\n", 1551 PrintF("--- Source from AST ---\n%s\n",
1551 PrettyPrinter(isolate(), zone()).PrintProgram(function())); 1552 PrettyPrinter(isolate(), zone()).PrintProgram(function()));
1552 } 1553 }
1553 #endif 1554 #endif
1554 } } // namespace v8::internal 1555 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698