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

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

Issue 10407019: Extend assembler with ability to produce comments for the generated code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Srdjan comments Created 8 years, 7 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
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/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/code_generator.h" 8 #include "vm/code_generator.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 261
262 void CodeGenerator::FinalizeExceptionHandlers(const Code& code) { 262 void CodeGenerator::FinalizeExceptionHandlers(const Code& code) {
263 ASSERT(exception_handlers_list_ != NULL); 263 ASSERT(exception_handlers_list_ != NULL);
264 const ExceptionHandlers& handlers = ExceptionHandlers::Handle( 264 const ExceptionHandlers& handlers = ExceptionHandlers::Handle(
265 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint())); 265 exception_handlers_list_->FinalizeExceptionHandlers(code.EntryPoint()));
266 code.set_exception_handlers(handlers); 266 code.set_exception_handlers(handlers);
267 } 267 }
268 268
269 269
270 void CodeGenerator::FinalizeComments(const Code& code) {
271 code.set_comments(assembler_->GetCodeComments());
272 }
273
274
270 void CodeGenerator::GenerateLoadVariable(Register dst, 275 void CodeGenerator::GenerateLoadVariable(Register dst,
271 const LocalVariable& variable) { 276 const LocalVariable& variable) {
272 if (variable.is_captured()) { 277 if (variable.is_captured()) {
273 // The variable lives in the context. 278 // The variable lives in the context.
274 intptr_t delta = context_level() - variable.owner()->context_level(); 279 intptr_t delta = context_level() - variable.owner()->context_level();
275 ASSERT(delta >= 0); 280 ASSERT(delta >= 0);
276 Register base = CTX; 281 Register base = CTX;
277 while (delta-- > 0) { 282 while (delta-- > 0) {
278 __ movl(dst, FieldAddress(base, Context::parent_offset())); 283 __ movl(dst, FieldAddress(base, Context::parent_offset()));
279 base = dst; 284 base = dst;
(...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2968 const Error& error = Error::Handle( 2973 const Error& error = Error::Handle(
2969 Parser::FormatError(script, token_index, "Error", format, args)); 2974 Parser::FormatError(script, token_index, "Error", format, args));
2970 va_end(args); 2975 va_end(args);
2971 Isolate::Current()->long_jump_base()->Jump(1, error); 2976 Isolate::Current()->long_jump_base()->Jump(1, error);
2972 UNREACHABLE(); 2977 UNREACHABLE();
2973 } 2978 }
2974 2979
2975 } // namespace dart 2980 } // namespace dart
2976 2981
2977 #endif // defined TARGET_ARCH_IA32 2982 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698