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

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

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

Powered by Google App Engine
This is Rietveld 408576698