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

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

Issue 1321663003: [Interpreter] Add support for loading literals from the constant pool. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_const_pool_1
Patch Set: Review comments Created 5 years, 3 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 | « no previous file | src/compiler/interpreter-assembler.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 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_
6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 19 matching lines...) Expand all
30 class Schedule; 30 class Schedule;
31 31
32 class InterpreterAssembler { 32 class InterpreterAssembler {
33 public: 33 public:
34 InterpreterAssembler(Isolate* isolate, Zone* zone, 34 InterpreterAssembler(Isolate* isolate, Zone* zone,
35 interpreter::Bytecode bytecode); 35 interpreter::Bytecode bytecode);
36 virtual ~InterpreterAssembler(); 36 virtual ~InterpreterAssembler();
37 37
38 Handle<Code> GenerateCode(); 38 Handle<Code> GenerateCode();
39 39
40 // Returns the Idx immediate for bytecode operand |operand_index| in the
41 // current bytecode.
42 Node* BytecodeOperandIdx(int operand_index);
40 // Returns the Imm8 immediate for bytecode operand |operand_index| in the 43 // Returns the Imm8 immediate for bytecode operand |operand_index| in the
41 // current bytecode. 44 // current bytecode.
42 Node* BytecodeOperandImm8(int operand_index); 45 Node* BytecodeOperandImm8(int operand_index);
43 // Returns the register index for bytecode operand |operand_index| in the 46 // Returns the register index for bytecode operand |operand_index| in the
44 // current bytecode. 47 // current bytecode.
45 Node* BytecodeOperandReg(int operand_index); 48 Node* BytecodeOperandReg(int operand_index);
46 49
47 // Accumulator. 50 // Accumulator.
48 Node* GetAccumulator(); 51 Node* GetAccumulator();
49 void SetAccumulator(Node* value); 52 void SetAccumulator(Node* value);
50 53
51 // Loads from and stores to the interpreter register file. 54 // Loads from and stores to the interpreter register file.
52 Node* LoadRegister(Node* reg_index); 55 Node* LoadRegister(Node* reg_index);
53 Node* StoreRegister(Node* value, Node* reg_index); 56 Node* StoreRegister(Node* value, Node* reg_index);
54 57
55 // Constants. 58 // Constants.
56 Node* Int32Constant(int value); 59 Node* Int32Constant(int value);
57 Node* IntPtrConstant(intptr_t value); 60 Node* IntPtrConstant(intptr_t value);
58 Node* NumberConstant(double value); 61 Node* NumberConstant(double value);
59 Node* HeapConstant(Unique<HeapObject> object); 62 Node* HeapConstant(Unique<HeapObject> object);
60 63
61 // Tag and untag Smi values. 64 // Tag and untag Smi values.
62 Node* SmiTag(Node* value); 65 Node* SmiTag(Node* value);
63 Node* SmiUntag(Node* value); 66 Node* SmiUntag(Node* value);
64 67
68 // Load constant at |index| in the constant pool.
69 Node* LoadConstantPoolEntry(Node* index);
70
65 // Load a field from an object on the heap. 71 // Load a field from an object on the heap.
66 Node* LoadObjectField(Node* object, int offset); 72 Node* LoadObjectField(Node* object, int offset);
67 73
68 // Load |slot_index| from a context. 74 // Load |slot_index| from a context.
69 Node* LoadContextSlot(Node* context, int slot_index); 75 Node* LoadContextSlot(Node* context, int slot_index);
70 76
71 // Load |slot_index| from the current context. 77 // Load |slot_index| from the current context.
72 Node* LoadContextSlot(int slot_index); 78 Node* LoadContextSlot(int slot_index);
73 79
74 // Call JS builtin. 80 // Call JS builtin.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool code_generated_; 136 bool code_generated_;
131 137
132 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 138 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
133 }; 139 };
134 140
135 } // namespace interpreter 141 } // namespace interpreter
136 } // namespace internal 142 } // namespace internal
137 } // namespace v8 143 } // namespace v8
138 144
139 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 145 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/interpreter-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698