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

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

Issue 2189463006: [interpreter] Put object in register for ToObject/ForInPrepare (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix tests 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) { 376 BytecodeArrayBuilder& BytecodeArrayBuilder::PushContext(Register context) {
377 Output(Bytecode::kPushContext, RegisterOperand(context)); 377 Output(Bytecode::kPushContext, RegisterOperand(context));
378 return *this; 378 return *this;
379 } 379 }
380 380
381 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) { 381 BytecodeArrayBuilder& BytecodeArrayBuilder::PopContext(Register context) {
382 Output(Bytecode::kPopContext, RegisterOperand(context)); 382 Output(Bytecode::kPopContext, RegisterOperand(context));
383 return *this; 383 return *this;
384 } 384 }
385 385
386 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject() { 386 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToJSObject(
387 Output(Bytecode::kToObject); 387 Register out) {
388 Output(Bytecode::kToObject, RegisterOperand(out));
388 return *this; 389 return *this;
389 } 390 }
390 391
391 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName( 392 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToName(
392 Register out) { 393 Register out) {
393 Output(Bytecode::kToName, RegisterOperand(out)); 394 Output(Bytecode::kToName, RegisterOperand(out));
394 return *this; 395 return *this;
395 } 396 }
396 397
397 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToNumber( 398 BytecodeArrayBuilder& BytecodeArrayBuilder::CastAccumulatorToNumber(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 return_seen_in_block_ = true; 492 return_seen_in_block_ = true;
492 return *this; 493 return *this;
493 } 494 }
494 495
495 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() { 496 BytecodeArrayBuilder& BytecodeArrayBuilder::Debugger() {
496 Output(Bytecode::kDebugger); 497 Output(Bytecode::kDebugger);
497 return *this; 498 return *this;
498 } 499 }
499 500
500 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare( 501 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInPrepare(
501 Register cache_info_triple) { 502 Register receiver, Register cache_info_triple) {
502 Output(Bytecode::kForInPrepare, RegisterOperand(cache_info_triple)); 503 Output(Bytecode::kForInPrepare, RegisterOperand(receiver),
504 RegisterOperand(cache_info_triple));
503 return *this; 505 return *this;
504 } 506 }
505 507
506 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInDone(Register index, 508 BytecodeArrayBuilder& BytecodeArrayBuilder::ForInDone(Register index,
507 Register cache_length) { 509 Register cache_length) {
508 Output(Bytecode::kForInDone, RegisterOperand(index), 510 Output(Bytecode::kForInDone, RegisterOperand(index),
509 RegisterOperand(cache_length)); 511 RegisterOperand(cache_length));
510 return *this; 512 return *this;
511 } 513 }
512 514
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 return Bytecode::kTailCall; 956 return Bytecode::kTailCall;
955 default: 957 default:
956 UNREACHABLE(); 958 UNREACHABLE();
957 } 959 }
958 return Bytecode::kIllegal; 960 return Bytecode::kIllegal;
959 } 961 }
960 962
961 } // namespace interpreter 963 } // namespace interpreter
962 } // namespace internal 964 } // namespace internal
963 } // namespace v8 965 } // 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