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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 HType::Smi())); | 170 HType::Smi())); |
| 171 | 171 |
| 172 Heap* heap = isolate()->heap(); | 172 Heap* heap = isolate()->heap(); |
| 173 const int kMinFreeNewSpaceAfterGC = | 173 const int kMinFreeNewSpaceAfterGC = |
| 174 ((heap->InitialSemiSpaceSize() - sizeof(FixedArrayBase)) / 2) / | 174 ((heap->InitialSemiSpaceSize() - sizeof(FixedArrayBase)) / 2) / |
| 175 kDoubleSize; | 175 kDoubleSize; |
| 176 | 176 |
| 177 HConstant* max_alloc_size = | 177 HConstant* max_alloc_size = |
| 178 new(zone) HConstant(kMinFreeNewSpaceAfterGC, Representation::Integer32()); | 178 new(zone) HConstant(kMinFreeNewSpaceAfterGC, Representation::Integer32()); |
| 179 AddInstruction(max_alloc_size); | 179 AddInstruction(max_alloc_size); |
| 180 AddInstruction(new(zone) HBoundsCheck(array_length, max_alloc_size)); | 180 AddInstruction( |
|
Jakob Kummerow
2013/02/07 16:17:14
Please add a comment here:
// Since we're forcing
Massi
2013/02/11 10:35:55
Done.
| |
| 181 new(zone) HBoundsCheck(array_length, max_alloc_size, | |
| 182 DONT_ALLOW_SMI_KEY, Representation::Integer32())); | |
| 181 | 183 |
| 182 current_block()->UpdateEnvironment(new(zone) HEnvironment(zone)); | 184 current_block()->UpdateEnvironment(new(zone) HEnvironment(zone)); |
| 183 | 185 |
| 184 IfBuilder if_builder(this); | 186 IfBuilder if_builder(this); |
| 185 | 187 |
| 186 if_builder.BeginTrue(array_length, graph()->GetConstant0(), Token::EQ); | 188 if_builder.BeginTrue(array_length, graph()->GetConstant0(), Token::EQ); |
| 187 | 189 |
| 188 // Nothing to do, just change the map. | 190 // Nothing to do, just change the map. |
| 189 | 191 |
| 190 if_builder.BeginFalse(); | 192 if_builder.BeginFalse(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 | 246 |
| 245 | 247 |
| 246 Handle<Code> TransitionElementsKindStub::GenerateCode() { | 248 Handle<Code> TransitionElementsKindStub::GenerateCode() { |
| 247 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); | 249 CodeStubGraphBuilder<TransitionElementsKindStub> builder(this); |
| 248 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); | 250 LChunk* chunk = OptimizeGraph(builder.CreateGraph()); |
| 249 return chunk->Codegen(Code::COMPILED_STUB); | 251 return chunk->Codegen(Code::COMPILED_STUB); |
| 250 } | 252 } |
| 251 | 253 |
| 252 | 254 |
| 253 } } // namespace v8::internal | 255 } } // namespace v8::internal |
| OLD | NEW |