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

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

Issue 1909903003: [Interpreter] Use FastNewSloppyArguments when possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ports Created 4 years, 8 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/interpreter-assembler.h ('k') | src/mips/code-stubs-mips.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/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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { 365 Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) {
366 Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), 366 Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(),
367 BytecodeArray::kConstantPoolOffset); 367 BytecodeArray::kConstantPoolOffset);
368 Node* entry_offset = 368 Node* entry_offset =
369 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag), 369 IntPtrAdd(IntPtrConstant(FixedArray::kHeaderSize - kHeapObjectTag),
370 WordShl(index, kPointerSizeLog2)); 370 WordShl(index, kPointerSizeLog2));
371 return Load(MachineType::AnyTagged(), constant_pool, entry_offset); 371 return Load(MachineType::AnyTagged(), constant_pool, entry_offset);
372 } 372 }
373 373
374 Node* InterpreterAssembler::LoadObjectField(Node* object, int offset) {
375 return Load(MachineType::AnyTagged(), object,
376 IntPtrConstant(offset - kHeapObjectTag));
377 }
378
379 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) { 374 Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) {
380 return Load(MachineType::AnyTagged(), context, 375 return Load(MachineType::AnyTagged(), context,
381 IntPtrConstant(Context::SlotOffset(slot_index))); 376 IntPtrConstant(Context::SlotOffset(slot_index)));
382 } 377 }
383 378
384 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) { 379 Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) {
385 Node* offset = 380 Node* offset =
386 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2), 381 IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
387 IntPtrConstant(Context::kHeaderSize - kHeapObjectTag)); 382 IntPtrConstant(Context::kHeaderSize - kHeapObjectTag));
388 return Load(MachineType::AnyTagged(), context, offset); 383 return Load(MachineType::AnyTagged(), context, offset);
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 V8_TARGET_ARCH_S390 704 V8_TARGET_ARCH_S390
710 return true; 705 return true;
711 #else 706 #else
712 #error "Unknown Architecture" 707 #error "Unknown Architecture"
713 #endif 708 #endif
714 } 709 }
715 710
716 } // namespace interpreter 711 } // namespace interpreter
717 } // namespace internal 712 } // namespace internal
718 } // namespace v8 713 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698