OLD | NEW |
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 CodeStubInterfaceDescriptor* descriptor = | 91 CodeStubInterfaceDescriptor* descriptor = |
92 info_.isolate()->code_stub_interface_descriptor(major_key); | 92 info_.isolate()->code_stub_interface_descriptor(major_key); |
93 if (descriptor->register_param_count_ < 0) { | 93 if (descriptor->register_param_count_ < 0) { |
94 stub()->InitializeInterfaceDescriptor(info_.isolate(), descriptor); | 94 stub()->InitializeInterfaceDescriptor(info_.isolate(), descriptor); |
95 } | 95 } |
96 parameters_.Reset(new HParameter*[descriptor->register_param_count_]); | 96 parameters_.Reset(new HParameter*[descriptor->register_param_count_]); |
97 | 97 |
98 HGraph* graph = this->graph(); | 98 HGraph* graph = this->graph(); |
99 Zone* zone = this->zone(); | 99 Zone* zone = this->zone(); |
100 for (int i = 0; i < descriptor->register_param_count_; ++i) { | 100 for (int i = 0; i < descriptor->register_param_count_; ++i) { |
101 HParameter* param = new(zone) HParameter(i); | 101 HParameter* param = |
| 102 new(zone) HParameter(i, HParameter::REGISTER_PARAMETER); |
102 AddInstruction(param); | 103 AddInstruction(param); |
103 graph->start_environment()->Push(param); | 104 graph->start_environment()->Push(param); |
104 parameters_[i] = param; | 105 parameters_[i] = param; |
105 } | 106 } |
106 AddSimulate(BailoutId::StubEntry()); | 107 AddSimulate(BailoutId::StubEntry()); |
107 | 108 |
108 BuildCodeStub(); | 109 BuildCodeStub(); |
109 | 110 |
110 return true; | 111 return true; |
111 } | 112 } |
(...skipping 26 matching lines...) Expand all Loading... |
138 | 139 |
139 | 140 |
140 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { | 141 Handle<Code> KeyedLoadFastElementStub::GenerateCode() { |
141 CodeStubGraphBuilder<KeyedLoadFastElementStub> builder(this); | 142 CodeStubGraphBuilder<KeyedLoadFastElementStub> builder(this); |
142 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 143 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
143 return chunk->Codegen(Code::COMPILED_STUB); | 144 return chunk->Codegen(Code::COMPILED_STUB); |
144 } | 145 } |
145 | 146 |
146 | 147 |
147 } } // namespace v8::internal | 148 } } // namespace v8::internal |
OLD | NEW |