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

Side by Side Diff: src/arm/lithium-arm.cc

Issue 16381006: Change PC for OSR entries to point to something more sensible (i.e. the first UnknownOsrValue), rem… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add --always-osr flag. Created 7 years, 6 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 | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 23 matching lines...) Expand all
34 namespace v8 { 34 namespace v8 {
35 namespace internal { 35 namespace internal {
36 36
37 #define DEFINE_COMPILE(type) \ 37 #define DEFINE_COMPILE(type) \
38 void L##type::CompileToNative(LCodeGen* generator) { \ 38 void L##type::CompileToNative(LCodeGen* generator) { \
39 generator->Do##type(this); \ 39 generator->Do##type(this); \
40 } 40 }
41 LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE) 41 LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
42 #undef DEFINE_COMPILE 42 #undef DEFINE_COMPILE
43 43
44 LOsrEntry::LOsrEntry() {
45 for (int i = 0; i < Register::NumAllocatableRegisters(); ++i) {
46 register_spills_[i] = NULL;
47 }
48 for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
49 double_register_spills_[i] = NULL;
50 }
51 }
52
53
54 void LOsrEntry::MarkSpilledRegister(int allocation_index,
55 LOperand* spill_operand) {
56 ASSERT(spill_operand->IsStackSlot());
57 ASSERT(register_spills_[allocation_index] == NULL);
58 register_spills_[allocation_index] = spill_operand;
59 }
60
61
62 #ifdef DEBUG 44 #ifdef DEBUG
63 void LInstruction::VerifyCall() { 45 void LInstruction::VerifyCall() {
64 // Call instructions can use only fixed registers as temporaries and 46 // Call instructions can use only fixed registers as temporaries and
65 // outputs because all registers are blocked by the calling convention. 47 // outputs because all registers are blocked by the calling convention.
66 // Inputs operands must use a fixed register or use-at-start policy or 48 // Inputs operands must use a fixed register or use-at-start policy or
67 // a non-register policy. 49 // a non-register policy.
68 ASSERT(Output() == NULL || 50 ASSERT(Output() == NULL ||
69 LUnallocated::cast(Output())->HasFixedPolicy() || 51 LUnallocated::cast(Output())->HasFixedPolicy() ||
70 !LUnallocated::cast(Output())->HasRegisterPolicy()); 52 !LUnallocated::cast(Output())->HasRegisterPolicy());
71 for (UseIterator it(this); !it.Done(); it.Advance()) { 53 for (UseIterator it(this); !it.Done(); it.Advance()) {
72 LUnallocated* operand = LUnallocated::cast(it.Current()); 54 LUnallocated* operand = LUnallocated::cast(it.Current());
73 ASSERT(operand->HasFixedPolicy() || 55 ASSERT(operand->HasFixedPolicy() ||
74 operand->IsUsedAtStart()); 56 operand->IsUsedAtStart());
75 } 57 }
76 for (TempIterator it(this); !it.Done(); it.Advance()) { 58 for (TempIterator it(this); !it.Done(); it.Advance()) {
77 LUnallocated* operand = LUnallocated::cast(it.Current()); 59 LUnallocated* operand = LUnallocated::cast(it.Current());
78 ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy()); 60 ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy());
79 } 61 }
80 } 62 }
81 #endif 63 #endif
82 64
83 65
84 void LOsrEntry::MarkSpilledDoubleRegister(int allocation_index,
85 LOperand* spill_operand) {
86 ASSERT(spill_operand->IsDoubleStackSlot());
87 ASSERT(double_register_spills_[allocation_index] == NULL);
88 double_register_spills_[allocation_index] = spill_operand;
89 }
90
91
92 void LInstruction::PrintTo(StringStream* stream) { 66 void LInstruction::PrintTo(StringStream* stream) {
93 stream->Add("%s ", this->Mnemonic()); 67 stream->Add("%s ", this->Mnemonic());
94 68
95 PrintOutputOperandTo(stream); 69 PrintOutputOperandTo(stream);
96 70
97 PrintDataTo(stream); 71 PrintDataTo(stream);
98 72
99 if (HasEnvironment()) { 73 if (HasEnvironment()) {
100 stream->Add(" "); 74 stream->Add(" ");
101 environment()->PrintTo(stream); 75 environment()->PrintTo(stream);
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 2636
2663 2637
2664 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2638 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2665 LOperand* object = UseRegister(instr->object()); 2639 LOperand* object = UseRegister(instr->object());
2666 LOperand* index = UseRegister(instr->index()); 2640 LOperand* index = UseRegister(instr->index());
2667 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2641 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2668 } 2642 }
2669 2643
2670 2644
2671 } } // namespace v8::internal 2645 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698