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

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

Issue 2302013002: Store the scope info in catch contexts (Closed)
Patch Set: updates Created 4 years, 3 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.h » ('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/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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 343 }
344 344
345 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext( 345 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateBlockContext(
346 Handle<ScopeInfo> scope_info) { 346 Handle<ScopeInfo> scope_info) {
347 size_t entry = GetConstantPoolEntry(scope_info); 347 size_t entry = GetConstantPoolEntry(scope_info);
348 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry)); 348 Output(Bytecode::kCreateBlockContext, UnsignedOperand(entry));
349 return *this; 349 return *this;
350 } 350 }
351 351
352 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateCatchContext( 352 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateCatchContext(
353 Register exception, Handle<String> name) { 353 Register exception, Handle<String> name, Handle<ScopeInfo> scope_info) {
354 size_t name_index = GetConstantPoolEntry(name); 354 size_t name_index = GetConstantPoolEntry(name);
355 size_t scope_info_index = GetConstantPoolEntry(scope_info);
355 Output(Bytecode::kCreateCatchContext, RegisterOperand(exception), 356 Output(Bytecode::kCreateCatchContext, RegisterOperand(exception),
356 UnsignedOperand(name_index)); 357 UnsignedOperand(name_index), UnsignedOperand(scope_info_index));
357 return *this; 358 return *this;
358 } 359 }
359 360
360 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) { 361 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateFunctionContext(int slots) {
361 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots)); 362 Output(Bytecode::kCreateFunctionContext, UnsignedOperand(slots));
362 return *this; 363 return *this;
363 } 364 }
364 365
365 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(Register object) { 366 BytecodeArrayBuilder& BytecodeArrayBuilder::CreateWithContext(Register object) {
366 Output(Bytecode::kCreateWithContext, RegisterOperand(object)); 367 Output(Bytecode::kCreateWithContext, RegisterOperand(object));
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 return Bytecode::kTailCall; 991 return Bytecode::kTailCall;
991 default: 992 default:
992 UNREACHABLE(); 993 UNREACHABLE();
993 } 994 }
994 return Bytecode::kIllegal; 995 return Bytecode::kIllegal;
995 } 996 }
996 997
997 } // namespace interpreter 998 } // namespace interpreter
998 } // namespace internal 999 } // namespace internal
999 } // namespace v8 1000 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698