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

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

Issue 2255793002: [interpreter] Add CreateWithContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add to AllBytecodesGenerated 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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 size_t entry = GetConstantPoolEntry(scope_info); 343 size_t entry = GetConstantPoolEntry(scope_info);
344 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); 344 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry));
345 return *this; 345 return *this;
346 } 346 }
347 347
348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { 348 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) {
349 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); 349 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots));
350 return *this; 350 return *this;
351 } 351 }
352 352
353 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(Register object) {
354 Output(Bytecode::kCreateWithContext, RegisterOperand(object));
355 return *this;
356 }
357
353 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( 358 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(
354 CreateArgumentsType type) { 359 CreateArgumentsType type) {
355 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather 360 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather
356 // than having two different bytecodes once we have better support for 361 // than having two different bytecodes once we have better support for
357 // branches in the InterpreterAssembler. 362 // branches in the InterpreterAssembler.
358 Bytecode bytecode = BytecodeForCreateArguments(type); 363 Bytecode bytecode = BytecodeForCreateArguments(type);
359 Output(bytecode); 364 Output(bytecode);
360 return *this; 365 return *this;
361 } 366 }
362 367
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 return Bytecode::kTailCall; 976 return Bytecode::kTailCall;
972 default: 977 default:
973 UNREACHABLE(); 978 UNREACHABLE();
974 } 979 }
975 return Bytecode::kIllegal; 980 return Bytecode::kIllegal;
976 } 981 }
977 982
978 } // namespace interpreter 983 } // namespace interpreter
979 } // namespace internal 984 } // namespace internal
980 } // namespace v8 985 } // 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