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

Side by Side Diff: test/unittests/interpreter/bytecode-register-optimizer-unittest.cc

Issue 2242193002: [Interpreter] Avoid accessing Isolate from during bytecode generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@offheap_sourceposition
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
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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/factory.h" 7 #include "src/factory.h"
8 #include "src/interpreter/bytecode-label.h" 8 #include "src/interpreter/bytecode-label.h"
9 #include "src/interpreter/bytecode-register-optimizer.h" 9 #include "src/interpreter/bytecode-register-optimizer.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 17 matching lines...) Expand all
28 zone(), register_allocator_, number_of_parameters, this); 28 zone(), register_allocator_, number_of_parameters, this);
29 } 29 }
30 30
31 void Write(BytecodeNode* node) override { output_.push_back(*node); } 31 void Write(BytecodeNode* node) override { output_.push_back(*node); }
32 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override { 32 void WriteJump(BytecodeNode* node, BytecodeLabel* label) override {
33 output_.push_back(*node); 33 output_.push_back(*node);
34 } 34 }
35 void BindLabel(BytecodeLabel* label) override {} 35 void BindLabel(BytecodeLabel* label) override {}
36 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {} 36 void BindLabel(const BytecodeLabel& target, BytecodeLabel* label) override {}
37 Handle<BytecodeArray> ToBytecodeArray( 37 Handle<BytecodeArray> ToBytecodeArray(
38 int fixed_register_count, int parameter_count, 38 Isolate* isolate, int fixed_register_count, int parameter_count,
39 Handle<FixedArray> handle_table) override { 39 Handle<FixedArray> handle_table) override {
40 return Handle<BytecodeArray>(); 40 return Handle<BytecodeArray>();
41 } 41 }
42 42
43 TemporaryRegisterAllocator* allocator() { return register_allocator_; } 43 TemporaryRegisterAllocator* allocator() { return register_allocator_; }
44 BytecodeRegisterOptimizer* optimizer() { return register_optimizer_; } 44 BytecodeRegisterOptimizer* optimizer() { return register_optimizer_; }
45 45
46 Register NewTemporary() { 46 Register NewTemporary() {
47 return Register(allocator()->BorrowTemporaryRegister()); 47 return Register(allocator()->BorrowTemporaryRegister());
48 } 48 }
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 210
211 CHECK_EQ(output()->at(3).bytecode(), Bytecode::kCallJSRuntime); 211 CHECK_EQ(output()->at(3).bytecode(), Bytecode::kCallJSRuntime);
212 CHECK_EQ(output()->at(3).operand(0), 0); 212 CHECK_EQ(output()->at(3).operand(0), 0);
213 CHECK_EQ(output()->at(3).operand(1), temp0.ToOperand()); 213 CHECK_EQ(output()->at(3).operand(1), temp0.ToOperand());
214 CHECK_EQ(output()->at(3).operand(2), 2); 214 CHECK_EQ(output()->at(3).operand(2), 2);
215 } 215 }
216 216
217 } // namespace interpreter 217 } // namespace interpreter
218 } // namespace internal 218 } // namespace internal
219 } // namespace v8 219 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698