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

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

Issue 1761783004: [WIP] EqualStub and NotEqualStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@StringRelationalComparison
Patch Set: Updates 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
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/js-generic-lowering.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/compiler/code-stub-assembler.h" 5 #include "src/compiler/code-stub-assembler.h"
6 6
7 #include <ostream> 7 #include <ostream>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 Node* CodeStubAssembler::ExternalConstant(ExternalReference address) { 100 Node* CodeStubAssembler::ExternalConstant(ExternalReference address) {
101 return raw_assembler_->ExternalConstant(address); 101 return raw_assembler_->ExternalConstant(address);
102 } 102 }
103 103
104 Node* CodeStubAssembler::Float64Constant(double value) { 104 Node* CodeStubAssembler::Float64Constant(double value) {
105 return raw_assembler_->Float64Constant(value); 105 return raw_assembler_->Float64Constant(value);
106 } 106 }
107 107
108 Node* CodeStubAssembler::BooleanMapConstant() {
109 return HeapConstant(isolate()->factory()->boolean_map());
110 }
111
108 Node* CodeStubAssembler::HeapNumberMapConstant() { 112 Node* CodeStubAssembler::HeapNumberMapConstant() {
109 return HeapConstant(isolate()->factory()->heap_number_map()); 113 return HeapConstant(isolate()->factory()->heap_number_map());
110 } 114 }
111 115
112 Node* CodeStubAssembler::Parameter(int value) { 116 Node* CodeStubAssembler::Parameter(int value) {
113 return raw_assembler_->Parameter(value); 117 return raw_assembler_->Parameter(value);
114 } 118 }
115 119
116 120
117 void CodeStubAssembler::Return(Node* value) { 121 void CodeStubAssembler::Return(Node* value) {
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset) { 219 Node* CodeStubAssembler::LoadObjectField(Node* object, int offset) {
216 return raw_assembler_->Load(MachineType::AnyTagged(), object, 220 return raw_assembler_->Load(MachineType::AnyTagged(), object,
217 IntPtrConstant(offset - kHeapObjectTag)); 221 IntPtrConstant(offset - kHeapObjectTag));
218 } 222 }
219 223
220 Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) { 224 Node* CodeStubAssembler::LoadHeapNumberValue(Node* object) {
221 return Load(MachineType::Float64(), object, 225 return Load(MachineType::Float64(), object,
222 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag)); 226 IntPtrConstant(HeapNumber::kValueOffset - kHeapObjectTag));
223 } 227 }
224 228
229 Node* CodeStubAssembler::LoadMapBitField(Node* map) {
230 return Load(MachineType::Uint8(), map,
231 IntPtrConstant(Map::kBitFieldOffset - kHeapObjectTag));
232 }
233
225 Node* CodeStubAssembler::LoadMapInstanceType(Node* map) { 234 Node* CodeStubAssembler::LoadMapInstanceType(Node* map) {
226 return Load(MachineType::Uint8(), map, 235 return Load(MachineType::Uint8(), map,
227 IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag)); 236 IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag));
228 } 237 }
229 238
230 Node* CodeStubAssembler::LoadFixedArrayElementSmiIndex(Node* object, 239 Node* CodeStubAssembler::LoadFixedArrayElementSmiIndex(Node* object,
231 Node* smi_index, 240 Node* smi_index,
232 int additional_offset) { 241 int additional_offset) {
233 int const kSmiShiftBits = kSmiShiftSize + kSmiTagSize; 242 int const kSmiShiftBits = kSmiShiftSize + kSmiTagSize;
234 Node* header_size = IntPtrConstant(additional_offset + 243 Node* header_size = IntPtrConstant(additional_offset +
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 Label* if_false) { 528 Label* if_false) {
520 Label if_greaterthanorequal(this), if_notgreaterthanorequal(this); 529 Label if_greaterthanorequal(this), if_notgreaterthanorequal(this);
521 Branch(Float64GreaterThanOrEqual(a, b), &if_greaterthanorequal, 530 Branch(Float64GreaterThanOrEqual(a, b), &if_greaterthanorequal,
522 &if_notgreaterthanorequal); 531 &if_notgreaterthanorequal);
523 Bind(&if_greaterthanorequal); 532 Bind(&if_greaterthanorequal);
524 Goto(if_true); 533 Goto(if_true);
525 Bind(&if_notgreaterthanorequal); 534 Bind(&if_notgreaterthanorequal);
526 Goto(if_false); 535 Goto(if_false);
527 } 536 }
528 537
538 void CodeStubAssembler::BranchIfWord32Equal(Node* a, Node* b, Label* if_true,
539 Label* if_false) {
540 Label if_equal(this), if_notequal(this);
541 Branch(Word32Equal(a, b), &if_equal, &if_notequal);
542 Bind(&if_equal);
543 Goto(if_true);
544 Bind(&if_notequal);
545 Goto(if_false);
546 }
547
529 Node* CodeStubAssembler::CallN(CallDescriptor* descriptor, Node* code_target, 548 Node* CodeStubAssembler::CallN(CallDescriptor* descriptor, Node* code_target,
530 Node** args) { 549 Node** args) {
531 CallPrologue(); 550 CallPrologue();
532 Node* return_value = raw_assembler_->CallN(descriptor, code_target, args); 551 Node* return_value = raw_assembler_->CallN(descriptor, code_target, args);
533 CallEpilogue(); 552 CallEpilogue();
534 return return_value; 553 return return_value;
535 } 554 }
536 555
537 556
538 Node* CodeStubAssembler::TailCallN(CallDescriptor* descriptor, 557 Node* CodeStubAssembler::TailCallN(CallDescriptor* descriptor,
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 } 946 }
928 } 947 }
929 } 948 }
930 949
931 bound_ = true; 950 bound_ = true;
932 } 951 }
933 952
934 } // namespace compiler 953 } // namespace compiler
935 } // namespace internal 954 } // namespace internal
936 } // namespace v8 955 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-stub-assembler.h ('k') | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698