| OLD | NEW |
| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 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* BooleanMapConstant(); |
| 144 Node* HeapNumberMapConstant(); | 145 Node* HeapNumberMapConstant(); |
| 145 | 146 |
| 146 Node* Parameter(int value); | 147 Node* Parameter(int value); |
| 147 void Return(Node* value); | 148 void Return(Node* value); |
| 148 | 149 |
| 149 void Bind(Label* label); | 150 void Bind(Label* label); |
| 150 void Goto(Label* label); | 151 void Goto(Label* label); |
| 151 void Branch(Node* condition, Label* true_label, Label* false_label); | 152 void Branch(Node* condition, Label* true_label, Label* false_label); |
| 152 | 153 |
| 153 void Switch(Node* index, Label* default_label, int32_t* case_values, | 154 void Switch(Node* index, Label* default_label, int32_t* case_values, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 261 |
| 261 // Check a value for smi-ness | 262 // Check a value for smi-ness |
| 262 Node* WordIsSmi(Node* a); | 263 Node* WordIsSmi(Node* a); |
| 263 | 264 |
| 264 // Load an object pointer from a buffer that isn't in the heap. | 265 // Load an object pointer from a buffer that isn't in the heap. |
| 265 Node* LoadBufferObject(Node* buffer, int offset); | 266 Node* LoadBufferObject(Node* buffer, int offset); |
| 266 // Load a field from an object on the heap. | 267 // Load a field from an object on the heap. |
| 267 Node* LoadObjectField(Node* object, int offset); | 268 Node* LoadObjectField(Node* object, int offset); |
| 268 // Load the floating point value of a HeapNumber. | 269 // Load the floating point value of a HeapNumber. |
| 269 Node* LoadHeapNumberValue(Node* object); | 270 Node* LoadHeapNumberValue(Node* object); |
| 271 // Load the bit field of a Map. |
| 272 Node* LoadMapBitField(Node* map); |
| 270 // Load the instance type of a Map. | 273 // Load the instance type of a Map. |
| 271 Node* LoadMapInstanceType(Node* map); | 274 Node* LoadMapInstanceType(Node* map); |
| 272 | 275 |
| 273 // Load an array element from a FixedArray. | 276 // Load an array element from a FixedArray. |
| 274 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, | 277 Node* LoadFixedArrayElementSmiIndex(Node* object, Node* smi_index, |
| 275 int additional_offset = 0); | 278 int additional_offset = 0); |
| 276 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); | 279 Node* LoadFixedArrayElementConstantIndex(Node* object, int index); |
| 277 | 280 |
| 278 // Allocate an object of the given size. | 281 // Allocate an object of the given size. |
| 279 Node* Allocate(int size, AllocationFlags flags); | 282 Node* Allocate(int size, AllocationFlags flags); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 302 Label* if_false); | 305 Label* if_false); |
| 303 void BranchIfFloat64LessThanOrEqual(Node* a, Node* b, Label* if_true, | 306 void BranchIfFloat64LessThanOrEqual(Node* a, Node* b, Label* if_true, |
| 304 Label* if_false); | 307 Label* if_false); |
| 305 void BranchIfFloat64GreaterThan(Node* a, Node* b, Label* if_true, | 308 void BranchIfFloat64GreaterThan(Node* a, Node* b, Label* if_true, |
| 306 Label* if_false); | 309 Label* if_false); |
| 307 void BranchIfFloat64GreaterThanOrEqual(Node* a, Node* b, Label* if_true, | 310 void BranchIfFloat64GreaterThanOrEqual(Node* a, Node* b, Label* if_true, |
| 308 Label* if_false); | 311 Label* if_false); |
| 309 void BranchIfFloat64IsNaN(Node* value, Label* if_true, Label* if_false) { | 312 void BranchIfFloat64IsNaN(Node* value, Label* if_true, Label* if_false) { |
| 310 BranchIfFloat64Equal(value, value, if_false, if_true); | 313 BranchIfFloat64Equal(value, value, if_false, if_true); |
| 311 } | 314 } |
| 315 void BranchIfWord32Equal(Node* a, Node* b, Label* if_true, Label* if_false); |
| 312 | 316 |
| 313 // Helpers which delegate to RawMachineAssembler. | 317 // Helpers which delegate to RawMachineAssembler. |
| 314 Factory* factory() const; | 318 Factory* factory() const; |
| 315 Isolate* isolate() const; | 319 Isolate* isolate() const; |
| 316 Zone* zone() const; | 320 Zone* zone() const; |
| 317 | 321 |
| 318 protected: | 322 protected: |
| 319 // Protected helpers which delegate to RawMachineAssembler. | 323 // Protected helpers which delegate to RawMachineAssembler. |
| 320 Graph* graph() const; | 324 Graph* graph() const; |
| 321 | 325 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 // Map of variables to the list of value nodes that have been added from each | 386 // Map of variables to the list of value nodes that have been added from each |
| 383 // merge path in their order of merging. | 387 // merge path in their order of merging. |
| 384 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; | 388 std::map<Variable::Impl*, std::vector<Node*>> variable_merges_; |
| 385 }; | 389 }; |
| 386 | 390 |
| 387 } // namespace compiler | 391 } // namespace compiler |
| 388 } // namespace internal | 392 } // namespace internal |
| 389 } // namespace v8 | 393 } // namespace v8 |
| 390 | 394 |
| 391 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ | 395 #endif // V8_COMPILER_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |