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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 253 } |
254 | 254 |
255 | 255 |
256 void CompilationInfo::PrepareForCompilation(Scope* scope) { | 256 void CompilationInfo::PrepareForCompilation(Scope* scope) { |
257 ASSERT(scope_ == NULL); | 257 ASSERT(scope_ == NULL); |
258 scope_ = scope; | 258 scope_ = scope; |
259 | 259 |
260 int length = function()->slot_count(); | 260 int length = function()->slot_count(); |
261 if (feedback_vector_.is_null()) { | 261 if (feedback_vector_.is_null()) { |
262 // Allocate the feedback vector too. | 262 // Allocate the feedback vector too. |
263 feedback_vector_ = isolate()->factory()->NewFixedArray(length, TENURED); | 263 feedback_vector_ = isolate()->factory()->NewTypeFeedbackVector(length); |
264 // Ensure we can skip the write barrier | |
265 ASSERT_EQ(isolate()->heap()->uninitialized_symbol(), | |
266 *TypeFeedbackInfo::UninitializedSentinel(isolate())); | |
267 for (int i = 0; i < length; i++) { | |
268 feedback_vector_->set( | |
269 i, | |
270 *TypeFeedbackInfo::UninitializedSentinel(isolate()), | |
271 SKIP_WRITE_BARRIER); | |
272 } | |
273 } | 264 } |
274 ASSERT(feedback_vector_->length() == length); | 265 ASSERT(feedback_vector_->length() == length); |
275 } | 266 } |
276 | 267 |
277 | 268 |
278 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { | 269 class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { |
279 public: | 270 public: |
280 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) | 271 explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) |
281 : HOptimizedGraphBuilder(info) { | 272 : HOptimizedGraphBuilder(info) { |
282 } | 273 } |
(...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 AllowHandleDereference allow_deref; | 1321 AllowHandleDereference allow_deref; |
1331 bool tracing_on = info()->IsStub() | 1322 bool tracing_on = info()->IsStub() |
1332 ? FLAG_trace_hydrogen_stubs | 1323 ? FLAG_trace_hydrogen_stubs |
1333 : (FLAG_trace_hydrogen && | 1324 : (FLAG_trace_hydrogen && |
1334 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1325 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1335 return (tracing_on && | 1326 return (tracing_on && |
1336 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1327 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1337 } | 1328 } |
1338 | 1329 |
1339 } } // namespace v8::internal | 1330 } } // namespace v8::internal |
OLD | NEW |