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

Side by Side Diff: runtime/vm/object_test.cc

Issue 2725623003: Reland "Track the 'awaiter return' call stack..." (Closed)
Patch Set: Update the Kernel continuation transformer 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 #endif // ARCH_IS_64_BIT 2793 #endif // ARCH_IS_64_BIT
2794 2794
2795 2795
2796 ISOLATE_UNIT_TEST_CASE(ExceptionHandlers) { 2796 ISOLATE_UNIT_TEST_CASE(ExceptionHandlers) {
2797 const int kNumEntries = 4; 2797 const int kNumEntries = 4;
2798 // Add an exception handler table to the code. 2798 // Add an exception handler table to the code.
2799 ExceptionHandlers& exception_handlers = ExceptionHandlers::Handle(); 2799 ExceptionHandlers& exception_handlers = ExceptionHandlers::Handle();
2800 exception_handlers ^= ExceptionHandlers::New(kNumEntries); 2800 exception_handlers ^= ExceptionHandlers::New(kNumEntries);
2801 const bool kNeedsStackTrace = true; 2801 const bool kNeedsStackTrace = true;
2802 const bool kNoStackTrace = false; 2802 const bool kNoStackTrace = false;
2803 exception_handlers.SetHandlerInfo(0, -1, 20u, kNeedsStackTrace, false); 2803 exception_handlers.SetHandlerInfo(0, -1, 20u, kNeedsStackTrace, false,
2804 exception_handlers.SetHandlerInfo(1, 0, 30u, kNeedsStackTrace, false); 2804 TokenPosition::kNoSource, true);
2805 exception_handlers.SetHandlerInfo(2, -1, 40u, kNoStackTrace, true); 2805 exception_handlers.SetHandlerInfo(1, 0, 30u, kNeedsStackTrace, false,
2806 exception_handlers.SetHandlerInfo(3, 1, 150u, kNoStackTrace, true); 2806 TokenPosition::kNoSource, true);
2807 exception_handlers.SetHandlerInfo(2, -1, 40u, kNoStackTrace, true,
2808 TokenPosition::kNoSource, true);
2809 exception_handlers.SetHandlerInfo(3, 1, 150u, kNoStackTrace, true,
2810 TokenPosition::kNoSource, true);
2807 2811
2808 extern void GenerateIncrement(Assembler * assembler); 2812 extern void GenerateIncrement(Assembler * assembler);
2809 Assembler _assembler_; 2813 Assembler _assembler_;
2810 GenerateIncrement(&_assembler_); 2814 GenerateIncrement(&_assembler_);
2811 Code& code = Code::Handle(Code::FinalizeCode( 2815 Code& code = Code::Handle(Code::FinalizeCode(
2812 Function::Handle(CreateFunction("Test_Code")), &_assembler_)); 2816 Function::Handle(CreateFunction("Test_Code")), &_assembler_));
2813 code.set_exception_handlers(exception_handlers); 2817 code.set_exception_handlers(exception_handlers);
2814 2818
2815 // Verify the exception handler table entries by accessing them. 2819 // Verify the exception handler table entries by accessing them.
2816 const ExceptionHandlers& handlers = 2820 const ExceptionHandlers& handlers =
(...skipping 1885 matching lines...) Expand 10 before | Expand all | Expand 10 after
4702 // utf32->utf16 conversion. 4706 // utf32->utf16 conversion.
4703 int32_t char_codes[] = {0, 0x0a, 0x0d, 0x7f, 0xff, 4707 int32_t char_codes[] = {0, 0x0a, 0x0d, 0x7f, 0xff,
4704 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff}; 4708 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff};
4705 4709
4706 const String& str = 4710 const String& str =
4707 String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes))); 4711 String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes)));
4708 EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes))); 4712 EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes)));
4709 } 4713 }
4710 4714
4711 } // namespace dart 4715 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698