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

Side by Side Diff: runtime/lib/object.cc

Issue 27307005: Change == into an instance call to allow polymorphic inlining of ==. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased, addressed comments Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/lib/object_patch.dart » ('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/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/exceptions.h" 8 #include "vm/exceptions.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/native_entry.h" 10 #include "vm/native_entry.h"
11 #include "vm/object.h" 11 #include "vm/object.h"
12 #include "vm/stack_frame.h" 12 #include "vm/stack_frame.h"
13 #include "vm/symbols.h" 13 #include "vm/symbols.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 DECLARE_FLAG(bool, enable_type_checks); 17 DECLARE_FLAG(bool, enable_type_checks);
18 DECLARE_FLAG(bool, trace_type_checks); 18 DECLARE_FLAG(bool, trace_type_checks);
19 19
20 20
21 DEFINE_NATIVE_ENTRY(Object_equals, 1) {
22 // Implemented in the flow graph builder.
23 UNREACHABLE();
24 return Object::null();
25 }
26
27
21 DEFINE_NATIVE_ENTRY(Object_cid, 1) { 28 DEFINE_NATIVE_ENTRY(Object_cid, 1) {
22 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0)); 29 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
23 return Smi::New(instance.GetClassId()); 30 return Smi::New(instance.GetClassId());
24 } 31 }
25 32
26 33
27 DEFINE_NATIVE_ENTRY(Object_getHash, 1) { 34 DEFINE_NATIVE_ENTRY(Object_getHash, 1) {
28 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0)); 35 const Instance& instance = Instance::CheckedHandle(arguments->NativeArgAt(0));
29 Heap* heap = isolate->heap(); 36 Heap* heap = isolate->heap();
30 return Smi::New(heap->GetHash(instance.raw())); 37 return Smi::New(heap->GetHash(instance.raw()));
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 227 }
221 228
222 229
223 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { 230 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) {
224 const AbstractType& type = 231 const AbstractType& type =
225 AbstractType::CheckedHandle(arguments->NativeArgAt(0)); 232 AbstractType::CheckedHandle(arguments->NativeArgAt(0));
226 return type.UserVisibleName(); 233 return type.UserVisibleName();
227 } 234 }
228 235
229 } // namespace dart 236 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/object_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698