Chromium Code Reviews| 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize; | 154 int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize; |
| 155 HValue* boilerplate_size = | 155 HValue* boilerplate_size = |
| 156 AddInstruction(new(zone) HInstanceSize(boilerplate)); | 156 AddInstruction(new(zone) HInstanceSize(boilerplate)); |
| 157 HValue* size_in_words = | 157 HValue* size_in_words = |
| 158 AddInstruction(new(zone) HConstant(size >> kPointerSizeLog2, | 158 AddInstruction(new(zone) HConstant(size >> kPointerSizeLog2, |
| 159 Representation::Integer32())); | 159 Representation::Integer32())); |
| 160 builder.CheckIntegerEq(boilerplate_size, size_in_words); | 160 builder.CheckIntegerEq(boilerplate_size, size_in_words); |
| 161 | 161 |
| 162 HValue* size_in_bytes = | 162 HValue* size_in_bytes = |
| 163 AddInstruction(new(zone) HConstant(size, Representation::Integer32())); | 163 AddInstruction(new(zone) HConstant(size, Representation::Integer32())); |
| 164 HAllocate::Flags flags = HAllocate::CAN_ALLOCATE_IN_NEW_SPACE; | |
| 165 if (FLAG_pretenure_objects) { | |
| 166 flags = static_cast<HAllocate::Flags>( | |
| 167 flags | HAllocate::CAN_ALLOCATE_IN_OLD_POINTER_SPACE); | |
| 168 } | |
| 164 HInstruction* object = | 169 HInstruction* object = |
| 165 AddInstruction(new(zone) HAllocate(context(), | 170 AddInstruction(new(zone) HAllocate(context(), |
|
Michael Starzinger
2013/03/07 19:19:38
Either keep the old line-breaks or also move the c
Hannes Payer (out of office)
2013/03/11 17:16:32
Done.
| |
| 166 size_in_bytes, | 171 size_in_bytes, HType::JSObject(), flags)); |
| 167 HType::JSObject(), | |
| 168 HAllocate::CAN_ALLOCATE_IN_NEW_SPACE)); | |
| 169 | 172 |
| 170 for (int i = 0; i < size; i += kPointerSize) { | 173 for (int i = 0; i < size; i += kPointerSize) { |
| 171 HInstruction* value = | 174 HInstruction* value = |
| 172 AddInstruction(new(zone) HLoadNamedField(boilerplate, true, i)); | 175 AddInstruction(new(zone) HLoadNamedField(boilerplate, true, i)); |
| 173 AddInstruction(new(zone) HStoreNamedField(object, | 176 AddInstruction(new(zone) HStoreNamedField(object, |
| 174 factory->empty_string(), | 177 factory->empty_string(), |
| 175 value, | 178 value, |
| 176 true, i)); | 179 true, i)); |
| 177 AddSimulate(BailoutId::StubEntry()); | 180 AddSimulate(BailoutId::StubEntry()); |
| 178 } | 181 } |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 | 310 |
| 308 | 311 |
| 309 Handle<Code> TransitionElementsKindStub::GenerateCode() { | 312 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
| 310 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); | 313 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); |
| 311 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 314 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 312 return chunk->Codegen(Code::COMPILED_STUB); | 315 return chunk->Codegen(Code::COMPILED_STUB); |
| 313 } | 316 } |
| 314 | 317 |
| 315 | 318 |
| 316 } } // namespace v8::internal | 319 } } // namespace v8::internal |
| OLD | NEW |