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

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

Issue 1300813005: [Interpreter] Add implementations of arithmetic binary op bytecodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@mstar_v8h
Patch Set: Fix unittest too... Created 5 years, 4 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"
11 #include "src/base/smart-pointers.h" 11 #include "src/base/smart-pointers.h"
12 #include "src/builtins.h"
12 #include "src/frames.h" 13 #include "src/frames.h"
13 #include "src/interpreter/bytecodes.h" 14 #include "src/interpreter/bytecodes.h"
14 #include "src/unique.h" 15 #include "src/unique.h"
15 16
16 namespace v8 { 17 namespace v8 {
17 namespace internal { 18 namespace internal {
18 19
19 class Isolate; 20 class Isolate;
20 class Zone; 21 class Zone;
21 22
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Constants. 55 // Constants.
55 Node* Int32Constant(int value); 56 Node* Int32Constant(int value);
56 Node* IntPtrConstant(intptr_t value); 57 Node* IntPtrConstant(intptr_t value);
57 Node* NumberConstant(double value); 58 Node* NumberConstant(double value);
58 Node* HeapConstant(Unique<HeapObject> object); 59 Node* HeapConstant(Unique<HeapObject> object);
59 60
60 // Tag and untag Smi values. 61 // Tag and untag Smi values.
61 Node* SmiTag(Node* value); 62 Node* SmiTag(Node* value);
62 Node* SmiUntag(Node* value); 63 Node* SmiUntag(Node* value);
63 64
65 // Load a field from an object on the heap.
66 Node* LoadObjectField(Node* object, int offset);
67
64 // Load |slot_index| from the current context. 68 // Load |slot_index| from the current context.
65 Node* LoadContextSlot(int slot_index); 69 Node* LoadContextSlot(int slot_index);
66 70
71 // Call JS builtin.
72 Node* CallJSBuiltin(Builtins::JavaScript builtin, Node* receiver);
73 Node* CallJSBuiltin(Builtins::JavaScript builtin, Node* receiver, Node* arg1);
74
67 // Returns from the function. 75 // Returns from the function.
68 void Return(); 76 void Return();
69 77
70 // Dispatch to the bytecode. 78 // Dispatch to the bytecode.
71 void Dispatch(); 79 void Dispatch();
72 80
73 protected: 81 protected:
74 // Close the graph. 82 // Close the graph.
75 void End(); 83 void End();
76 84
(...skipping 13 matching lines...) Expand all
90 // Returns a tagged pointer to the current context. 98 // Returns a tagged pointer to the current context.
91 Node* ContextTaggedPointer(); 99 Node* ContextTaggedPointer();
92 100
93 // Returns the offset of register |index| relative to RegisterFilePointer(). 101 // Returns the offset of register |index| relative to RegisterFilePointer().
94 Node* RegisterFrameOffset(Node* index); 102 Node* RegisterFrameOffset(Node* index);
95 103
96 Node* SmiShiftBitsConstant(); 104 Node* SmiShiftBitsConstant();
97 Node* BytecodeOperand(int operand_index); 105 Node* BytecodeOperand(int operand_index);
98 Node* BytecodeOperandSignExtended(int operand_index); 106 Node* BytecodeOperandSignExtended(int operand_index);
99 107
108 Node* CallJSBuiltin(Builtins::JavaScript builtin, Node* receiver,
109 Node** js_args, int js_arg_count);
110
100 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not 111 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not
101 // update BytecodeOffset() itself. 112 // update BytecodeOffset() itself.
102 Node* Advance(int delta); 113 Node* Advance(int delta);
103 114
104 // Sets the end node of the graph. 115 // Sets the end node of the graph.
105 void SetEndInput(Node* input); 116 void SetEndInput(Node* input);
106 117
107 // Private helpers which delegate to RawMachineAssembler. 118 // Private helpers which delegate to RawMachineAssembler.
108 Isolate* isolate(); 119 Isolate* isolate();
109 Schedule* schedule(); 120 Schedule* schedule();
121 Zone* zone();
110 122
111 interpreter::Bytecode bytecode_; 123 interpreter::Bytecode bytecode_;
112 base::SmartPointer<RawMachineAssembler> raw_assembler_; 124 base::SmartPointer<RawMachineAssembler> raw_assembler_;
113 Node* end_node_; 125 Node* end_node_;
114 Node* accumulator_; 126 Node* accumulator_;
115 bool code_generated_; 127 bool code_generated_;
116 128
117 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); 129 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler);
118 }; 130 };
119 131
120 } // namespace interpreter 132 } // namespace interpreter
121 } // namespace internal 133 } // namespace internal
122 } // namespace v8 134 } // namespace v8
123 135
124 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ 136 #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