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

Side by Side Diff: src/compiler.cc

Issue 1414883011: Remove receiver conversion from function prologue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 1 month 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 | « src/compiler.h ('k') | src/compiler/ast-graph-builder.h » ('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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 return parse_info()->literal()->debug_name()->ToCString(); 321 return parse_info()->literal()->debug_name()->ToCString();
322 } 322 }
323 const char* str = debug_name_ ? debug_name_ : "unknown"; 323 const char* str = debug_name_ ? debug_name_ : "unknown";
324 size_t len = strlen(str) + 1; 324 size_t len = strlen(str) + 1;
325 base::SmartArrayPointer<char> name(new char[len]); 325 base::SmartArrayPointer<char> name(new char[len]);
326 memcpy(name.get(), str, len); 326 memcpy(name.get(), str, len);
327 return name; 327 return name;
328 } 328 }
329 329
330 330
331 bool CompilationInfo::MustReplaceUndefinedReceiverWithGlobalProxy() { 331 bool CompilationInfo::ExpectsJSReceiverAsReceiver() {
332 return is_sloppy(language_mode()) && !is_native() && 332 return is_sloppy(language_mode()) && !is_native();
333 scope()->has_this_declaration() && scope()->receiver()->is_used();
334 } 333 }
335 334
336 335
337 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { 336 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder {
338 public: 337 public:
339 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) 338 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info)
340 : HOptimizedGraphBuilder(info) { 339 : HOptimizedGraphBuilder(info) {
341 } 340 }
342 341
343 #define DEF_VISIT(type) \ 342 #define DEF_VISIT(type) \
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1794 } 1793 }
1795 1794
1796 #if DEBUG 1795 #if DEBUG
1797 void CompilationInfo::PrintAstForTesting() { 1796 void CompilationInfo::PrintAstForTesting() {
1798 PrintF("--- Source from AST ---\n%s\n", 1797 PrintF("--- Source from AST ---\n%s\n",
1799 PrettyPrinter(isolate()).PrintProgram(literal())); 1798 PrettyPrinter(isolate()).PrintProgram(literal()));
1800 } 1799 }
1801 #endif 1800 #endif
1802 } // namespace internal 1801 } // namespace internal
1803 } // namespace v8 1802 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/compiler/ast-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698