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

Side by Side Diff: src/interpreter/bytecode-array-builder.cc

Issue 2435023002: Use a different map to distinguish eval contexts (Closed)
Patch Set: Changes based on review commnets Created 4 years 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" 5 #include "src/interpreter/bytecode-array-builder.h"
6 6
7 #include "src/globals.h" 7 #include "src/globals.h"
8 #include "src/interpreter/bytecode-array-writer.h" 8 #include "src/interpreter/bytecode-array-writer.h"
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" 9 #include "src/interpreter/bytecode-dead-code-optimizer.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 size_t scope_info_index = GetConstantPoolEntry(scope_info); 594 size_t scope_info_index = GetConstantPoolEntry(scope_info);
595 OutputCreateCatchContext(exception, name_index, scope_info_index); 595 OutputCreateCatchContext(exception, name_index, scope_info_index);
596 return *this; 596 return *this;
597 } 597 }
598 598
599 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { 599 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) {
600 OutputCreateFunctionContext(slots); 600 OutputCreateFunctionContext(slots);
601 return *this; 601 return *this;
602 } 602 }
603 603
604 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateEvalContext(int slots) {
605 OutputCreateEvalContext(slots);
606 return *this;
607 }
608
604 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext( 609 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(
605 Register object, Handle<ScopeInfo> scope_info) { 610 Register object, Handle<ScopeInfo> scope_info) {
606 size_t scope_info_index = GetConstantPoolEntry(scope_info); 611 size_t scope_info_index = GetConstantPoolEntry(scope_info);
607 OutputCreateWithContext(object, scope_info_index); 612 OutputCreateWithContext(object, scope_info_index);
608 return *this; 613 return *this;
609 } 614 }
610 615
611 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( 616 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(
612 CreateArgumentsType type) { 617 CreateArgumentsType type) {
613 switch (type) { 618 switch (type) {
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 RegisterList reg_list) { 1033 RegisterList reg_list) {
1029 DCHECK(RegisterListIsValid(reg_list)); 1034 DCHECK(RegisterListIsValid(reg_list));
1030 if (register_optimizer_) 1035 if (register_optimizer_)
1031 register_optimizer_->PrepareOutputRegisterList(reg_list); 1036 register_optimizer_->PrepareOutputRegisterList(reg_list);
1032 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); 1037 return static_cast<uint32_t>(reg_list.first_register().ToOperand());
1033 } 1038 }
1034 1039
1035 } // namespace interpreter 1040 } // namespace interpreter
1036 } // namespace internal 1041 } // namespace internal
1037 } // namespace v8 1042 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698