OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/code-stub-assembler.h" | 5 #include "src/code-stub-assembler.h" |
6 #include "src/code-factory.h" | 6 #include "src/code-factory.h" |
7 #include "src/frames-inl.h" | 7 #include "src/frames-inl.h" |
8 #include "src/frames.h" | 8 #include "src/frames.h" |
9 #include "src/ic/handler-configuration.h" | 9 #include "src/ic/handler-configuration.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 Node* CodeStubAssembler::SmiToFloat64(Node* value) { | 290 Node* CodeStubAssembler::SmiToFloat64(Node* value) { |
291 return ChangeInt32ToFloat64(SmiToWord32(value)); | 291 return ChangeInt32ToFloat64(SmiToWord32(value)); |
292 } | 292 } |
293 | 293 |
294 Node* CodeStubAssembler::SmiAdd(Node* a, Node* b) { | 294 Node* CodeStubAssembler::SmiAdd(Node* a, Node* b) { |
295 return BitcastWordToTaggedSigned( | 295 return BitcastWordToTaggedSigned( |
296 IntPtrAdd(BitcastTaggedToWord(a), BitcastTaggedToWord(b))); | 296 IntPtrAdd(BitcastTaggedToWord(a), BitcastTaggedToWord(b))); |
297 } | 297 } |
298 | 298 |
299 Node* CodeStubAssembler::SmiAddWithOverflow(Node* a, Node* b) { | |
300 return IntPtrAddWithOverflow(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); | |
301 } | |
302 | |
303 Node* CodeStubAssembler::SmiSub(Node* a, Node* b) { | 299 Node* CodeStubAssembler::SmiSub(Node* a, Node* b) { |
304 return BitcastWordToTaggedSigned( | 300 return BitcastWordToTaggedSigned( |
305 IntPtrSub(BitcastTaggedToWord(a), BitcastTaggedToWord(b))); | 301 IntPtrSub(BitcastTaggedToWord(a), BitcastTaggedToWord(b))); |
306 } | 302 } |
307 | 303 |
308 Node* CodeStubAssembler::SmiSubWithOverflow(Node* a, Node* b) { | |
309 return IntPtrSubWithOverflow(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); | |
310 } | |
311 | |
312 Node* CodeStubAssembler::SmiEqual(Node* a, Node* b) { | 304 Node* CodeStubAssembler::SmiEqual(Node* a, Node* b) { |
313 return WordEqual(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); | 305 return WordEqual(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); |
314 } | 306 } |
315 | 307 |
316 Node* CodeStubAssembler::SmiAbove(Node* a, Node* b) { | 308 Node* CodeStubAssembler::SmiAbove(Node* a, Node* b) { |
317 return UintPtrGreaterThan(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); | 309 return UintPtrGreaterThan(BitcastTaggedToWord(a), BitcastTaggedToWord(b)); |
318 } | 310 } |
319 | 311 |
320 Node* CodeStubAssembler::SmiAboveOrEqual(Node* a, Node* b) { | 312 Node* CodeStubAssembler::SmiAboveOrEqual(Node* a, Node* b) { |
321 return UintPtrGreaterThanOrEqual(BitcastTaggedToWord(a), | 313 return UintPtrGreaterThanOrEqual(BitcastTaggedToWord(a), |
(...skipping 7094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7416 result.Bind(CallRuntime(Runtime::kInstanceOf, context, object, callable)); | 7408 result.Bind(CallRuntime(Runtime::kInstanceOf, context, object, callable)); |
7417 Goto(&end); | 7409 Goto(&end); |
7418 } | 7410 } |
7419 | 7411 |
7420 Bind(&end); | 7412 Bind(&end); |
7421 return result.value(); | 7413 return result.value(); |
7422 } | 7414 } |
7423 | 7415 |
7424 } // namespace internal | 7416 } // namespace internal |
7425 } // namespace v8 | 7417 } // namespace v8 |
OLD | NEW |