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

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

Issue 2419013004: Add local variable declaration token position to service protocol (Closed)
Patch Set: ... Created 4 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
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/code_generator_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 ActivationFrame* frame = stack->FrameAt(i); 1721 ActivationFrame* frame = stack->FrameAt(i);
1722 #ifndef DART_PRECOMPILED_RUNTIME 1722 #ifndef DART_PRECOMPILED_RUNTIME
1723 // Ensure that we have unoptimized code. 1723 // Ensure that we have unoptimized code.
1724 frame->function().EnsureHasCompiledUnoptimizedCode(); 1724 frame->function().EnsureHasCompiledUnoptimizedCode();
1725 #endif 1725 #endif
1726 // Variable locations and number are unknown when precompiling. 1726 // Variable locations and number are unknown when precompiling.
1727 const int num_vars = 1727 const int num_vars =
1728 FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables(); 1728 FLAG_precompiled_runtime ? 0 : frame->NumLocalVariables();
1729 TokenPosition unused = TokenPosition::kNoSource; 1729 TokenPosition unused = TokenPosition::kNoSource;
1730 for (intptr_t v = 0; v < num_vars; v++) { 1730 for (intptr_t v = 0; v < num_vars; v++) {
1731 frame->VariableAt(v, &var_name, &unused, &unused, &var_value); 1731 frame->VariableAt(v, &var_name, &unused, &unused, &unused, &var_value);
1732 } 1732 }
1733 } 1733 }
1734 FLAG_stacktrace_every = saved_stacktrace_every; 1734 FLAG_stacktrace_every = saved_stacktrace_every;
1735 } 1735 }
1736 1736
1737 const Error& error = Error::Handle(thread->HandleInterrupts()); 1737 const Error& error = Error::Handle(thread->HandleInterrupts());
1738 if (!error.IsNull()) { 1738 if (!error.IsNull()) {
1739 Exceptions::PropagateError(error); 1739 Exceptions::PropagateError(error);
1740 UNREACHABLE(); 1740 UNREACHABLE();
1741 } 1741 }
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
2345 const intptr_t elm_size = old_data.ElementSizeInBytes(); 2345 const intptr_t elm_size = old_data.ElementSizeInBytes();
2346 const TypedData& new_data = 2346 const TypedData& new_data =
2347 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 2347 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
2348 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 2348 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
2349 typed_data_cell.SetAt(0, new_data); 2349 typed_data_cell.SetAt(0, new_data);
2350 arguments.SetReturn(new_data); 2350 arguments.SetReturn(new_data);
2351 } 2351 }
2352 2352
2353 2353
2354 } // namespace dart 2354 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast_transformer.cc ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698