Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: src/crankshaft/lithium-codegen.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/lithium-codegen.h" 5 #include "src/crankshaft/lithium-codegen.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 Handle<ByteArray> translations = 321 Handle<ByteArray> translations =
322 translations_.CreateByteArray(isolate()->factory()); 322 translations_.CreateByteArray(isolate()->factory());
323 data->SetTranslationByteArray(*translations); 323 data->SetTranslationByteArray(*translations);
324 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); 324 data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_));
325 data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); 325 data->SetOptimizationId(Smi::FromInt(info_->optimization_id()));
326 if (info_->IsOptimizing()) { 326 if (info_->IsOptimizing()) {
327 // Reference to shared function info does not change between phases. 327 // Reference to shared function info does not change between phases.
328 AllowDeferredHandleDereference allow_handle_dereference; 328 AllowDeferredHandleDereference allow_handle_dereference;
329 data->SetSharedFunctionInfo(*info_->shared_info()); 329 data->SetSharedFunctionInfo(*info_->shared_info());
330 } else { 330 } else {
331 data->SetSharedFunctionInfo(Smi::kZero); 331 data->SetSharedFunctionInfo(Smi::FromInt(0));
332 } 332 }
333 data->SetWeakCellCache(Smi::kZero); 333 data->SetWeakCellCache(Smi::FromInt(0));
334 334
335 Handle<FixedArray> literals = 335 Handle<FixedArray> literals =
336 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); 336 factory()->NewFixedArray(deoptimization_literals_.length(), TENURED);
337 { 337 {
338 AllowDeferredHandleDereference copy_handles; 338 AllowDeferredHandleDereference copy_handles;
339 for (int i = 0; i < deoptimization_literals_.length(); i++) { 339 for (int i = 0; i < deoptimization_literals_.length(); i++) {
340 literals->set(i, *deoptimization_literals_[i]); 340 literals->set(i, *deoptimization_literals_[i]);
341 } 341 }
342 data->SetLiteralArray(*literals); 342 data->SetLiteralArray(*literals);
343 } 343 }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( 376 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo(
377 LInstruction* instr, DeoptimizeReason deopt_reason, int deopt_id) { 377 LInstruction* instr, DeoptimizeReason deopt_reason, int deopt_id) {
378 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), 378 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(),
379 deopt_reason, deopt_id); 379 deopt_reason, deopt_id);
380 return deopt_info; 380 return deopt_info;
381 } 381 }
382 382
383 } // namespace internal 383 } // namespace internal
384 } // namespace v8 384 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698