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

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

Issue 2039913006: DBC: Eager deoptimization and CheckSmi instruction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 6 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 | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/deopt_instructions.h » ('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 (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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // 316 //
317 // - AssertAssignable D 317 // - AssertAssignable D
318 // 318 //
319 // Assert that SP[-3] is assignable to variable named SP[0] of type 319 // Assert that SP[-3] is assignable to variable named SP[0] of type
320 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D]. 320 // SP[-1] with type arguments SP[-2] using SubtypeTestCache PP[D].
321 // 321 //
322 // - AssertBoolean A 322 // - AssertBoolean A
323 // 323 //
324 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0). 324 // Assert that TOS is a boolean (A = 1) or that TOS is not null (A = 0).
325 // 325 //
326 // - CheckSmi rA
327 //
328 // If FP[rA] is a Smi, then skip the next instruction.
329 //
326 // - CheckStack 330 // - CheckStack
327 // 331 //
328 // Compare SP against isolate stack limit and call StackOverflow handler if 332 // Compare SP against isolate stack limit and call StackOverflow handler if
329 // necessary. 333 // necessary.
330 // 334 //
331 // - DebugStep, DebugBreak A 335 // - DebugStep, DebugBreak A
332 // 336 //
333 // Debugger support. DebugBreak is bytecode that can be patched into the 337 // Debugger support. DebugBreak is bytecode that can be patched into the
334 // instruction stream to trigger in place breakpoint. 338 // instruction stream to trigger in place breakpoint.
335 // 339 //
(...skipping 16 matching lines...) Expand all
352 // If D == 0 then trigger lazy deoptimization. 356 // If D == 0 then trigger lazy deoptimization.
353 // 357 //
354 // The meaning of operand ArgC (encoded as A operand) matches that of an 358 // The meaning of operand ArgC (encoded as A operand) matches that of an
355 // ArgC operand in call instructions. This is needed because we could 359 // ArgC operand in call instructions. This is needed because we could
356 // potentially patch calls instructions with a lazy deopt and we need to 360 // potentially patch calls instructions with a lazy deopt and we need to
357 // ensure that any Return/ReturnTOS instructions 361 // ensure that any Return/ReturnTOS instructions
358 // returning from the patched calls will continue to function, 362 // returning from the patched calls will continue to function,
359 // e.g. in bytecode sequences like 363 // e.g. in bytecode sequences like
360 // 364 //
361 // InstanceCall ... <- lazy deopt inside first call 365 // InstanceCall ... <- lazy deopt inside first call
362 // InstanceCall ... <- patches seconds call with Deopt 366 // InstanceCall ... <- patches second call with Deopt
363 // 367 //
364 // BYTECODE LIST FORMAT 368 // BYTECODE LIST FORMAT
365 // 369 //
366 // Bytecode list below is specified using the following format: 370 // Bytecode list below is specified using the following format:
367 // 371 //
368 // V(BytecodeName, OperandForm, Op1, Op2, Op3) 372 // V(BytecodeName, OperandForm, Op1, Op2, Op3)
369 // 373 //
370 // - OperandForm specifies operand encoding and should be one of 0, A, T, A_D, 374 // - OperandForm specifies operand encoding and should be one of 0, A, T, A_D,
371 // A_X, X, D (see ENCODING section above). 375 // A_X, X, D (see ENCODING section above).
372 // 376 //
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 V(EntryOptimized, A_D, num, num, ___) \ 450 V(EntryOptimized, A_D, num, num, ___) \
447 V(Frame, D, num, ___, ___) \ 451 V(Frame, D, num, ___, ___) \
448 V(SetFrame, A, num, ___, num) \ 452 V(SetFrame, A, num, ___, num) \
449 V(AllocateContext, D, num, ___, ___) \ 453 V(AllocateContext, D, num, ___, ___) \
450 V(CloneContext, 0, ___, ___, ___) \ 454 V(CloneContext, 0, ___, ___, ___) \
451 V(MoveSpecial, A_D, reg, num, ___) \ 455 V(MoveSpecial, A_D, reg, num, ___) \
452 V(InstantiateType, D, lit, ___, ___) \ 456 V(InstantiateType, D, lit, ___, ___) \
453 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \ 457 V(InstantiateTypeArgumentsTOS, A_D, num, lit, ___) \
454 V(AssertAssignable, D, num, lit, ___) \ 458 V(AssertAssignable, D, num, lit, ___) \
455 V(AssertBoolean, A, num, ___, ___) \ 459 V(AssertBoolean, A, num, ___, ___) \
460 V(CheckSmi, A, reg, ___, ___) \
456 V(CheckStack, 0, ___, ___, ___) \ 461 V(CheckStack, 0, ___, ___, ___) \
457 V(DebugStep, 0, ___, ___, ___) \ 462 V(DebugStep, 0, ___, ___, ___) \
458 V(DebugBreak, A, num, ___, ___) \ 463 V(DebugBreak, A, num, ___, ___) \
459 V(Deopt, A_D, num, num, ___) \ 464 V(Deopt, A_D, num, num, ___) \
460 465
461 typedef uint32_t Instr; 466 typedef uint32_t Instr;
462 467
463 class Bytecode { 468 class Bytecode {
464 public: 469 public:
465 enum Opcode { 470 enum Opcode {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 kNumberOfDummyFpuRegisters, 573 kNumberOfDummyFpuRegisters,
569 }; 574 };
570 const FpuRegister FpuTMP = kFakeFpuRegister; 575 const FpuRegister FpuTMP = kFakeFpuRegister;
571 const intptr_t kNumberOfFpuRegisters = 1; 576 const intptr_t kNumberOfFpuRegisters = 1;
572 577
573 enum Condition { EQ, NE }; 578 enum Condition { EQ, NE };
574 579
575 } // namespace dart 580 } // namespace dart
576 581
577 #endif // VM_CONSTANTS_DBC_H_ 582 #endif // VM_CONSTANTS_DBC_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_dbc_test.cc ('k') | runtime/vm/deopt_instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698