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

Side by Side Diff: vm/compiler.cc

Issue 12052033: Added macros OBJECT_IMPLEMENTATION and FINAL_OBJECT_IMPLEMENTATION (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 11 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 | « vm/code_patcher_x64.cc ('k') | vm/dart.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) 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 Object::Handle(object_table.At(i)).ToCString()); 378 Object::Handle(object_table.At(i)).ToCString());
379 } 379 }
380 OS::Print("}\n"); 380 OS::Print("}\n");
381 } 381 }
382 382
383 OS::Print("Stackmaps for function '%s' {\n", function_fullname); 383 OS::Print("Stackmaps for function '%s' {\n", function_fullname);
384 if (code.stackmaps() != Array::null()) { 384 if (code.stackmaps() != Array::null()) {
385 const Array& stackmap_table = Array::Handle(code.stackmaps()); 385 const Array& stackmap_table = Array::Handle(code.stackmaps());
386 Stackmap& map = Stackmap::Handle(); 386 Stackmap& map = Stackmap::Handle();
387 for (intptr_t i = 0; i < stackmap_table.Length(); ++i) { 387 for (intptr_t i = 0; i < stackmap_table.Length(); ++i) {
388 map |= stackmap_table.At(i); 388 map ^= stackmap_table.At(i);
389 OS::Print("%s\n", map.ToCString()); 389 OS::Print("%s\n", map.ToCString());
390 } 390 }
391 } 391 }
392 OS::Print("}\n"); 392 OS::Print("}\n");
393 393
394 OS::Print("Variable Descriptors for function '%s' {\n", 394 OS::Print("Variable Descriptors for function '%s' {\n",
395 function_fullname); 395 function_fullname);
396 const LocalVarDescriptors& var_descriptors = 396 const LocalVarDescriptors& var_descriptors =
397 LocalVarDescriptors::Handle(code.var_descriptors()); 397 LocalVarDescriptors::Handle(code.var_descriptors());
398 intptr_t var_desc_length = 398 intptr_t var_desc_length =
(...skipping 29 matching lines...) Expand all
428 OS::Print("%s}\n", handlers.ToCString()); 428 OS::Print("%s}\n", handlers.ToCString());
429 429
430 { 430 {
431 OS::Print("Static call target functions {\n"); 431 OS::Print("Static call target functions {\n");
432 const Array& table = Array::Handle(code.static_calls_target_table()); 432 const Array& table = Array::Handle(code.static_calls_target_table());
433 Smi& offset = Smi::Handle(); 433 Smi& offset = Smi::Handle();
434 Function& function = Function::Handle(); 434 Function& function = Function::Handle();
435 Code& code = Code::Handle(); 435 Code& code = Code::Handle();
436 for (intptr_t i = 0; i < table.Length(); 436 for (intptr_t i = 0; i < table.Length();
437 i += Code::kSCallTableEntryLength) { 437 i += Code::kSCallTableEntryLength) {
438 offset |= table.At(i + Code::kSCallTableOffsetEntry); 438 offset ^= table.At(i + Code::kSCallTableOffsetEntry);
439 function |= table.At(i + Code::kSCallTableFunctionEntry); 439 function ^= table.At(i + Code::kSCallTableFunctionEntry);
440 code |= table.At(i + Code::kSCallTableCodeEntry); 440 code ^= table.At(i + Code::kSCallTableCodeEntry);
441 OS::Print(" 0x%"Px": %s, %p\n", 441 OS::Print(" 0x%"Px": %s, %p\n",
442 start + offset.Value(), 442 start + offset.Value(),
443 function.ToFullyQualifiedCString(), 443 function.ToFullyQualifiedCString(),
444 code.raw()); 444 code.raw());
445 } 445 }
446 OS::Print("}\n"); 446 OS::Print("}\n");
447 } 447 }
448 } 448 }
449 449
450 450
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 Error& error = Error::Handle(); 566 Error& error = Error::Handle();
567 Array& functions = Array::Handle(cls.functions()); 567 Array& functions = Array::Handle(cls.functions());
568 Function& func = Function::Handle(); 568 Function& func = Function::Handle();
569 // Class dynamic lives in the vm isolate. Its array fields cannot be set to 569 // Class dynamic lives in the vm isolate. Its array fields cannot be set to
570 // an empty array. 570 // an empty array.
571 if (functions.IsNull()) { 571 if (functions.IsNull()) {
572 ASSERT(cls.IsDynamicClass()); 572 ASSERT(cls.IsDynamicClass());
573 return error.raw(); 573 return error.raw();
574 } 574 }
575 for (int i = 0; i < functions.Length(); i++) { 575 for (int i = 0; i < functions.Length(); i++) {
576 func |= functions.At(i); 576 func ^= functions.At(i);
577 ASSERT(!func.IsNull()); 577 ASSERT(!func.IsNull());
578 if (!func.HasCode() && 578 if (!func.HasCode() &&
579 !func.is_abstract() && 579 !func.is_abstract() &&
580 !func.IsRedirectingFactory()) { 580 !func.IsRedirectingFactory()) {
581 error = CompileFunction(func); 581 error = CompileFunction(func);
582 if (!error.IsNull()) { 582 if (!error.IsNull()) {
583 return error.raw(); 583 return error.raw();
584 } 584 }
585 } 585 }
586 } 586 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 Object::Handle(isolate->object_store()->sticky_error()); 642 Object::Handle(isolate->object_store()->sticky_error());
643 isolate->object_store()->clear_sticky_error(); 643 isolate->object_store()->clear_sticky_error();
644 isolate->set_long_jump_base(base); 644 isolate->set_long_jump_base(base);
645 return result.raw(); 645 return result.raw();
646 } 646 }
647 UNREACHABLE(); 647 UNREACHABLE();
648 return Object::null(); 648 return Object::null();
649 } 649 }
650 650
651 } // namespace dart 651 } // namespace dart
OLDNEW
« no previous file with comments | « vm/code_patcher_x64.cc ('k') | vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698