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

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

Issue 1403943004: [Interpreter] Add support for local context loads and stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_contextchain
Patch Set: Add back outer_ &&] 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 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 298
299 299
300 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { 300 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) {
301 Node* offset = 301 Node* offset =
302 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), 302 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
303 Int32Constant(Context::kHeaderSize - kHeapObjectTag)); 303 Int32Constant(Context::kHeaderSize - kHeapObjectTag));
304 return raw_assembler_->Load(kMachAnyTagged, context, offset); 304 return raw_assembler_->Load(kMachAnyTagged, context, offset);
305 } 305 }
306 306
307 307
308 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index,
309 Node* value) {
310 Node* offset =
311 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
312 Int32Constant(Context::kHeaderSize - kHeapObjectTag));
313 return raw_assembler_->Store(kMachAnyTagged, context, offset, value);
314 }
315
316
308 Node* InterpreterAssembler::LoadTypeFeedbackVector() { 317 Node* InterpreterAssembler::LoadTypeFeedbackVector() {
309 Node* function = raw_assembler_->Load( 318 Node* function = raw_assembler_->Load(
310 kMachAnyTagged, RegisterFileRawPointer(), 319 kMachAnyTagged, RegisterFileRawPointer(),
311 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer)); 320 IntPtrConstant(InterpreterFrameConstants::kFunctionFromRegisterPointer));
312 Node* shared_info = 321 Node* shared_info =
313 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset); 322 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset);
314 Node* vector = 323 Node* vector =
315 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); 324 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset);
316 return vector; 325 return vector;
317 } 326 }
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 return raw_assembler_->schedule(); 595 return raw_assembler_->schedule();
587 } 596 }
588 597
589 598
590 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } 599 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); }
591 600
592 601
593 } // namespace compiler 602 } // namespace compiler
594 } // namespace internal 603 } // namespace internal
595 } // namespace v8 604 } // 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