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

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

Issue 2187523002: [interpreter] Add CreateFunctionContext bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@fncontextstubslotparam
Patch Set: fix bytecode-generator 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
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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 331
332 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure( 332 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateClosure(
333 Handle<SharedFunctionInfo> shared_info, int flags) { 333 Handle<SharedFunctionInfo> shared_info, int flags) {
334 size_t entry = GetConstantPoolEntry(shared_info); 334 size_t entry = GetConstantPoolEntry(shared_info);
335 Output(Bytecode::kCreateClosure, UnsignedOperand(entry), 335 Output(Bytecode::kCreateClosure, UnsignedOperand(entry),
336 UnsignedOperand(flags)); 336 UnsignedOperand(flags));
337 return *this; 337 return *this;
338 } 338 }
339 339
340 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) {
341 Output(Bytecode::kCreateFunctionContext, SignedOperand(slots));
rmcilroy 2016/08/03 10:58:14 Signed? This should always be positive right? Coul
klaasb 2016/08/03 12:28:16 Switched to unsigned and Idx in bytecodes.h, added
342 return *this;
343 }
344
340 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( 345 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments(
341 CreateArgumentsType type) { 346 CreateArgumentsType type) {
342 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather 347 // TODO(rmcilroy): Consider passing the type as a bytecode operand rather
343 // than having two different bytecodes once we have better support for 348 // than having two different bytecodes once we have better support for
344 // branches in the InterpreterAssembler. 349 // branches in the InterpreterAssembler.
345 Bytecode bytecode = BytecodeForCreateArguments(type); 350 Bytecode bytecode = BytecodeForCreateArguments(type);
346 Output(bytecode); 351 Output(bytecode);
347 return *this; 352 return *this;
348 } 353 }
349 354
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 return Bytecode::kTailCall; 961 return Bytecode::kTailCall;
957 default: 962 default:
958 UNREACHABLE(); 963 UNREACHABLE();
959 } 964 }
960 return Bytecode::kIllegal; 965 return Bytecode::kIllegal;
961 } 966 }
962 967
963 } // namespace interpreter 968 } // namespace interpreter
964 } // namespace internal 969 } // namespace internal
965 } // namespace v8 970 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698