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

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

Issue 8803025: Fix linux build (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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/object_test.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/object.h" 5 #include "vm/object.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/assert.h" 8 #include "vm/assert.h"
9 #include "vm/bigint_operations.h" 9 #include "vm/bigint_operations.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 4403 matching lines...) Expand 10 before | Expand all | Expand 10 after
4414 } 4414 }
4415 4415
4416 4416
4417 void PcDescriptors::SetLength(intptr_t value) const { 4417 void PcDescriptors::SetLength(intptr_t value) const {
4418 // This is only safe because we create a new Smi, which does not cause 4418 // This is only safe because we create a new Smi, which does not cause
4419 // heap allocation. 4419 // heap allocation.
4420 raw_ptr()->length_ = Smi::New(value); 4420 raw_ptr()->length_ = Smi::New(value);
4421 } 4421 }
4422 4422
4423 4423
4424 intptr_t PcDescriptors::PC(intptr_t index) const { 4424 uword PcDescriptors::PC(intptr_t index) const {
4425 return *(EntryAddr(index, kPcEntry)); 4425 return static_cast<uword>(*(EntryAddr(index, kPcEntry)));
4426 } 4426 }
4427 4427
4428 4428
4429 void PcDescriptors::SetPC(intptr_t index, intptr_t value) const { 4429 void PcDescriptors::SetPC(intptr_t index, uword value) const {
4430 *(EntryAddr(index, kPcEntry)) = value; 4430 *(EntryAddr(index, kPcEntry)) = static_cast<intptr_t>(value);
4431 } 4431 }
4432 4432
4433 4433
4434 PcDescriptors::Kind PcDescriptors::DescriptorKind(intptr_t index) const { 4434 PcDescriptors::Kind PcDescriptors::DescriptorKind(intptr_t index) const {
4435 return static_cast<PcDescriptors::Kind>(*(EntryAddr(index, kKindEntry))); 4435 return static_cast<PcDescriptors::Kind>(*(EntryAddr(index, kKindEntry)));
4436 } 4436 }
4437 4437
4438 4438
4439 void PcDescriptors::SetKind(intptr_t index, PcDescriptors::Kind value) const { 4439 void PcDescriptors::SetKind(intptr_t index, PcDescriptors::Kind value) const {
4440 *(EntryAddr(index, kKindEntry)) = value; 4440 *(EntryAddr(index, kKindEntry)) = value;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
4684 4684
4685 void Code::set_ic_data(const Array& ic_data) const { 4685 void Code::set_ic_data(const Array& ic_data) const {
4686 ASSERT(!ic_data.IsNull()); 4686 ASSERT(!ic_data.IsNull());
4687 StorePointer(&raw_ptr()->ic_data_, ic_data.raw()); 4687 StorePointer(&raw_ptr()->ic_data_, ic_data.raw());
4688 } 4688 }
4689 4689
4690 intptr_t Code::GetTokenIndexOfPC(uword pc) const { 4690 intptr_t Code::GetTokenIndexOfPC(uword pc) const {
4691 intptr_t token_index = -1; 4691 intptr_t token_index = -1;
4692 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); 4692 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
4693 for (intptr_t i = 0; i < descriptors.Length(); i++) { 4693 for (intptr_t i = 0; i < descriptors.Length(); i++) {
4694 if (static_cast<uword>(descriptors.PC(i)) == pc) { 4694 if (descriptors.PC(i) == pc) {
4695 token_index = descriptors.TokenIndex(i); 4695 token_index = descriptors.TokenIndex(i);
4696 break; 4696 break;
4697 } 4697 }
4698 } 4698 }
4699 return token_index; 4699 return token_index;
4700 } 4700 }
4701 4701
4702 4702
4703 uword Code::GetDeoptPcAtNodeId(intptr_t node_id) const { 4703 uword Code::GetDeoptPcAtNodeId(intptr_t node_id) const {
4704 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); 4704 const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors());
(...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after
7283 const String& str = String::Handle(pattern()); 7283 const String& str = String::Handle(pattern());
7284 const char* format = "JSRegExp: pattern=%s flags=%s"; 7284 const char* format = "JSRegExp: pattern=%s flags=%s";
7285 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 7285 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
7286 char* chars = reinterpret_cast<char*>( 7286 char* chars = reinterpret_cast<char*>(
7287 Isolate::Current()->current_zone()->Allocate(len + 1)); 7287 Isolate::Current()->current_zone()->Allocate(len + 1));
7288 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 7288 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
7289 return chars; 7289 return chars;
7290 } 7290 }
7291 7291
7292 } // namespace dart 7292 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698