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

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

Issue 23681014: - Modify toDart to first do a simple lookup in the appropriate table before going down the templati… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | tools/dom/scripts/generator.py » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 118
119 PersistentHandle* Api::UnwrapAsPersistentHandle(Dart_PersistentHandle object) { 119 PersistentHandle* Api::UnwrapAsPersistentHandle(Dart_PersistentHandle object) {
120 ASSERT(Isolate::Current()->api_state()->IsValidPersistentHandle(object)); 120 ASSERT(Isolate::Current()->api_state()->IsValidPersistentHandle(object));
121 return reinterpret_cast<PersistentHandle*>(object); 121 return reinterpret_cast<PersistentHandle*>(object);
122 } 122 }
123 123
124 124
125 FinalizablePersistentHandle* Api::UnwrapAsWeakPersistentHandle( 125 FinalizablePersistentHandle* Api::UnwrapAsWeakPersistentHandle(
126 Dart_WeakPersistentHandle object) { 126 Dart_WeakPersistentHandle object) {
127 ASSERT(Isolate::Current()->api_state()->IsValidWeakPersistentHandle(object)); 127 ASSERT(Isolate::Current()->api_state()->IsValidWeakPersistentHandle(object) ||
128 Isolate::Current()->api_state()->
129 IsValidPrologueWeakPersistentHandle(object));
128 return reinterpret_cast<FinalizablePersistentHandle*>(object); 130 return reinterpret_cast<FinalizablePersistentHandle*>(object);
129 } 131 }
130 132
131 133
132 FinalizablePersistentHandle* Api::UnwrapAsPrologueWeakPersistentHandle( 134 FinalizablePersistentHandle* Api::UnwrapAsPrologueWeakPersistentHandle(
133 Dart_WeakPersistentHandle object) { 135 Dart_WeakPersistentHandle object) {
134 ASSERT(Isolate::Current()->api_state()->IsValidPrologueWeakPersistentHandle( 136 ASSERT(Isolate::Current()->api_state()->IsValidPrologueWeakPersistentHandle(
135 object)); 137 object));
136 return reinterpret_cast<FinalizablePersistentHandle*>(object); 138 return reinterpret_cast<FinalizablePersistentHandle*>(object);
137 } 139 }
(...skipping 4199 matching lines...) Expand 10 before | Expand all | Expand 10 after
4337 } 4339 }
4338 { 4340 {
4339 NoGCScope no_gc; 4341 NoGCScope no_gc;
4340 RawObject* raw_obj = obj.raw(); 4342 RawObject* raw_obj = obj.raw();
4341 isolate->heap()->SetPeer(raw_obj, peer); 4343 isolate->heap()->SetPeer(raw_obj, peer);
4342 } 4344 }
4343 return Api::Success(); 4345 return Api::Success();
4344 } 4346 }
4345 4347
4346 } // namespace dart 4348 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698