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

Side by Side Diff: src/interpreter/bytecode-peephole-optimizer.cc

Issue 2223523002: [Interpreter] Avoid dereferencing handles on BytecodeGenerator for AST operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_const_array
Patch Set: Rebase 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-generator.cc ('k') | test/cctest/test-api.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-peephole-optimizer.h" 5 #include "src/interpreter/bytecode-peephole-optimizer.h"
6 6
7 #include "src/interpreter/constant-array-builder.h" 7 #include "src/interpreter/constant-array-builder.h"
8 #include "src/objects-inl.h" 8 #include "src/objects-inl.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 10
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } else { 287 } else {
288 DefaultAction(node); 288 DefaultAction(node);
289 } 289 }
290 } 290 }
291 291
292 void BytecodePeepholeOptimizer::TransformToStarIfLoadingNameConstantAction( 292 void BytecodePeepholeOptimizer::TransformToStarIfLoadingNameConstantAction(
293 BytecodeNode* const node, const PeepholeActionAndData* action_data) { 293 BytecodeNode* const node, const PeepholeActionAndData* action_data) {
294 DCHECK_EQ(last()->bytecode(), Bytecode::kLdaConstant); 294 DCHECK_EQ(last()->bytecode(), Bytecode::kLdaConstant);
295 DCHECK(!Bytecodes::IsJump(node->bytecode())); 295 DCHECK(!Bytecodes::IsJump(node->bytecode()));
296 296
297 // TODO(5203): Remove this temporary exception.
298 AllowHandleDereference allow_deref;
297 if (GetConstantForIndexOperand(last(), 0)->IsName()) { 299 if (GetConstantForIndexOperand(last(), 0)->IsName()) {
298 node->replace_bytecode(Bytecode::kStar); 300 node->replace_bytecode(Bytecode::kStar);
299 } 301 }
300 DefaultAction(node); 302 DefaultAction(node);
301 } 303 }
302 304
303 void BytecodePeepholeOptimizer::DefaultJumpAction( 305 void BytecodePeepholeOptimizer::DefaultJumpAction(
304 BytecodeNode* const node, const PeepholeActionAndData* action_data) { 306 BytecodeNode* const node, const PeepholeActionAndData* action_data) {
305 DCHECK(LastIsValid()); 307 DCHECK(LastIsValid());
306 DCHECK(Bytecodes::IsJump(node->bytecode())); 308 DCHECK(Bytecodes::IsJump(node->bytecode()));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 #undef CASE 357 #undef CASE
356 default: 358 default:
357 UNREACHABLE(); 359 UNREACHABLE();
358 break; 360 break;
359 } 361 }
360 } 362 }
361 363
362 } // namespace interpreter 364 } // namespace interpreter
363 } // namespace internal 365 } // namespace internal
364 } // namespace v8 366 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698