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

Side by Side Diff: runtime/vm/constants_dbc.h

Issue 2113523002: DBC: Implement TestSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_CONSTANTS_DBC_H_ 5 #ifndef VM_CONSTANTS_DBC_H_
6 #define VM_CONSTANTS_DBC_H_ 6 #define VM_CONSTANTS_DBC_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/utils.h" 10 #include "platform/utils.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 // 358 //
359 // - AssertAssignable D 359 // - AssertAssignable D
360 // 360 //
361 // Assert that SP[-3] is assignable to variable named SP[0] of type 361 // Assert that SP[-3] is assignable to variable named SP[0] of type
362 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D]. 362 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D].
363 // 363 //
364 // - AssertBoolean A 364 // - AssertBoolean A
365 // 365 //
366 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). 366 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0).
367 // 367 //
368 // - TestSmi rA, rD
369 //
370 // If FP[rA] & FP[rD] != 0, then skip the next instruction. FP[rA] and FP[rD]
371 // must be Smis.
372 //
368 // - CheckSmi rA 373 // - CheckSmi rA
369 // 374 //
370 // If FP[rA] is a Smi, then skip the next instruction. 375 // If FP[rA] is a Smi, then skip the next instruction.
371 // 376 //
372 // - CheckClassId rA, D 377 // - CheckClassId rA, D
373 // 378 //
374 // If the object at FP[rA]'s class id matches hthe class id in PP[D], then 379 // If the object at FP[rA]'s class id matches hthe class id in PP[D], then
375 // skip the following instruction. 380 // skip the following instruction.
376 // 381 //
377 // - CheckStack 382 // - CheckStack
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 V(Frame, D, num, ___, ___) \ 518 V(Frame, D, num, ___, ___) \
514 V(SetFrame, A, num, ___, num) \ 519 V(SetFrame, A, num, ___, num) \
515 V(AllocateContext, D, num, ___, ___) \ 520 V(AllocateContext, D, num, ___, ___) \
516 V(CloneContext, 0, ___, ___, ___) \ 521 V(CloneContext, 0, ___, ___, ___) \
517 V(MoveSpecial, A_D, reg, num, ___) \ 522 V(MoveSpecial, A_D, reg, num, ___) \
518 V(InstantiateType, D, lit, ___, ___) \ 523 V(InstantiateType, D, lit, ___, ___) \
519 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ 524 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \
520 V(InstanceOf, A, num, ___, ___) \ 525 V(InstanceOf, A, num, ___, ___) \
521 V(AssertAssignable, D, num, lit, ___) \ 526 V(AssertAssignable, D, num, lit, ___) \
522 V(AssertBoolean, A, num, ___, ___) \ 527 V(AssertBoolean, A, num, ___, ___) \
528 V(TestSmi, A_D, reg, reg, ___) \
523 V(CheckSmi, A, reg, ___, ___) \ 529 V(CheckSmi, A, reg, ___, ___) \
524 V(CheckClassId, A_D, reg, lit, ___) \ 530 V(CheckClassId, A_D, reg, lit, ___) \
525 V(CheckStack, 0, ___, ___, ___) \ 531 V(CheckStack, 0, ___, ___, ___) \
526 V(DebugStep, 0, ___, ___, ___) \ 532 V(DebugStep, 0, ___, ___, ___) \
527 V(DebugBreak, A, num, ___, ___) \ 533 V(DebugBreak, A, num, ___, ___) \
528 V(Deopt, A_D, num, num, ___) \ 534 V(Deopt, A_D, num, num, ___) \
529 535
530 typedef uint32_t Instr; 536 typedef uint32_t Instr;
531 537
532 class Bytecode { 538 class Bytecode {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 const intptr_t CTX = 0; 638 const intptr_t CTX = 0;
633 639
634 enum FpuRegister { 640 enum FpuRegister {
635 kNoFpuRegister = -1, 641 kNoFpuRegister = -1,
636 kFakeFpuRegister, 642 kFakeFpuRegister,
637 kNumberOfDummyFpuRegisters, 643 kNumberOfDummyFpuRegisters,
638 }; 644 };
639 const FpuRegister FpuTMP = kFakeFpuRegister; 645 const FpuRegister FpuTMP = kFakeFpuRegister;
640 const intptr_t kNumberOfFpuRegisters = 1; 646 const intptr_t kNumberOfFpuRegisters = 1;
641 647
642 enum Condition { EQ, NE }; 648 enum Condition { NEXT_IS_TRUE, NEXT_IS_FALSE };
zra 2016/06/29 22:57:01 Add some comments here about what these mean.
rmacnak 2016/06/29 23:53:51 Done.
643 649
644 } // namespace dart 650 } // namespace dart
645 651
646 #endif // VM_CONSTANTS_DBC_H_ 652 #endif // VM_CONSTANTS_DBC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698