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

Side by Side Diff: src/compiler/code-stub-assembler.h

Issue 1674633002: Move FastAccessorAssembler from RawMachineAssembler to CodeStubAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use ApiCallbackStub to remove any compiler/-dependency other than CodeStubAssembler. Created 4 years, 9 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 #ifndef V8_COMPILER_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_CODE_STUB_ASSEMBLER_H_
6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_ 6 #define V8_COMPILER_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 // Clients of this interface shouldn't depend on lots of compiler internals. 10 // Clients of this interface shouldn't depend on lots of compiler internals.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Constants. 135 // Constants.
136 Node* Int32Constant(int value); 136 Node* Int32Constant(int value);
137 Node* IntPtrConstant(intptr_t value); 137 Node* IntPtrConstant(intptr_t value);
138 Node* NumberConstant(double value); 138 Node* NumberConstant(double value);
139 Node* SmiConstant(Smi* value); 139 Node* SmiConstant(Smi* value);
140 Node* HeapConstant(Handle<HeapObject> object); 140 Node* HeapConstant(Handle<HeapObject> object);
141 Node* BooleanConstant(bool value); 141 Node* BooleanConstant(bool value);
142 Node* ExternalConstant(ExternalReference address); 142 Node* ExternalConstant(ExternalReference address);
143 Node* Float64Constant(double value); 143 Node* Float64Constant(double value);
144 Node* HeapNumberMapConstant(); 144 Node* HeapNumberMapConstant();
145 Node* NullConstant();
146 Node* UndefinedConstant();
145 147
146 Node* Parameter(int value); 148 Node* Parameter(int value);
149 Node* ContextParameter();
147 void Return(Node* value); 150 void Return(Node* value);
148 151
149 void Bind(Label* label); 152 void Bind(Label* label);
150 void Goto(Label* label); 153 void Goto(Label* label);
151 void Branch(Node* condition, Label* true_label, Label* false_label); 154 void Branch(Node* condition, Label* true_label, Label* false_label);
152 155
153 void Switch(Node* index, Label* default_label, int32_t* case_values, 156 void Switch(Node* index, Label* default_label, int32_t* case_values,
154 Label** case_labels, size_t case_count); 157 Label** case_labels, size_t case_count);
155 158
156 // Access to the frame pointer 159 // Access to the frame pointer
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 Node* SmiLessThanOrEqual(Node* a, Node* b); 258 Node* SmiLessThanOrEqual(Node* a, Node* b);
256 Node* SmiMin(Node* a, Node* b); 259 Node* SmiMin(Node* a, Node* b);
257 260
258 // Load a value from the root array. 261 // Load a value from the root array.
259 Node* LoadRoot(Heap::RootListIndex root_index); 262 Node* LoadRoot(Heap::RootListIndex root_index);
260 263
261 // Check a value for smi-ness 264 // Check a value for smi-ness
262 Node* WordIsSmi(Node* a); 265 Node* WordIsSmi(Node* a);
263 266
264 // Load an object pointer from a buffer that isn't in the heap. 267 // Load an object pointer from a buffer that isn't in the heap.
265 Node* LoadBufferObject(Node* buffer, int offset); 268 Node* LoadBufferObject(Node* buffer, int offset,
269 MachineType rep = MachineType::AnyTagged());
266 // Load a field from an object on the heap. 270 // Load a field from an object on the heap.
267 Node* LoadObjectField(Node* object, int offset); 271 Node* LoadObjectField(Node* object, int offset,
272 MachineType rep = MachineType::AnyTagged());
268 // Load the floating point value of a HeapNumber. 273 // Load the floating point value of a HeapNumber.
269 Node* LoadHeapNumberValue(Node* object); 274 Node* LoadHeapNumberValue(Node* object);
270 // Load the instance type of a Map. 275 // Load the instance type of a Map.
271 Node* LoadMapInstanceType(Node* map); 276 Node* LoadMapInstanceType(Node* map);
272 277
273 // Load an array element from a FixedArray. 278 // Load an array element from a FixedArray.
274 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, 279 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index,
275 int additional_offset = 0); 280 int additional_offset = 0);
276 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); 281 Node* LoadFixedArrayElementConstantIndex(Node* object, int index);
277 282
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Protected helpers which delegate to RawMachineAssembler. 324 // Protected helpers which delegate to RawMachineAssembler.
320 Graph* graph() const; 325 Graph* graph() const;
321 326
322 // Enables subclasses to perform operations before and after a call. 327 // Enables subclasses to perform operations before and after a call.
323 virtual void CallPrologue(); 328 virtual void CallPrologue();
324 virtual void CallEpilogue(); 329 virtual void CallEpilogue();
325 330
326 private: 331 private:
327 friend class CodeStubAssemblerTester; 332 friend class CodeStubAssemblerTester;
328 333
334 CodeStubAssembler(Isolate* isolate, Zone* zone,
335 CallDescriptor* call_descriptor, Code::Flags flags,
336 const char* name);
337
329 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args); 338 Node* CallN(CallDescriptor* descriptor, Node* code_target, Node** args);
330 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args); 339 Node* TailCallN(CallDescriptor* descriptor, Node* code_target, Node** args);
331 340
332 Node* SmiShiftBitsConstant(); 341 Node* SmiShiftBitsConstant();
333 342
334 Node* AllocateRawAligned(Node* size_in_bytes, AllocationFlags flags, 343 Node* AllocateRawAligned(Node* size_in_bytes, AllocationFlags flags,
335 Node* top_address, Node* limit_address); 344 Node* top_address, Node* limit_address);
336 Node* AllocateRawUnaligned(Node* size_in_bytes, AllocationFlags flags, 345 Node* AllocateRawUnaligned(Node* size_in_bytes, AllocationFlags flags,
337 Node* top_adddress, Node* limit_address); 346 Node* top_adddress, Node* limit_address);
338 347
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 // Map of variables to the list of value nodes that have been added from each 391 // Map of variables to the list of value nodes that have been added from each
383 // merge path in their order of merging. 392 // merge path in their order of merging.
384 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; 393 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_;
385 }; 394 };
386 395
387 } // namespace compiler 396 } // namespace compiler
388 } // namespace internal 397 } // namespace internal
389 } // namespace v8 398 } // namespace v8
390 399
391 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ 400 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698