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

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

Issue 11363151: Revert r14711 and r14709 because of test failures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('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 "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 7408 matching lines...) Expand 10 before | Expand all | Expand 10 after
7419 void ICData::set_num_args_tested(intptr_t value) const { 7419 void ICData::set_num_args_tested(intptr_t value) const {
7420 raw_ptr()->num_args_tested_ = value; 7420 raw_ptr()->num_args_tested_ = value;
7421 } 7421 }
7422 7422
7423 7423
7424 void ICData::set_ic_data(const Array& value) const { 7424 void ICData::set_ic_data(const Array& value) const {
7425 StorePointer(&raw_ptr()->ic_data_, value.raw()); 7425 StorePointer(&raw_ptr()->ic_data_, value.raw());
7426 } 7426 }
7427 7427
7428 7428
7429 void ICData::set_deopt_reason(intptr_t deopt_reason) const {
7430 raw_ptr()->deopt_reason_ = deopt_reason;
7431 }
7432
7433
7434 intptr_t ICData::TestEntryLength() const { 7429 intptr_t ICData::TestEntryLength() const {
7435 return num_args_tested() + 1 /* target function*/; 7430 return num_args_tested() + 1 /* target function*/;
7436 } 7431 }
7437 7432
7438 7433
7439 intptr_t ICData::NumberOfChecks() const { 7434 intptr_t ICData::NumberOfChecks() const {
7440 // Do not count the sentinel; 7435 // Do not count the sentinel;
7441 return (Array::Handle(ic_data()).Length() / TestEntryLength()) - 1; 7436 return (Array::Handle(ic_data()).Length() / TestEntryLength()) - 1;
7442 } 7437 }
7443 7438
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
7698 RawObject* raw = Object::Allocate(ICData::kClassId, 7693 RawObject* raw = Object::Allocate(ICData::kClassId,
7699 ICData::InstanceSize(), 7694 ICData::InstanceSize(),
7700 Heap::kOld); 7695 Heap::kOld);
7701 NoGCScope no_gc; 7696 NoGCScope no_gc;
7702 result ^= raw; 7697 result ^= raw;
7703 } 7698 }
7704 result.set_function(function); 7699 result.set_function(function);
7705 result.set_target_name(target_name); 7700 result.set_target_name(target_name);
7706 result.set_deopt_id(deopt_id); 7701 result.set_deopt_id(deopt_id);
7707 result.set_num_args_tested(num_args_tested); 7702 result.set_num_args_tested(num_args_tested);
7708 result.set_deopt_reason(kDeoptUnknown);
7709 // Number of array elements in one test entry (num_args_tested + 1) 7703 // Number of array elements in one test entry (num_args_tested + 1)
7710 intptr_t len = result.TestEntryLength(); 7704 intptr_t len = result.TestEntryLength();
7711 // IC data array must be null terminated (sentinel entry). 7705 // IC data array must be null terminated (sentinel entry).
7712 const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld)); 7706 const Array& ic_data = Array::Handle(Array::New(len, Heap::kOld));
7713 result.set_ic_data(ic_data); 7707 result.set_ic_data(ic_data);
7714 result.WriteSentinel(); 7708 result.WriteSentinel();
7715 return result.raw(); 7709 return result.raw();
7716 } 7710 }
7717 7711
7718 7712
(...skipping 4238 matching lines...) Expand 10 before | Expand all | Expand 10 after
11957 } 11951 }
11958 return result.raw(); 11952 return result.raw();
11959 } 11953 }
11960 11954
11961 11955
11962 const char* WeakProperty::ToCString() const { 11956 const char* WeakProperty::ToCString() const {
11963 return "_WeakProperty"; 11957 return "_WeakProperty";
11964 } 11958 }
11965 11959
11966 } // namespace dart 11960 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698