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

Side by Side Diff: src/interpreter/bytecode-array-builder.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 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 Output(Bytecode::kCreateCatchContext, RegisterOperand(exception), 469 Output(Bytecode::kCreateCatchContext, RegisterOperand(exception),
470 UnsignedOperand(name_index), UnsignedOperand(scope_info_index)); 470 UnsignedOperand(name_index), UnsignedOperand(scope_info_index));
471 return *this; 471 return *this;
472 } 472 }
473 473
474 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { 474 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) {
475 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); 475 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots));
476 return *this; 476 return *this;
477 } 477 }
478 478
479 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateEvalContext(int slots) {
480 Output(Bytecode::kCreateEvalContext, UnsignedOperand(slots));
481 return *this;
482 }
483
479 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext( 484 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(
480 Register object, Handle<ScopeInfo> scope_info) { 485 Register object, Handle<ScopeInfo> scope_info) {
481 size_t scope_info_index = GetConstantPoolEntry(scope_info); 486 size_t scope_info_index = GetConstantPoolEntry(scope_info);
482 Output(Bytecode::kCreateWithContext, RegisterOperand(object), 487 Output(Bytecode::kCreateWithContext, RegisterOperand(object),
483 UnsignedOperand(scope_info_index)); 488 UnsignedOperand(scope_info_index));
484 return *this; 489 return *this;
485 } 490 }
486 491
487 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( 492 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(
488 CreateArgumentsType type) { 493 CreateArgumentsType type) {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 UNREACHABLE(); // Dealt with in kRegList above. 935 UNREACHABLE(); // Dealt with in kRegList above.
931 } 936 }
932 } 937 }
933 938
934 return true; 939 return true;
935 } 940 }
936 941
937 } // namespace interpreter 942 } // namespace interpreter
938 } // namespace internal 943 } // namespace internal
939 } // namespace v8 944 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698