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

Side by Side Diff: lib/isolate.cc

Issue 11648006: Create read only handles for empty_array and sentinel objects (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « lib/array.cc ('k') | lib/string.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) 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/assert.h" 5 #include "platform/assert.h"
6 #include "vm/bootstrap_natives.h" 6 #include "vm/bootstrap_natives.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/dart.h" 8 #include "vm/dart.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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 result = state->ResolveFunction(); 373 result = state->ResolveFunction();
374 delete state; 374 delete state;
375 state = NULL; 375 state = NULL;
376 if (result.IsError()) { 376 if (result.IsError()) {
377 StoreError(isolate, result); 377 StoreError(isolate, result);
378 return false; 378 return false;
379 } 379 }
380 ASSERT(result.IsFunction()); 380 ASSERT(result.IsFunction());
381 Function& func = Function::Handle(isolate); 381 Function& func = Function::Handle(isolate);
382 func ^= result.raw(); 382 func ^= result.raw();
383 const Array& args = Array::Handle(Object::empty_array()); 383 result = DartEntry::InvokeStatic(func, Object::empty_array());
384 result = DartEntry::InvokeStatic(func, args);
385 if (result.IsError()) { 384 if (result.IsError()) {
386 StoreError(isolate, result); 385 StoreError(isolate, result);
387 return false; 386 return false;
388 } 387 }
389 } 388 }
390 return true; 389 return true;
391 } 390 }
392 391
393 392
394 static RawObject* Spawn(NativeArguments* arguments, SpawnState* state) { 393 static RawObject* Spawn(NativeArguments* arguments, SpawnState* state) {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 493
495 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) { 494 DEFINE_NATIVE_ENTRY(isolate_getPortInternal, 0) {
496 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port())); 495 const Object& port = Object::Handle(ReceivePortCreate(isolate->main_port()));
497 if (port.IsError()) { 496 if (port.IsError()) {
498 Exceptions::PropagateError(Error::Cast(port)); 497 Exceptions::PropagateError(Error::Cast(port));
499 } 498 }
500 return port.raw(); 499 return port.raw();
501 } 500 }
502 501
503 } // namespace dart 502 } // namespace dart
OLDNEW
« no previous file with comments | « lib/array.cc ('k') | lib/string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698