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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 892593002: [turbofan] Fix usage of ThisFunction parameter in OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/compiler/ia32/linkage-ia32.cc ('k') | src/compiler/linkage.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-aux-data-inl.h" 10 #include "src/compiler/node-aux-data-inl.h"
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 403
404 // TODO(titzer): total hack to share function context constants. 404 // TODO(titzer): total hack to share function context constants.
405 // Remove this when the JSGraph canonicalizes heap constants. 405 // Remove this when the JSGraph canonicalizes heap constants.
406 Node* context = node->InputAt(index); 406 Node* context = node->InputAt(index);
407 HeapObjectMatcher<Context> context_const(context); 407 HeapObjectMatcher<Context> context_const(context);
408 if (!context_const.HasValue() || 408 if (!context_const.HasValue() ||
409 *(context_const.Value().handle()) != function->context()) { 409 *(context_const.Value().handle()) != function->context()) {
410 context = jsgraph()->HeapConstant(Handle<Context>(function->context())); 410 context = jsgraph()->HeapConstant(Handle<Context>(function->context()));
411 } 411 }
412 node->ReplaceInput(index, context); 412 node->ReplaceInput(index, context);
413 CallDescriptor* desc = linkage()->GetJSCallDescriptor( 413 CallDescriptor* desc =
414 jsgraph()->zone(), 1 + arg_count, FlagsForNode(node)); 414 linkage()->GetJSCallDescriptor(1 + arg_count, FlagsForNode(node));
415 PatchOperator(node, common()->Call(desc)); 415 PatchOperator(node, common()->Call(desc));
416 return true; 416 return true;
417 } 417 }
418 418
419 419
420 void JSGenericLowering::LowerJSCallFunction(Node* node) { 420 void JSGenericLowering::LowerJSCallFunction(Node* node) {
421 // Fast case: call function directly. 421 // Fast case: call function directly.
422 if (TryLowerDirectJSCall(node)) return; 422 if (TryLowerDirectJSCall(node)) return;
423 423
424 // General case: CallFunctionStub. 424 // General case: CallFunctionStub.
(...skipping 10 matching lines...) Expand all
435 435
436 436
437 void JSGenericLowering::LowerJSCallRuntime(Node* node) { 437 void JSGenericLowering::LowerJSCallRuntime(Node* node) {
438 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); 438 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
439 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); 439 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity()));
440 } 440 }
441 441
442 } // namespace compiler 442 } // namespace compiler
443 } // namespace internal 443 } // namespace internal
444 } // namespace v8 444 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/linkage-ia32.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698