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

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

Issue 57423003: Restore 0-based temporary index numbering in the VM compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/flow_graph_builder.h ('k') | no next file » | 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/flow_graph_builder.h" 5 #include "vm/flow_graph_builder.h"
6 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 1896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 - owner()->num_copied_params() 1907 - owner()->num_copied_params()
1908 - owner()->args_pushed() 1908 - owner()->args_pushed()
1909 - owner()->temp_count() + 1; 1909 - owner()->temp_count() + 1;
1910 } 1910 }
1911 1911
1912 1912
1913 LocalVariable* EffectGraphVisitor::EnterTempLocalScope(Value* value) { 1913 LocalVariable* EffectGraphVisitor::EnterTempLocalScope(Value* value) {
1914 Do(new PushTempInstr(value)); 1914 Do(new PushTempInstr(value));
1915 owner()->AllocateTemp(); 1915 owner()->AllocateTemp();
1916 1916
1917 ASSERT(value->definition()->temp_index() == owner()->temp_count()); 1917 ASSERT(value->definition()->temp_index() == (owner()->temp_count() - 1));
1918 intptr_t index = GetCurrentTempLocalIndex(); 1918 intptr_t index = GetCurrentTempLocalIndex();
1919 char name[64]; 1919 char name[64];
1920 OS::SNPrint(name, 64, ":tmp_local%" Pd, index); 1920 OS::SNPrint(name, 64, ":tmp_local%" Pd, index);
1921 LocalVariable* var = 1921 LocalVariable* var =
1922 new LocalVariable(0, 1922 new LocalVariable(0,
1923 String::ZoneHandle(Symbols::New(name)), 1923 String::ZoneHandle(Symbols::New(name)),
1924 *value->Type()->ToAbstractType()); 1924 *value->Type()->ToAbstractType());
1925 var->set_index(index); 1925 var->set_index(index);
1926 return var; 1926 return var;
1927 } 1927 }
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after
3884 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1; 3884 intptr_t len = OS::SNPrint(NULL, 0, kFormat, function_name, reason) + 1;
3885 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); 3885 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len);
3886 OS::SNPrint(chars, len, kFormat, function_name, reason); 3886 OS::SNPrint(chars, len, kFormat, function_name, reason);
3887 const Error& error = Error::Handle( 3887 const Error& error = Error::Handle(
3888 LanguageError::New(String::Handle(String::New(chars)))); 3888 LanguageError::New(String::Handle(String::New(chars))));
3889 Isolate::Current()->long_jump_base()->Jump(1, error); 3889 Isolate::Current()->long_jump_base()->Jump(1, error);
3890 } 3890 }
3891 3891
3892 3892
3893 } // namespace dart 3893 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698