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

Side by Side Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2754573002: Revert of Collect type profile for DevTools. (Closed)
Patch Set: Created 3 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 | « test/inspector/type-profile/collect-type-profile-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/interpreter/bytecode-array-builder.h" 8 #include "src/interpreter/bytecode-array-builder.h"
9 #include "src/interpreter/bytecode-array-iterator.h" 9 #include "src/interpreter/bytecode-array-iterator.h"
10 #include "src/interpreter/bytecode-label.h" 10 #include "src/interpreter/bytecode-label.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 scorecard[Bytecodes::ToByte(Bytecode::kSubSmi)] = 1; 439 scorecard[Bytecodes::ToByte(Bytecode::kSubSmi)] = 1;
440 scorecard[Bytecodes::ToByte(Bytecode::kBitwiseAndSmi)] = 1; 440 scorecard[Bytecodes::ToByte(Bytecode::kBitwiseAndSmi)] = 1;
441 scorecard[Bytecodes::ToByte(Bytecode::kBitwiseOrSmi)] = 1; 441 scorecard[Bytecodes::ToByte(Bytecode::kBitwiseOrSmi)] = 1;
442 scorecard[Bytecodes::ToByte(Bytecode::kShiftLeftSmi)] = 1; 442 scorecard[Bytecodes::ToByte(Bytecode::kShiftLeftSmi)] = 1;
443 scorecard[Bytecodes::ToByte(Bytecode::kShiftRightSmi)] = 1; 443 scorecard[Bytecodes::ToByte(Bytecode::kShiftRightSmi)] = 1;
444 scorecard[Bytecodes::ToByte(Bytecode::kTestUndetectable)] = 1; 444 scorecard[Bytecodes::ToByte(Bytecode::kTestUndetectable)] = 1;
445 scorecard[Bytecodes::ToByte(Bytecode::kTestUndefined)] = 1; 445 scorecard[Bytecodes::ToByte(Bytecode::kTestUndefined)] = 1;
446 scorecard[Bytecodes::ToByte(Bytecode::kTestNull)] = 1; 446 scorecard[Bytecodes::ToByte(Bytecode::kTestNull)] = 1;
447 } 447 }
448 448
449 if (!FLAG_type_profile) {
450 // Bytecode for CollectTypeProfile is only emitted when
451 // Type Information for DevTools is turned on.
452 scorecard[Bytecodes::ToByte(Bytecode::kCollectTypeProfile)] = 1;
453 }
454
455 // Check return occurs at the end and only once in the BytecodeArray. 449 // Check return occurs at the end and only once in the BytecodeArray.
456 CHECK_EQ(final_bytecode, Bytecode::kReturn); 450 CHECK_EQ(final_bytecode, Bytecode::kReturn);
457 CHECK_EQ(scorecard[Bytecodes::ToByte(final_bytecode)], 1); 451 CHECK_EQ(scorecard[Bytecodes::ToByte(final_bytecode)], 1);
458 452
459 #define CHECK_BYTECODE_PRESENT(Name, ...) \ 453 #define CHECK_BYTECODE_PRESENT(Name, ...) \
460 /* Check Bytecode is marked in scorecard, unless it's a debug break */ \ 454 /* Check Bytecode is marked in scorecard, unless it's a debug break */ \
461 if (!Bytecodes::IsDebugBreak(Bytecode::k##Name)) { \ 455 if (!Bytecodes::IsDebugBreak(Bytecode::k##Name)) { \
462 CHECK_GE(scorecard[Bytecodes::ToByte(Bytecode::k##Name)], 1); \ 456 CHECK_GE(scorecard[Bytecodes::ToByte(Bytecode::k##Name)], 1); \
463 } 457 }
464 BYTECODE_LIST(CHECK_BYTECODE_PRESENT) 458 BYTECODE_LIST(CHECK_BYTECODE_PRESENT)
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 iterator.Advance(); 781 iterator.Advance();
788 } 782 }
789 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn); 783 CHECK_EQ(iterator.current_bytecode(), Bytecode::kReturn);
790 iterator.Advance(); 784 iterator.Advance();
791 CHECK(iterator.done()); 785 CHECK(iterator.done());
792 } 786 }
793 787
794 } // namespace interpreter 788 } // namespace interpreter
795 } // namespace internal 789 } // namespace internal
796 } // namespace v8 790 } // namespace v8
OLDNEW
« no previous file with comments | « test/inspector/type-profile/collect-type-profile-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698