Chromium Code Reviews

Unified Diff: src/compiler.cc

Issue 1312713004: Remove CompilationInfo::MayUseThis() and replace it with what we really want to know: MustReplaceUn… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index b391bf1a7e50dd4300d894cdb50aa0e3751e7624..7e2ea2597815aaf4f6fee1ea7c78f3b7402aece7 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -257,11 +257,6 @@ bool CompilationInfo::has_simple_parameters() {
}
-bool CompilationInfo::MayUseThis() const {
- return scope()->has_this_declaration() && scope()->receiver()->is_used();
-}
-
-
int CompilationInfo::TraceInlinedFunction(Handle<SharedFunctionInfo> shared,
SourcePosition position,
int parent_id) {
@@ -328,6 +323,12 @@ base::SmartArrayPointer<char> CompilationInfo::GetDebugName() const {
}
+bool CompilationInfo::MustReplaceUndefinedReceiverWithGlobalProxy() {
+ return is_sloppy(language_mode()) && !is_native() &&
+ scope()->has_this_declaration() && scope()->receiver()->is_used();
+}
+
+
class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
public:
explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
@@ -1750,7 +1751,6 @@ bool CompilationPhase::ShouldProduceTraceOutput() const {
base::OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL);
}
-
#if DEBUG
void CompilationInfo::PrintAstForTesting() {
PrintF("--- Source from AST ---\n%s\n",
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine