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

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

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Crankshaft backends and scope deserialization Created 4 years, 2 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
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-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 ? Runtime::kNewClosure_Tenured 442 ? Runtime::kNewClosure_Tenured
443 : Runtime::kNewClosure); 443 : Runtime::kNewClosure);
444 } 444 }
445 } 445 }
446 446
447 447
448 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 448 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
449 int const slot_count = OpParameter<int>(node->op()); 449 int const slot_count = OpParameter<int>(node->op());
450 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 450 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
451 451
452 Callable callable = CodeFactory::FastNewFunctionContext(isolate()); 452 Callable callable = CodeFactory::FastNewFunctionContext(isolate(), false);
453 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count)); 453 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
454 ReplaceWithStubCall(node, callable, flags); 454 ReplaceWithStubCall(node, callable, flags);
455 } 455 }
456
457 void JSGenericLowering::LowerJSCreateEvalContext(Node* node) {
458 int const slot_count = OpParameter<int>(node->op());
459 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
460
461 Callable callable = CodeFactory::FastNewFunctionContext(isolate(), true);
462 node->InsertInput(zone(), 1, jsgraph()->Int32Constant(slot_count));
463 ReplaceWithStubCall(node, callable, flags);
464 }
456 465
457 466
458 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) { 467 void JSGenericLowering::LowerJSCreateIterResultObject(Node* node) {
459 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject); 468 ReplaceWithRuntimeCall(node, Runtime::kCreateIterResultObject);
460 } 469 }
461 470
462 471
463 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) { 472 void JSGenericLowering::LowerJSCreateLiteralArray(Node* node) {
464 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op()); 473 CreateLiteralParameters const& p = CreateLiteralParametersOf(node->op());
465 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 474 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 } 699 }
691 700
692 701
693 MachineOperatorBuilder* JSGenericLowering::machine() const { 702 MachineOperatorBuilder* JSGenericLowering::machine() const {
694 return jsgraph()->machine(); 703 return jsgraph()->machine();
695 } 704 }
696 705
697 } // namespace compiler 706 } // namespace compiler
698 } // namespace internal 707 } // namespace internal
699 } // namespace v8 708 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-create-lowering.cc ('k') | src/compiler/js-operator.h » ('j') | src/contexts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698