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

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

Issue 365983002: Make isolate specific stub code accessors instance methods instead (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/code_patcher_x64_test.cc ('k') | runtime/vm/flow_graph_compiler.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) 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/dart_entry.h" 5 #include "vm/dart_entry.h"
6 6
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/debugger.h" 10 #include "vm/debugger.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 Isolate* isolate = Isolate::Current(); 48 Isolate* isolate = Isolate::Current();
49 if (!function.HasCode()) { 49 if (!function.HasCode()) {
50 const Error& error = Error::Handle( 50 const Error& error = Error::Handle(
51 isolate, Compiler::CompileFunction(isolate, function)); 51 isolate, Compiler::CompileFunction(isolate, function));
52 if (!error.IsNull()) { 52 if (!error.IsNull()) {
53 return error.raw(); 53 return error.raw();
54 } 54 }
55 } 55 }
56 // Now Call the invoke stub which will invoke the dart function. 56 // Now Call the invoke stub which will invoke the dart function.
57 invokestub entrypoint = reinterpret_cast<invokestub>( 57 invokestub entrypoint = reinterpret_cast<invokestub>(
58 StubCode::InvokeDartCodeEntryPoint()); 58 isolate->stub_code()->InvokeDartCodeEntryPoint());
59 const Code& code = Code::Handle(isolate, function.CurrentCode()); 59 const Code& code = Code::Handle(isolate, function.CurrentCode());
60 ASSERT(!code.IsNull()); 60 ASSERT(!code.IsNull());
61 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0); 61 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0);
62 #if defined(USING_SIMULATOR) 62 #if defined(USING_SIMULATOR)
63 #if defined(ARCH_IS_64_BIT) 63 #if defined(ARCH_IS_64_BIT)
64 // TODO(zra): Change to intptr_t so we have only one case. 64 // TODO(zra): Change to intptr_t so we have only one case.
65 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( 65 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call(
66 reinterpret_cast<int64_t>(entrypoint), 66 reinterpret_cast<int64_t>(entrypoint),
67 static_cast<int64_t>(code.EntryPoint()), 67 static_cast<int64_t>(code.EntryPoint()),
68 reinterpret_cast<int64_t>(&arguments_descriptor), 68 reinterpret_cast<int64_t>(&arguments_descriptor),
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 const Array& args = Array::Handle(Array::New(kNumArguments)); 481 const Array& args = Array::Handle(Array::New(kNumArguments));
482 args.SetAt(0, map); 482 args.SetAt(0, map);
483 args.SetAt(1, key); 483 args.SetAt(1, key);
484 args.SetAt(2, value); 484 args.SetAt(2, value);
485 const Object& result = Object::Handle(DartEntry::InvokeFunction(function, 485 const Object& result = Object::Handle(DartEntry::InvokeFunction(function,
486 args)); 486 args));
487 return result.raw(); 487 return result.raw();
488 } 488 }
489 489
490 } // namespace dart 490 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_x64_test.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698