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

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

Issue 13932024: Added a run state field to Isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/isolate.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/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 #include "vm/resolver.h" 10 #include "vm/resolver.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 if (!error.IsNull()) { 48 if (!error.IsNull()) {
49 return error.raw(); 49 return error.raw();
50 } 50 }
51 } 51 }
52 // Now Call the invoke stub which will invoke the dart function. 52 // Now Call the invoke stub which will invoke the dart function.
53 invokestub entrypoint = reinterpret_cast<invokestub>( 53 invokestub entrypoint = reinterpret_cast<invokestub>(
54 StubCode::InvokeDartCodeEntryPoint()); 54 StubCode::InvokeDartCodeEntryPoint());
55 const Code& code = Code::Handle(function.CurrentCode()); 55 const Code& code = Code::Handle(function.CurrentCode());
56 ASSERT(!code.IsNull()); 56 ASSERT(!code.IsNull());
57 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0); 57 ASSERT(Isolate::Current()->no_callback_scope_depth() == 0);
58 IsolateRunStateManager run_state_manager;
59 run_state_manager.SetRunState(Isolate::kIsolateRunning);
58 #if defined(USING_SIMULATOR) 60 #if defined(USING_SIMULATOR)
59 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call( 61 return bit_copy<RawObject*, int64_t>(Simulator::Current()->Call(
60 reinterpret_cast<int32_t>(entrypoint), 62 reinterpret_cast<int32_t>(entrypoint),
61 static_cast<int32_t>(code.EntryPoint()), 63 static_cast<int32_t>(code.EntryPoint()),
62 reinterpret_cast<int32_t>(&arguments_descriptor), 64 reinterpret_cast<int32_t>(&arguments_descriptor),
63 reinterpret_cast<int32_t>(&arguments), 65 reinterpret_cast<int32_t>(&arguments),
64 reinterpret_cast<int32_t>(&context))); 66 reinterpret_cast<int32_t>(&context)));
65 #else 67 #else
66 return entrypoint(code.EntryPoint(), 68 return entrypoint(code.EntryPoint(),
67 arguments_descriptor, 69 arguments_descriptor,
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 String::Handle(Field::GetterName(Symbols::_id())))); 475 String::Handle(Field::GetterName(Symbols::_id()))));
474 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name)); 476 const Function& func = Function::Handle(cls.LookupDynamicFunction(func_name));
475 ASSERT(!func.IsNull()); 477 ASSERT(!func.IsNull());
476 const Array& args = Array::Handle(Array::New(1)); 478 const Array& args = Array::Handle(Array::New(1));
477 args.SetAt(0, port); 479 args.SetAt(0, port);
478 return DartEntry::InvokeFunction(func, args); 480 return DartEntry::InvokeFunction(func, args);
479 } 481 }
480 482
481 483
482 } // namespace dart 484 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698