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

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

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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/runtime_entry.h ('k') | runtime/vm/runtime_entry_arm.cc » ('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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 "vm/runtime_entry.h" 5 #include "vm/runtime_entry.h"
6 6
7 #include "vm/object.h" 7 #include "vm/object.h"
8 #include "vm/symbols.h" 8 #include "vm/symbols.h"
9 #include "vm/verifier.h" 9 #include "vm/verifier.h"
10 10
(...skipping 11 matching lines...) Expand all
22 #endif 22 #endif
23 23
24 24
25 // Add function to a class and that class to the class dictionary so that 25 // Add function to a class and that class to the class dictionary so that
26 // frame walking can be used. 26 // frame walking can be used.
27 const Function& RegisterFakeFunction(const char* name, const Code& code) { 27 const Function& RegisterFakeFunction(const char* name, const Code& code) {
28 Thread* thread = Thread::Current(); 28 Thread* thread = Thread::Current();
29 const String& class_name = String::Handle(Symbols::New(thread, "ownerClass")); 29 const String& class_name = String::Handle(Symbols::New(thread, "ownerClass"));
30 const Script& script = Script::Handle(); 30 const Script& script = Script::Handle();
31 const Library& lib = Library::Handle(Library::CoreLibrary()); 31 const Library& lib = Library::Handle(Library::CoreLibrary());
32 const Class& owner_class = 32 const Class& owner_class = Class::Handle(
33 Class::Handle(Class::New(lib, class_name, script, 33 Class::New(lib, class_name, script, TokenPosition::kNoSource));
34 TokenPosition::kNoSource));
35 const String& function_name = String::ZoneHandle(Symbols::New(thread, name)); 34 const String& function_name = String::ZoneHandle(Symbols::New(thread, name));
36 const Function& function = Function::ZoneHandle( 35 const Function& function = Function::ZoneHandle(Function::New(
37 Function::New(function_name, 36 function_name, RawFunction::kRegularFunction, true, false, false, false,
38 RawFunction::kRegularFunction, 37 false, owner_class, TokenPosition::kMinSource));
39 true,
40 false,
41 false,
42 false,
43 false,
44 owner_class,
45 TokenPosition::kMinSource));
46 const Array& functions = Array::Handle(Array::New(1)); 38 const Array& functions = Array::Handle(Array::New(1));
47 functions.SetAt(0, function); 39 functions.SetAt(0, function);
48 owner_class.SetFunctions(functions); 40 owner_class.SetFunctions(functions);
49 lib.AddClass(owner_class); 41 lib.AddClass(owner_class);
50 function.AttachCode(code); 42 function.AttachCode(code);
51 return function; 43 return function;
52 } 44 }
53 45
54 } // namespace dart 46 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/runtime_entry.h ('k') | runtime/vm/runtime_entry_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698