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

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

Issue 2818273002: Remove parent_level field of function type parameters. (Closed)
Patch Set: address comments Created 3 years, 8 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/object_service.cc ('k') | runtime/vm/parser.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) 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 2602 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 Function::New(parent_name, RawFunction::kRegularFunction, false, false, 2613 Function::New(parent_name, RawFunction::kRegularFunction, false, false,
2614 false, false, false, cls, TokenPosition::kMinSource); 2614 false, false, false, cls, TokenPosition::kMinSource);
2615 functions.SetAt(0, parent); 2615 functions.SetAt(0, parent);
2616 cls.SetFunctions(functions); 2616 cls.SetFunctions(functions);
2617 2617
2618 Function& function = Function::Handle(); 2618 Function& function = Function::Handle();
2619 const String& function_name = String::Handle(Symbols::New(thread, "foo")); 2619 const String& function_name = String::Handle(Symbols::New(thread, "foo"));
2620 function = Function::NewClosureFunction(function_name, parent, 2620 function = Function::NewClosureFunction(function_name, parent,
2621 TokenPosition::kMinSource); 2621 TokenPosition::kMinSource);
2622 const Closure& closure = Closure::Handle( 2622 const Closure& closure = Closure::Handle(
2623 Closure::New(Object::null_type_arguments(), function, context)); 2623 Closure::New(Object::null_type_arguments(), Object::null_type_arguments(),
2624 function, context));
2624 const Class& closure_class = Class::Handle(closure.clazz()); 2625 const Class& closure_class = Class::Handle(closure.clazz());
2625 EXPECT_EQ(closure_class.id(), kClosureCid); 2626 EXPECT_EQ(closure_class.id(), kClosureCid);
2626 const Function& closure_function = Function::Handle(closure.function()); 2627 const Function& closure_function = Function::Handle(closure.function());
2627 EXPECT_EQ(closure_function.raw(), function.raw()); 2628 EXPECT_EQ(closure_function.raw(), function.raw());
2628 const Context& closure_context = Context::Handle(closure.context()); 2629 const Context& closure_context = Context::Handle(closure.context());
2629 EXPECT_EQ(closure_context.raw(), context.raw()); 2630 EXPECT_EQ(closure_context.raw(), context.raw());
2630 } 2631 }
2631 2632
2632 2633
2633 ISOLATE_UNIT_TEST_CASE(ObjectPrinting) { 2634 ISOLATE_UNIT_TEST_CASE(ObjectPrinting) {
(...skipping 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
4709 // utf32->utf16 conversion. 4710 // utf32->utf16 conversion.
4710 int32_t char_codes[] = {0, 0x0a, 0x0d, 0x7f, 0xff, 4711 int32_t char_codes[] = {0, 0x0a, 0x0d, 0x7f, 0xff,
4711 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff}; 4712 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff};
4712 4713
4713 const String& str = 4714 const String& str =
4714 String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes))); 4715 String::Handle(String::FromUTF32(char_codes, ARRAY_SIZE(char_codes)));
4715 EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes))); 4716 EXPECT(str.Equals(char_codes, ARRAY_SIZE(char_codes)));
4716 } 4717 }
4717 4718
4718 } // namespace dart 4719 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_service.cc ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698