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

Side by Side Diff: src/compiler/js-inlining.cc

Issue 1949013002: [compiler] Remove dangerous language mode accessors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « src/compiler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.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/compiler/js-inlining.h" 5 #include "src/compiler/js-inlining.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 // type feedback in the compiler. 512 // type feedback in the compiler.
513 Node* context = jsgraph_->Constant(handle(function->context())); 513 Node* context = jsgraph_->Constant(handle(function->context()));
514 514
515 // Insert a JSConvertReceiver node for sloppy callees. Note that the context 515 // Insert a JSConvertReceiver node for sloppy callees. Note that the context
516 // passed into this node has to be the callees context (loaded above). Note 516 // passed into this node has to be the callees context (loaded above). Note
517 // that the frame state passed to the JSConvertReceiver must be the frame 517 // that the frame state passed to the JSConvertReceiver must be the frame
518 // state _before_ the call; it is not necessary to fiddle with the receiver 518 // state _before_ the call; it is not necessary to fiddle with the receiver
519 // in that frame state tho, as the conversion of the receiver can be repeated 519 // in that frame state tho, as the conversion of the receiver can be repeated
520 // any number of times, it's not observable. 520 // any number of times, it's not observable.
521 if (node->opcode() == IrOpcode::kJSCallFunction && 521 if (node->opcode() == IrOpcode::kJSCallFunction &&
522 is_sloppy(info.language_mode()) && !shared_info->native()) { 522 is_sloppy(parse_info.language_mode()) && !shared_info->native()) {
523 const CallFunctionParameters& p = CallFunctionParametersOf(node->op()); 523 const CallFunctionParameters& p = CallFunctionParametersOf(node->op());
524 Node* effect = NodeProperties::GetEffectInput(node); 524 Node* effect = NodeProperties::GetEffectInput(node);
525 Node* convert = jsgraph_->graph()->NewNode( 525 Node* convert = jsgraph_->graph()->NewNode(
526 jsgraph_->javascript()->ConvertReceiver(p.convert_mode()), 526 jsgraph_->javascript()->ConvertReceiver(p.convert_mode()),
527 call.receiver(), context, call.frame_state_before(), effect, start); 527 call.receiver(), context, call.frame_state_before(), effect, start);
528 NodeProperties::ReplaceValueInput(node, convert, 1); 528 NodeProperties::ReplaceValueInput(node, convert, 1);
529 NodeProperties::ReplaceEffectInput(node, convert); 529 NodeProperties::ReplaceEffectInput(node, convert);
530 } 530 }
531 531
532 // If we are inlining a JS call at tail position then we have to pop current 532 // If we are inlining a JS call at tail position then we have to pop current
(...skipping 21 matching lines...) Expand all
554 node, frame_state, call.formal_arguments(), 554 node, frame_state, call.formal_arguments(),
555 FrameStateType::kArgumentsAdaptor, shared_info); 555 FrameStateType::kArgumentsAdaptor, shared_info);
556 } 556 }
557 557
558 return InlineCall(node, new_target, context, frame_state, start, end); 558 return InlineCall(node, new_target, context, frame_state, start, end);
559 } 559 }
560 560
561 } // namespace compiler 561 } // namespace compiler
562 } // namespace internal 562 } // namespace internal
563 } // namespace v8 563 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698