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

Side by Side Diff: lib/object.cc

Issue 11745022: - Make Boolean 'true' and 'false' singleton VM isolate objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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 | « lib/identical.cc ('k') | lib/regexp.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) 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 "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/native_entry.h" 8 #include "vm/native_entry.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 #include "vm/stack_frame.h" 10 #include "vm/stack_frame.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 StackFrame* caller_frame = iterator.NextFrame(); 87 StackFrame* caller_frame = iterator.NextFrame();
88 ASSERT(caller_frame != NULL); 88 ASSERT(caller_frame != NULL);
89 const intptr_t location = caller_frame->GetTokenPos(); 89 const intptr_t location = caller_frame->GetTokenPos();
90 String& malformed_error_message = String::Handle( 90 String& malformed_error_message = String::Handle(
91 String::New(malformed_error.ToErrorCString())); 91 String::New(malformed_error.ToErrorCString()));
92 Exceptions::CreateAndThrowTypeError( 92 Exceptions::CreateAndThrowTypeError(
93 location, Symbols::Empty(), Symbols::Empty(), 93 location, Symbols::Empty(), Symbols::Empty(),
94 Symbols::Empty(), malformed_error_message); 94 Symbols::Empty(), malformed_error_message);
95 UNREACHABLE(); 95 UNREACHABLE();
96 } 96 }
97 if (negate.value()) { 97 return Bool::Get(negate.value() ? !is_instance_of : is_instance_of);
98 return is_instance_of ? Bool::False() : Bool::True();
99 } else {
100 return is_instance_of ? Bool::True() : Bool::False();
101 }
102 } 98 }
103 99
104 100
105 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) { 101 DEFINE_NATIVE_ENTRY(AbstractType_toString, 1) {
106 const AbstractType& type = 102 const AbstractType& type =
107 AbstractType::CheckedHandle(arguments->NativeArgAt(0)); 103 AbstractType::CheckedHandle(arguments->NativeArgAt(0));
108 return type.UserVisibleName(); 104 return type.UserVisibleName();
109 } 105 }
110 106
111 } // namespace dart 107 } // namespace dart
OLDNEW
« no previous file with comments | « lib/identical.cc ('k') | lib/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698