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

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

Issue 9019029: Retrieve value of local variables in stack frames. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 12 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 | « runtime/vm/object.h ('k') | runtime/vm/vm_sources.gypi » ('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 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after
4599 void LocalVarDescriptors::GetRange(intptr_t var_index, 4599 void LocalVarDescriptors::GetRange(intptr_t var_index,
4600 intptr_t* begin_token_pos, 4600 intptr_t* begin_token_pos,
4601 intptr_t* end_token_pos) const { 4601 intptr_t* end_token_pos) const {
4602 ASSERT(var_index < Length()); 4602 ASSERT(var_index < Length());
4603 RawLocalVarDescriptors::VarInfo *info = &raw_ptr()->data_[var_index]; 4603 RawLocalVarDescriptors::VarInfo *info = &raw_ptr()->data_[var_index];
4604 *begin_token_pos = info->begin_pos; 4604 *begin_token_pos = info->begin_pos;
4605 *end_token_pos = info->end_pos; 4605 *end_token_pos = info->end_pos;
4606 } 4606 }
4607 4607
4608 4608
4609 intptr_t LocalVarDescriptors::GetSlotIndex(intptr_t var_index) const {
4610 ASSERT(var_index < Length());
4611 RawLocalVarDescriptors::VarInfo *info = &raw_ptr()->data_[var_index];
4612 return info->index;
4613 }
4614
4615
4609 void LocalVarDescriptors::SetVar(intptr_t var_index, 4616 void LocalVarDescriptors::SetVar(intptr_t var_index,
4610 const String& name, 4617 const String& name,
4611 intptr_t stack_slot, 4618 intptr_t stack_slot,
4612 intptr_t begin_pos, 4619 intptr_t begin_pos,
4613 intptr_t end_pos) const { 4620 intptr_t end_pos) const {
4614 ASSERT(var_index < Length()); 4621 ASSERT(var_index < Length());
4615 const Array& names = Array::Handle(raw_ptr()->names_); 4622 const Array& names = Array::Handle(raw_ptr()->names_);
4616 ASSERT(Length() == names.Length()); 4623 ASSERT(Length() == names.Length());
4617 names.SetAt(var_index, name); 4624 names.SetAt(var_index, name);
4618 RawLocalVarDescriptors::VarInfo *info = &raw_ptr()->data_[var_index]; 4625 RawLocalVarDescriptors::VarInfo *info = &raw_ptr()->data_[var_index];
(...skipping 2864 matching lines...) Expand 10 before | Expand all | Expand 10 after
7483 const String& str = String::Handle(pattern()); 7490 const String& str = String::Handle(pattern());
7484 const char* format = "JSRegExp: pattern=%s flags=%s"; 7491 const char* format = "JSRegExp: pattern=%s flags=%s";
7485 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags()); 7492 intptr_t len = OS::SNPrint(NULL, 0, format, str.ToCString(), Flags());
7486 char* chars = reinterpret_cast<char*>( 7493 char* chars = reinterpret_cast<char*>(
7487 Isolate::Current()->current_zone()->Allocate(len + 1)); 7494 Isolate::Current()->current_zone()->Allocate(len + 1));
7488 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags()); 7495 OS::SNPrint(chars, (len + 1), format, str.ToCString(), Flags());
7489 return chars; 7496 return chars;
7490 } 7497 }
7491 7498
7492 } // namespace dart 7499 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698