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

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

Issue 2248633002: [interpreter] Add CreateBlockContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: comments Created 4 years, 4 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/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('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 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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/globals.h" 8 #include "src/globals.h"
9 #include "src/interpreter/bytecode-array-writer.h" 9 #include "src/interpreter/bytecode-array-writer.h"
10 #include "src/interpreter/bytecode-dead-code-optimizer.h" 10 #include "src/interpreter/bytecode-dead-code-optimizer.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 return *this; 331 return *this;
332 } 332 }
333 333
334 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(size_t entry, 334 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(size_t entry,
335 int flags) { 335 int flags) {
336 Output(Bytecode::kCreateClosure, UnsignedOperand(entry), 336 Output(Bytecode::kCreateClosure, UnsignedOperand(entry),
337 UnsignedOperand(flags)); 337 UnsignedOperand(flags));
338 return *this; 338 return *this;
339 } 339 }
340 340
341 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext(
342 Handle<ScopeInfo> scope_info) {
343 size_t entry = GetConstantPoolEntry(scope_info);
344 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry));
345 return *this;
346 }
347
341 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { 348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) {
342 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); 349 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots));
343 return *this; 350 return *this;
344 } 351 }
345 352
346 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( 353 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(
347 CreateArgumentsType type) { 354 CreateArgumentsType type) {
348 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather 355 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather
349 // than having two different bytecodes once we have better support for 356 // than having two different bytecodes once we have better support for
350 // branches in the InterpreterAssembler. 357 // branches in the InterpreterAssembler.
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
964 return Bytecode::kTailCall; 971 return Bytecode::kTailCall;
965 default: 972 default:
966 UNREACHABLE(); 973 UNREACHABLE();
967 } 974 }
968 return Bytecode::kIllegal; 975 return Bytecode::kIllegal;
969 } 976 }
970 977
971 } // namespace interpreter 978 } // namespace interpreter
972 } // namespace internal 979 } // namespace internal
973 } // namespace v8 980 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698