| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
| 9 #include "src/debug.h" | 9 #include "src/debug.h" |
| 10 #include "src/full-codegen.h" | 10 #include "src/full-codegen.h" |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) { | 373 void FullCodeGenerator::PopulateDeoptimizationData(Handle<Code> code) { |
| 374 // Fill in the deoptimization information. | 374 // Fill in the deoptimization information. |
| 375 ASSERT(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty()); | 375 ASSERT(info_->HasDeoptimizationSupport() || bailout_entries_.is_empty()); |
| 376 if (!info_->HasDeoptimizationSupport()) return; | 376 if (!info_->HasDeoptimizationSupport()) return; |
| 377 int length = bailout_entries_.length(); | 377 int length = bailout_entries_.length(); |
| 378 Handle<DeoptimizationOutputData> data = | 378 Handle<DeoptimizationOutputData> data = |
| 379 DeoptimizationOutputData::New(isolate(), length, TENURED); | 379 DeoptimizationOutputData::New(isolate(), length, TENURED); |
| 380 bailout_entries_.Sort(&BailoutEntry::CompareBailoutId); |
| 380 for (int i = 0; i < length; i++) { | 381 for (int i = 0; i < length; i++) { |
| 381 data->SetAstId(i, bailout_entries_[i].id); | 382 data->SetAstId(i, bailout_entries_[i].id); |
| 382 data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state)); | 383 data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state)); |
| 383 } | 384 } |
| 384 code->set_deoptimization_data(*data); | 385 code->set_deoptimization_data(*data); |
| 385 } | 386 } |
| 386 | 387 |
| 387 | 388 |
| 388 void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) { | 389 void FullCodeGenerator::PopulateTypeFeedbackInfo(Handle<Code> code) { |
| 389 Handle<TypeFeedbackInfo> info = isolate()->factory()->NewTypeFeedbackInfo(); | 390 Handle<TypeFeedbackInfo> info = isolate()->factory()->NewTypeFeedbackInfo(); |
| (...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1698 } | 1699 } |
| 1699 return true; | 1700 return true; |
| 1700 } | 1701 } |
| 1701 #endif // DEBUG | 1702 #endif // DEBUG |
| 1702 | 1703 |
| 1703 | 1704 |
| 1704 #undef __ | 1705 #undef __ |
| 1705 | 1706 |
| 1706 | 1707 |
| 1707 } } // namespace v8::internal | 1708 } } // namespace v8::internal |
| OLD | NEW |