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

Side by Side Diff: src/compiler/interpreter-assembler.cc

Issue 1419003002: [Interpreter] Unify global and unallocated variable access. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unallocated variable error Created 5 years, 2 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/compiler/interpreter-assembler.h ('k') | src/interpreter/bytecode-array-builder.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/compiler/interpreter-assembler.h" 5 #include "src/compiler/interpreter-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset); 290 return raw_assembler_->Load(kMachAnyTagged, constant_pool, entry_offset);
291 } 291 }
292 292
293 293
294 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) { 294 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) {
295 return raw_assembler_->Load(kMachAnyTagged, object, 295 return raw_assembler_->Load(kMachAnyTagged, object,
296 IntPtrConstant(offset - kHeapObjectTag)); 296 IntPtrConstant(offset - kHeapObjectTag));
297 } 297 }
298 298
299 299
300 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) {
301 return raw_assembler_->Load(kMachAnyTagged, context,
302 IntPtrConstant(Context::SlotOffset(slot_index)));
303 }
304
305
300 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { 306 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) {
301 Node* offset = 307 Node* offset =
302 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), 308 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
303 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); 309 Int32Constant(Context::kHeaderSize - kHeapObjectTag));
304 return raw_assembler_->Load(kMachAnyTagged, context, offset); 310 return raw_assembler_->Load(kMachAnyTagged, context, offset);
305 } 311 }
306 312
307 313
308 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, 314 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index,
309 Node* value) { 315 Node* value) {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 return raw_assembler_->schedule(); 626 return raw_assembler_->schedule();
621 } 627 }
622 628
623 629
624 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } 630 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); }
625 631
626 632
627 } // namespace compiler 633 } // namespace compiler
628 } // namespace internal 634 } // namespace internal
629 } // namespace v8 635 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/interpreter-assembler.h ('k') | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698