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

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

Issue 1906823002: Move of the type feedback vector to the closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 7 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 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/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index, 386 Node* InterpreterAssembler::StoreContextSlot(Node* context, Node* slot_index,
387 Node* value) { 387 Node* value) {
388 Node* offset = 388 Node* offset =
389 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), 389 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
390 IntPtrConstant(Context::kHeaderSize - kHeapObjectTag)); 390 IntPtrConstant(Context::kHeaderSize - kHeapObjectTag));
391 return Store(MachineRepresentation::kTagged, context, offset, value); 391 return Store(MachineRepresentation::kTagged, context, offset, value);
392 } 392 }
393 393
394 Node* InterpreterAssembler::LoadTypeFeedbackVector() { 394 Node* InterpreterAssembler::LoadTypeFeedbackVector() {
395 Node* function = LoadRegister(Register::function_closure()); 395 Node* function = LoadRegister(Register::function_closure());
396 Node* shared_info = 396 Node* literals = LoadObjectField(function, JSFunction::kLiteralsOffset);
397 LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset);
398 Node* vector = 397 Node* vector =
399 LoadObjectField(shared_info, SharedFunctionInfo::kFeedbackVectorOffset); 398 LoadObjectField(literals, LiteralsArray::kFeedbackVectorOffset);
400 return vector; 399 return vector;
401 } 400 }
402 401
403 void InterpreterAssembler::CallPrologue() { 402 void InterpreterAssembler::CallPrologue() {
404 StoreRegister(SmiTag(BytecodeOffset()), Register::bytecode_offset()); 403 StoreRegister(SmiTag(BytecodeOffset()), Register::bytecode_offset());
405 404
406 if (FLAG_debug_code && !disable_stack_check_across_call_) { 405 if (FLAG_debug_code && !disable_stack_check_across_call_) {
407 DCHECK(stack_pointer_before_call_ == nullptr); 406 DCHECK(stack_pointer_before_call_ == nullptr);
408 stack_pointer_before_call_ = LoadStackPointer(); 407 stack_pointer_before_call_ = LoadStackPointer();
409 } 408 }
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 Goto(&loop); 779 Goto(&loop);
781 } 780 }
782 Bind(&done_loop); 781 Bind(&done_loop);
783 782
784 return array; 783 return array;
785 } 784 }
786 785
787 } // namespace interpreter 786 } // namespace interpreter
788 } // namespace internal 787 } // namespace internal
789 } // namespace v8 788 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698