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

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

Issue 11230034: Fix super ==: Test first for null before call inf super ==. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
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 "vm/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 3354
3355 void Function::set_is_native(bool value) const { 3355 void Function::set_is_native(bool value) const {
3356 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_)); 3356 set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_));
3357 } 3357 }
3358 3358
3359 3359
3360 void Function::set_is_abstract(bool value) const { 3360 void Function::set_is_abstract(bool value) const {
3361 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_)); 3361 set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_));
3362 } 3362 }
3363 3363
3364
3364 void Function::set_is_inlinable(bool value) const { 3365 void Function::set_is_inlinable(bool value) const {
3365 set_kind_tag(InlinableBit::update(value, raw_ptr()->kind_tag_)); 3366 set_kind_tag(InlinableBit::update(value, raw_ptr()->kind_tag_));
3366 } 3367 }
3367 3368
3369
3370 bool Function::IsInlineable() const {
3371 // '==' call is handled specially.
3372 const String& equality_name = String::Handle(Symbols::New("=="));
hausner 2012/10/22 20:00:29 I expect this will be called quite often. It might
srdjan 2012/10/22 20:30:51 Symbols::New does not create new symbol each time,
3373 return InlinableBit::decode(raw_ptr()->kind_tag_) &&
3374 HasCode() &&
3375 name() != equality_name.raw();
3376 }
3377
3378
3368 intptr_t Function::NumParameters() const { 3379 intptr_t Function::NumParameters() const {
3369 return num_fixed_parameters() + NumOptionalParameters(); 3380 return num_fixed_parameters() + NumOptionalParameters();
3370 } 3381 }
3371 3382
3372 3383
3373 intptr_t Function::NumImplicitParameters() const { 3384 intptr_t Function::NumImplicitParameters() const {
3374 if (kind() == RawFunction::kConstructor) { 3385 if (kind() == RawFunction::kConstructor) {
3375 if (is_static()) { 3386 if (is_static()) {
3376 ASSERT(IsFactory()); 3387 ASSERT(IsFactory());
3377 return 1; // Type arguments. 3388 return 1; // Type arguments.
(...skipping 8827 matching lines...) Expand 10 before | Expand all | Expand 10 after
12205 } 12216 }
12206 return result.raw(); 12217 return result.raw();
12207 } 12218 }
12208 12219
12209 12220
12210 const char* WeakProperty::ToCString() const { 12221 const char* WeakProperty::ToCString() const {
12211 return "_WeakProperty"; 12222 return "_WeakProperty";
12212 } 12223 }
12213 12224
12214 } // namespace dart 12225 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698